Merge branch 'master' into engine_traits
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Format / YAML.pm
index dad4120..f2c08cc 100644 (file)
@@ -2,24 +2,29 @@
 package MooseX::Storage::Format::YAML;
 use Moose::Role;
 
+# When I add YAML::LibYAML
+# Tests break because tye YAML is invalid...?
+# -dcp
+
 use Best [
     [ qw[YAML::Syck YAML] ], 
     [ qw[Load Dump] ]
 ];
 
-our $VERSION = '0.01';
+our $VERSION   = '0.18';
+our $AUTHORITY = 'cpan:STEVAN';
 
 requires 'pack';
 requires 'unpack';
 
 sub thaw {
-    my ( $class, $json ) = @_;
-    $class->unpack( Load($json) );
+    my ( $class, $yaml, @args ) = @_;
+    $class->unpack( Load($yaml), @args );
 }
 
 sub freeze {
-    my $self = shift;
-    Dump( $self->pack() );
+    my ( $self, @args ) = @_;
+    Dump( $self->pack(@args) );
 }
 
 1;
@@ -30,7 +35,7 @@ __END__
 
 =head1 NAME
 
-MooseX::Storage::Format::YAML
+MooseX::Storage::Format::YAML - A YAML serialization role
 
 =head1 SYNOPSIS
 
@@ -99,7 +104,7 @@ Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2007 by Infinity Interactive, Inc.
+Copyright 2007-2008 by Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>