| Any-Renderer documentation | view source | Contained in the Any-Renderer distribution. |
Any::Renderer::Data::Serializer - adaptor for Any::Renderer to use any Data::Serializer backends
use Any::Renderer; my %options = (); my $format = "YAML"; #One of the formats provided by Data::Serializer my $r = new Any::Renderer ( $format, \%options ); my $data_structure = [...]; # arbitrary structure code my $string = $r->render ( $data_structure );
Any::Renderer::Data::Serializer renders any Perl data structure passed to it into a string representation using modules exposing the Data::Serializer API.
All the formats supported by Data::Serializer. Try this to find out what's available on your system:
perl -MAny::Renderer::Data::Serializer -e "print join(qq{\n}, sort @{Any::Renderer::Data::Serializer::available_formats()})"
See FORMATS for a description of valid values for $format.
%options are passed through to the backend module (e.g. to XML::Dumper)
The main method.
This will be false for these formats.
This will discover the formats supported by your Data::Serializer installation.
Set the ANY_RENDERER_DS_SAFE environment variable to a true value if you want to check each Data::Serializer
backend compiles before adding it to the list of available formats.
This is safer in that modules with missing dependencies are not advertised as available but it incurs a
CPU and memory overhead.
Data::Serializer, Any::Renderer
$Revision: 1.5 $ on $Date: 2006/09/04 12:15:54 $ by $Author: johna $
John Alden <cpan _at_ bbc _dot_ co _dot_ uk>
(c) BBC 2006. This program is free software; you can redistribute it and/or modify it under the GNU GPL.
See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt
| Any-Renderer documentation | view source | Contained in the Any-Renderer distribution. |