{
    "content": [
        {
            "type": "text",
            "text": "# Data::Serializer::Raw (perldoc)\n\n## NAME\n\nData::Serializer::Raw - Provides unified raw interface to perl serializers\n\n## SYNOPSIS\n\nuse Data::Serializer::Raw;\n$obj = Data::Serializer::Raw->new();\n$obj = Data::Serializer::Raw->new(serializer => 'Storable');\n$serialized = $obj->serialize({a => [1,2,3],b => 5});\n$deserialized = $obj->deserialize($serialized);\nprint \"$deserialized->{b}\\n\";\n\n## DESCRIPTION\n\nProvides a unified interface to the various serializing modules currently available.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **EXAMPLES**\n- **METHODS**\n- **AUTHOR**\n- **BUGS**\n- **COPYRIGHT AND LICENSE**\n- **ACKNOWLEDGEMENTS**\n- **SEE ALSO** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Data::Serializer::Raw",
        "section": "",
        "mode": "perldoc",
        "summary": "Data::Serializer::Raw - Provides unified raw interface to perl serializers",
        "synopsis": "use Data::Serializer::Raw;\n$obj = Data::Serializer::Raw->new();\n$obj = Data::Serializer::Raw->new(serializer => 'Storable');\n$serialized = $obj->serialize({a => [1,2,3],b => 5});\n$deserialized = $obj->deserialize($serialized);\nprint \"$deserialized->{b}\\n\";",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "Please see Data::Serializer::Cookbook(3)"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 5,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 96,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "COPYRIGHT AND LICENSE",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "ACKNOWLEDGEMENTS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 1,
                "subsections": [
                    {
                        "name": "perl",
                        "lines": 1
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "Data::Serializer::Raw - Provides unified raw interface to perl serializers\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use Data::Serializer::Raw;\n\n$obj = Data::Serializer::Raw->new();\n\n$obj = Data::Serializer::Raw->new(serializer => 'Storable');\n\n$serialized = $obj->serialize({a => [1,2,3],b => 5});\n$deserialized = $obj->deserialize($serialized);\n\nprint \"$deserialized->{b}\\n\";\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Provides a unified interface to the various serializing modules currently available.\n\nThis is a straight pass through to the underlying serializer, nothing else is done. (no\nencoding, encryption, compression, etc)\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "Please see Data::Serializer::Cookbook(3)\n",
                "subsections": []
            },
            "METHODS": {
                "content": "new - constructor\n$obj = Data::Serializer::Raw->new();\n\n\n$obj = Data::Serializer::Raw->new(\nserializer => 'Data::Dumper',\noptions  => {},\n);\n\nnew is the constructor object for Data::Serializer::Raw objects.\n\n*   The default *serializer* is \"Data::Dumper\"\n\n*   The default *options* is \"{}\" (pass nothing on to serializer)\n\nserialize - serialize reference\n$serialized = $obj->serialize({a => [1,2,3],b => 5});\n\nThis is a straight pass through to the underlying serializer, nothing else is done. (no\nencoding, encryption, compression, etc)\n\ndeserialize - deserialize reference\n$deserialized = $obj->deserialize($serialized);\n\nThis is a straight pass through to the underlying serializer, nothing else is done. (no\nencoding, encryption, compression, etc)\n\nserializer - change the serializer\nCurrently supports the following serializers:\n\nBencode(3)\nConvert::Bencode(3)\nConvert::BencodeXS(3)\nConfig::General(3)\nData::Denter(3)\nData::Dumper(3)\nData::Taxi(3)\nFreezeThaw(3)\nJSON(3)\nJSON::Syck(3)\nPHP::Serialization(3)\nStorable(3)\nXML::Dumper(3)\nXML::Simple(3)\nYAML(3)\nYAML::Syck(3)\n\nDefault is to use Data::Dumper.\n\nEach serializer has its own caveat's about usage especially when dealing with cyclical data\nstructures or CODE references. Please see the appropriate documentation in those modules for\nfurther information.\n\noptions - pass options through to underlying serializer\nCurrently is only supported by Config::General(3), and XML::Dumper(3).\n\nmy $obj = Data::Serializer::Raw->new(serializer => 'Config::General',\noptions    => {\n-LowerCaseNames       => 1,\n-UseApacheInclude     => 1,\n-MergeDuplicateBlocks => 1,\n-AutoTrue             => 1,\n-InterPolateVars      => 1\n},\n) or die \"$!\\n\";\n\nor\n\nmy $obj = Data::Serializer::Raw->new(serializer => 'XML::Dumper',\noptions    => { dtd => 1, }\n) or die \"$!\\n\";\n\nstore - serialize data and write it to a file (or file handle)\n$obj->store({a => [1,2,3],b => 5},$file, [$mode, $perm]);\n\nor\n\n$obj->store({a => [1,2,3],b => 5},$fh);\n\nSerializes the reference specified using the serialize method and writes it out to the\nspecified file or filehandle.\n\nIf a file path is specified you may specify an optional mode and permission as the next two\narguments. See IO::File for examples.\n\nTrips an exception if it is unable to write to the specified file.\n\nretrieve - read data from file (or file handle) and return it after deserialization\nmy $ref = $obj->retrieve($file);\n\nor\n\nmy $ref = $obj->retrieve($fh);\n\nReads first line of supplied file or filehandle and returns it deserialized.\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Neil Neely <neil@neely.cx>.\n\nhttp://neil-neely.blogspot.com/\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Please report all bugs here:\n\nhttp://rt.cpan.org/Public/Dist/Display.html?Name=Data-Serializer\n",
                "subsections": []
            },
            "COPYRIGHT AND LICENSE": {
                "content": "Copyright (c) 2011 Neil Neely. All rights reserved.\n\nThis library is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may\nhave available.\n\nSee http://www.perl.com/language/misc/Artistic.html\n",
                "subsections": []
            },
            "ACKNOWLEDGEMENTS": {
                "content": "Peter Makholm took the time to profile Data::Serializer(3) and pointed out the value of having a\nvery lean implementation that minimized overhead and just used the raw underlying serializers.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "",
                "subsections": [
                    {
                        "name": "perl",
                        "content": ""
                    }
                ]
            }
        }
    }
}