package MooseX::Storage::Format::Storable;
use Moose::Role;
-use Storable ();
-
-our $VERSION = '0.34';
-our $AUTHORITY = 'cpan:STEVAN';
-
requires 'pack';
requires 'unpack';
sub thaw {
my ( $class, $stored, @args ) = @_;
+
+ require Storable;
$class->unpack( Storable::thaw($stored), @args );
}
sub freeze {
my ( $self, @args ) = @_;
+ require Storable;
Storable::nfreeze( $self->pack(@args) );
}
=head1 DESCRIPTION
+=for stopwords IPC
+
This module will C<thaw> and C<freeze> Moose classes using Storable. It
uses C<Storable::nfreeze> by default so that it can be easily used
in IPC scenarios across machines or just locally.
+=for stopwords Storable's
+
One important thing to note is that this module does not mix well
with the IO modules. The structures that C<freeze> and C<thaw> deal with
are Storable's memory representation, and (as far as I know) that