MooseX::Storage - added peek()
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Basic.pm
index a0745b2..a572668 100644 (file)
@@ -4,18 +4,19 @@ use Moose::Role;
 
 use MooseX::Storage::Engine;
 
-our $VERSION = '0.01';
+our $VERSION   = '0.01';
+our $AUTHORITY = 'cpan:STEVAN';
 
 sub pack {
-    my $self = shift;
+    my ( $self, @args ) = @_;
     my $e = MooseX::Storage::Engine->new( object => $self );
-    $e->collapse_object;
+    $e->collapse_object(@args);
 }
 
 sub unpack {
-    my ( $class, $data ) = @_;
+    my ( $class, $data, @args ) = @_;
     my $e = MooseX::Storage::Engine->new( class => $class );
-    $class->new( $e->expand_object($data) );
+    $class->new( $e->expand_object($data, @args) );
 }
 
 1;