Data-Transformer
view release on metacpan or search on metacpan
print "Number of nodes: $nodes\n";
print "Size of keys + values: $size\n";
# D: OBJECTS INSIDE A DATA STRUCTURE
# Affect objects by using the class name as a key:
my $t = Data::Transformer->new(
'My::Class' => sub { shift->set_foo('bar') }
);
DESCRIPTION
Data type callbacks
The basic idea is that you provide a callback subroutine for each type
of data that you wish to affect or collect information from.
The constructor, "new()", expects a hash with at least one of the
following keys:
* normal : used for normal, non-reference data
* array : used for array references
* hash : used for hash references
* code : used for anonymous subroutines (coderefs)
lib/Data/Transformer.pm view on Meta::CPAN
print "Size of keys + values: $size\n";
# D: OBJECTS INSIDE A DATA STRUCTURE
# Affect objects by using the class name as a key:
my $t = Data::Transformer->new(
'My::Class' => sub { shift->set_foo('bar') }
);
=head1 DESCRIPTION
=head2 Data type callbacks
The basic idea is that you provide a callback subroutine for each type
of data that you wish to affect or collect information from.
The constructor, C<new()>, expects a hash with at least one of the
following keys:
* normal : used for normal, non-reference data
* array : used for array references
* hash : used for hash references
( run in 0.374 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )