adding metaclass alias
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Format / YAML.pm
CommitLineData
6f0912d0 1
2package MooseX::Storage::Format::YAML;
3use Moose::Role;
4
5use Best [
6 [ qw[YAML::Syck YAML] ],
7 [ qw[Load Dump] ]
8];
9
10requires 'pack';
11requires 'unpack';
12
13sub thaw {
14 my ( $class, $json ) = @_;
15 $class->unpack( Load($json) );
16}
17
18sub freeze {
19 my $self = shift;
20 Dump( $self->pack() );
21}
22
231;
24
25__END__
26
27=pod
28
29=head1 NAME
30
31MooseX::Storage::Format::YAML
32
33=head1 SYNOPSIS
34
35=head1 DESCRIPTION
36
37=head1 METHODS
38
39=over 4
40
41=item B<freeze>
42
43=item B<thaw ($json)>
44
45=back
46
47=head2 Introspection
48
49=over 4
50
51=item B<meta>
52
53=back
54
55=head1 BUGS
56
57All complex software has bugs lurking in it, and this module is no
58exception. If you find a bug please either email me, or add the bug
59to cpan-RT.
60
61=head1 AUTHOR
62
63Chris Prather E<lt>chris.prather@iinteractive.comE<gt>
64
65Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
66
67=head1 COPYRIGHT AND LICENSE
68
69Copyright 2007 by Infinity Interactive, Inc.
70
71L<http://www.iinteractive.com>
72
73This library is free software; you can redistribute it and/or modify
74it under the same terms as Perl itself.
75
76=cut
77
78