YAML.pm 950 Bytes
Newer Older
1 2 3
package Data::Serializer::YAML;
BEGIN { @Data::Serializer::YAML::ISA = qw(Data::Serializer) }

4
use warnings;
5 6
use strict;
use YAML;
7
use vars qw($VERSION @ISA);
8

9
$VERSION = '0.02';
10

11 12 13
sub serialize {
    return Dump($_[1]);
}
14

15 16 17
sub deserialize {
    return Load($_[1]);
}
18 19 20 21 22



1;
__END__
23
#
24 25 26 27 28 29 30 31 32 33 34 35 36

=head1 NAME

Data::Serializer::YAML - Creates bridge between Data::Serializer and YAML

=head1 SYNOPSIS

  use Data::Serializer::YAML;

=head1 DESCRIPTION

Module is used internally to Data::Serializer

37 38 39 40 41 42 43 44 45

=over 4

=item B<serialize> - Wrapper to normalize serializer method name

=item B<deserialize> - Wrapper to normalize deserializer method name

=back

46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
=head1 AUTHOR

Florian Helmberger <fh@laudatio.com>

=head1 COPYRIGHT

  Copyright 2002 by Florian Helmberger.  All rights reserved.
  This program is free software; you can redistribute it
  and/or modify it under the same terms as Perl itself.

=head1 SEE ALSO

perl(1), Data::Serializer(3), YAML(3).

=cut