delay loading all optional prereqs until runtime
[gitmo/MooseX-Storage.git] / lib / MooseX / Storage / Format / Storable.pm
index 3e5815e..c1ee936 100644 (file)
@@ -1,21 +1,19 @@
 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) );
 }
 
@@ -57,10 +55,14 @@ MooseX::Storage::Format::Storable - A Storable serialization role
 
 =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