Data-Record-Serialize
view release on metacpan or search on metacpan
lib/Data/Record/Serialize/Encode/ddump.pm view on Meta::CPAN
my %config = (
%{ $self->dd_config },
Terse => 1,
Trailingcomma => 1,
);
for my $mth ( keys %config ) {
my $code = $ddump->can( $mth )
or error( '::parameter', "$mth is not a Data::Dumper configuration variable" );
$code->( $ddump, $config{$mth} );
}
return;
};
with 'Data::Record::Serialize::Role::Encode';
1;
#
# This file is part of Data-Record-Serialize
#
# This software is Copyright (c) 2017 by Smithsonian Astrophysical Observatory.
#
# This is free software, licensed under:
#
# The GNU General Public License, Version 3, June 2007
#
__END__
=pod
=for :stopwords Diab Jerius Smithsonian Astrophysical Observatory Trailingcomma
=head1 NAME
Data::Record::Serialize::Encode::ddump - encoded a record using Data::Dumper
=head1 VERSION
version 2.03
=head1 SYNOPSIS
use Data::Record::Serialize;
my $s = Data::Record::Serialize->new( encode => 'ddump', ... );
$s->send( \%record );
=head1 DESCRIPTION
B<Data::Record::Serialize::Encode::ddump> encodes a record using
L<Data::Dumper>. The resultant encoding may be decoded via
@data = eval $buf;
It performs the L<Data::Record::Serialize::Role::Encode> role.
=head1 OBJECT ATTRIBUTES
=head2 ddump
The L<Data::Dumper> object. It will be constructed if not provided to
the constructor.
=head2 dd_config
Configuration data for the L<Data::Dumper> object stored in L</ddump>.
Hash keys are the names of L<Data::Dumper> configuration variables,
without the preceding C<Data::Dumper::> prefix. Be careful to ensure
that the resultant output is a (comma separated) list of structures
which can be C<eval>'ed.
B<Terse> and B<Trailingcomma> are always set.
=head1 CLASS METHODS
=head2 new
This role adds two named arguments to the constructor, L</ddump> and
L</config>, which mirror the added object attributes.
=for Pod::Coverage encode
=head1 SUPPORT
=head2 Bugs
Please report any bugs or feature requests to bug-data-record-serialize@rt.cpan.org or through the web interface at: L<https://rt.cpan.org/Public/Dist/Display.html?Name=Data-Record-Serialize>
=head2 Source
Source is available at
https://gitlab.com/djerius/data-record-serialize
and may be cloned from
https://gitlab.com/djerius/data-record-serialize.git
=head1 SEE ALSO
Please see those modules/websites for more information related to this module.
=over 4
=item *
L<Data::Record::Serialize|Data::Record::Serialize>
=back
=head1 AUTHOR
( run in 1.573 second using v1.01-cache-2.11-cpan-97f6503c9c8 )