Data-YAML
view release on metacpan or search on metacpan
lib/Data/YAML.pm view on Meta::CPAN
=head1 VERSION
This document describes Data::YAML version 0.0.7
=head1 DESCRIPTION
In the spirit of L<YAML::Tiny>, L<Data::YAML::Reader> and
L<Data::YAML::Writer> provide lightweight, dependency-free YAML
handling. While C<YAML::Tiny> is designed principally for working with
configuration files C<Data::YAML> concentrates on the transparent round-
tripping of YAML serialized Perl data structures.
As an example of why this distinction matters consider that
C<YAML::Tiny> doesn't handle hashes with keys containing non-printable
characters. This is fine for configuration files but likely to cause
problems when handling arbitrary Perl data structures. C<Data::YAML>
handles exotic hash keys correctly.
The syntax accepted by C<Data::YAML> is a subset of YAML. Specifically
it is the same subset of YAML that L<Data::YAML::Writer> produces. See
lib/Data/YAML/Reader.pm view on Meta::CPAN
# ...a string containing YAML...
my $from_string = $yr->read( $some_string );
# ...or a closure
my $from_code = $yr->read( sub { return get_next_line() } );
=head1 DESCRIPTION
In the spirit of L<YAML::Tiny> this is a lightweight, dependency-free
YAML reader. While C<YAML::Tiny> is designed principally for working
with configuration files C<Data::YAML> concentrates on the transparent
round-tripping of YAML serialized Perl data structures.
The syntax accepted by C<Data::YAML::Reader> is a subset of YAML.
Specifically it is the same subset of YAML that L<Data::YAML::Writer>
produces. See L<Data::YAML> for more information.
=head1 INTERFACE
=over
lib/Data/YAML/Writer.pm view on Meta::CPAN
print "$line\n";
} );
=head1 DESCRIPTION
Encodes a scalar, hash reference or array reference as YAML.
In the spirit of L<YAML::Tiny> this is a lightweight, dependency-free
YAML writer. While C<YAML::Tiny> is designed principally for working
with configuration files C<Data::YAML> concentrates on the transparent
round-tripping of YAML serialized Perl data structures.
The syntax produced by C<Data::YAML::Writer> is a subset of YAML.
Specifically it is the same subset of YAML that L<Data::YAML::Reader>
consumes. See L<Data::YAML> for more information.
=head1 INTERFACE
=over
( run in 0.600 second using v1.01-cache-2.11-cpan-0a6323c29d9 )