0.03 release
[catagits/Web-Session.git] / lib / Plack / Session / Store / File.pm
index 0e5918d..2c15ea1 100644 (file)
@@ -2,6 +2,9 @@ package Plack::Session::Store::File;
 use strict;
 use warnings;
 
+our $VERSION   = '0.03';
+our $AUTHORITY = 'cpan:STEVAN';
+
 use Storable ();
 
 use parent 'Plack::Session::Store';
@@ -20,8 +23,8 @@ sub new {
     die "Storage directory (" . $params{'dir'} . ") is not writeable"
         unless -w $params{'dir'};
 
-    $params{'serializer'}   ||= sub { Storable::nstore( @_ ) };
-    $params{'deserializer'} ||= sub { Storable::retrieve( @_ ) };
+    $params{'serializer'}   ||= sub { Storable::lock_nstore( @_ ) };
+    $params{'deserializer'} ||= sub { Storable::lock_retrieve( @_ ) };
 
     bless { %params } => $class;
 }
@@ -124,7 +127,7 @@ Plack::Session::Store::File - Basic file-based session store
 
 This implements a basic file based storage for session data. By
 default it will use L<Storable> to serialize and deserialize the
-data, but this can be configured easily.
+data, but this can be configured easily. 
 
 This is a subclass of L<Plack::Session::Store> and implements
 it's full interface.
@@ -171,7 +174,7 @@ Stevan Little E<lt>stevan.little@iinteractive.comE<gt>
 
 =head1 COPYRIGHT AND LICENSE
 
-Copyright 2009 Infinity Interactive, Inc.
+Copyright 2009, 2010 Infinity Interactive, Inc.
 
 L<http://www.iinteractive.com>