[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 package DBI::Gofer::Serializer::DataDumper; 2 3 use strict; 4 use warnings; 5 6 our $VERSION = sprintf("0.%06d", q$Revision: 9949 $ =~ /(\d+)/o); 7 8 # $Id: DataDumper.pm 9949 2007-09-18 09:38:15Z timbo $ 9 # 10 # Copyright (c) 2007, Tim Bunce, Ireland 11 # 12 # You may distribute under the terms of either the GNU General Public 13 # License or the Artistic License, as specified in the Perl README file. 14 15 =head1 NAME 16 17 DBI::Gofer::Serializer::DataDumper - Gofer serialization using DataDumper 18 19 =head1 SYNOPSIS 20 21 $serializer = DBI::Gofer::Serializer::DataDumper->new(); 22 23 $string = $serializer->serialize( $data ); 24 25 =head1 DESCRIPTION 26 27 Uses DataDumper to serialize. Deserialization is not supported. 28 The output of this class is only meant for human consumption. 29 30 See also L<DBI::Gofer::Serializer::Base>. 31 32 =cut 33 34 use Data::Dumper; 35 36 use base qw(DBI::Gofer::Serializer::Base); 37 38 39 sub serialize { 40 my $self = shift; 41 local $Data::Dumper::Indent = 1; 42 local $Data::Dumper::Terse = 1; 43 local $Data::Dumper::Useqq = 0; # enabling this disables xs 44 local $Data::Dumper::Sortkeys = 1; 45 local $Data::Dumper::Quotekeys = 0; 46 local $Data::Dumper::Deparse = 0; 47 local $Data::Dumper::Purity = 0; 48 my $frozen = Data::Dumper::Dumper(shift); 49 return $frozen unless wantarray; 50 return ($frozen, $self->{deserializer_class}); 51 } 52 53 1;
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Mar 17 22:47:18 2015 | Cross-referenced by PHPXref 0.7.1 |