[Catalyst-commits] r9133 - in trunk/Catalyst-Plugin-Session-Store-FastMmap: . lib/Catalyst/Plugin/Session/Store t

karpet at dev.catalyst.perl.org karpet at dev.catalyst.perl.org
Wed Jan 28 20:13:41 GMT 2009


Author: karpet
Date: 2009-01-28 20:13:41 +0000 (Wed, 28 Jan 2009)
New Revision: 9133

Modified:
   trunk/Catalyst-Plugin-Session-Store-FastMmap/Changes
   trunk/Catalyst-Plugin-Session-Store-FastMmap/lib/Catalyst/Plugin/Session/Store/FastMmap.pm
   trunk/Catalyst-Plugin-Session-Store-FastMmap/t/01use.t
   trunk/Catalyst-Plugin-Session-Store-FastMmap/t/basic.t
Log:
bump version; fix storage config bug; add some debugging help; clean up test files

Modified: trunk/Catalyst-Plugin-Session-Store-FastMmap/Changes
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-FastMmap/Changes	2009-01-28 16:59:16 UTC (rev 9132)
+++ trunk/Catalyst-Plugin-Session-Store-FastMmap/Changes	2009-01-28 20:13:41 UTC (rev 9133)
@@ -2,6 +2,8 @@
         - die when Cache::FastMmap::set() returns false value (RT #33667)
         - patch from ton.voon at altinity.com to pass unlink_on_exit option
           to Cache::FastMmap
+        - correctly set storage path from config rather than default - karman
+        - clean up temp files after tests
 
 0.05    16 Jan 2008
         - removed all Module::Build cruft - karman

Modified: trunk/Catalyst-Plugin-Session-Store-FastMmap/lib/Catalyst/Plugin/Session/Store/FastMmap.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-FastMmap/lib/Catalyst/Plugin/Session/Store/FastMmap.pm	2009-01-28 16:59:16 UTC (rev 9132)
+++ trunk/Catalyst-Plugin-Session-Store-FastMmap/lib/Catalyst/Plugin/Session/Store/FastMmap.pm	2009-01-28 20:13:41 UTC (rev 9133)
@@ -16,7 +16,7 @@
 use File::Spec      ();
 use Catalyst::Utils ();
 
-our $VERSION = '0.05';
+our $VERSION = '0.06_01';
 
 __PACKAGE__->mk_classdata(qw/_session_fastmmap_storage/);
 
@@ -114,15 +114,19 @@
     my $dir = Path::Class::file($file)->parent;
 
     unless (-d $dir) {
-        $dir->mkpath;
+        $dir->mkpath($c->debug);
     }
 
+    if ($c->debug) {
+        $c->log->debug("Session Store file: $file");
+    }
+
     my $cfg = $c->config->{session};
 
     $c->_session_fastmmap_storage(
         Cache::FastMmap->new(
             raw_values  => 0,
-            share_file  => $cfg->{storage},
+            share_file  => ($file . ''),  # force serialize in case it is a Path::Class object
             (
                 map { $_ => $cfg->{$_} }
                   grep { exists $cfg->{$_} } qw/init_file cache_size unlink_on_exit/

Modified: trunk/Catalyst-Plugin-Session-Store-FastMmap/t/01use.t
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-FastMmap/t/01use.t	2009-01-28 16:59:16 UTC (rev 9132)
+++ trunk/Catalyst-Plugin-Session-Store-FastMmap/t/01use.t	2009-01-28 20:13:41 UTC (rev 9133)
@@ -2,3 +2,5 @@
 use Test::More tests => 1;
 
 BEGIN { use_ok('Catalyst::Plugin::Session::Store::FastMmap') }
+
+diag("testing Catalyst::Plugin::Session::Store::FastMmap version $Catalyst::Plugin::Session::Store::FastMmap::VERSION");

Modified: trunk/Catalyst-Plugin-Session-Store-FastMmap/t/basic.t
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-FastMmap/t/basic.t	2009-01-28 16:59:16 UTC (rev 9132)
+++ trunk/Catalyst-Plugin-Session-Store-FastMmap/t/basic.t	2009-01-28 20:13:41 UTC (rev 9133)
@@ -8,6 +8,7 @@
 
 use Catalyst::Plugin::Session::Test::Store (
     backend => "FastMmap",
+    config  => { storage => File::Temp::tempdir( 'sessionstoretestXXXX', CLEANUP => 1 ) },
     extra_tests => 1
 );
 




More information about the Catalyst-commits mailing list