[Catalyst-commits] r11505 - in Catalyst-Plugin-Session-Store-File/trunk: . lib/Catalyst/Plugin/Session/Store

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Thu Oct 8 22:32:02 GMT 2009


Author: rafl
Date: 2009-10-08 22:32:02 +0000 (Thu, 08 Oct 2009)
New Revision: 11505

Modified:
   Catalyst-Plugin-Session-Store-File/trunk/Makefile.PL
   Catalyst-Plugin-Session-Store-File/trunk/lib/Catalyst/Plugin/Session/Store/File.pm
Log:
Port to new session config key.

Modified: Catalyst-Plugin-Session-Store-File/trunk/Makefile.PL
===================================================================
--- Catalyst-Plugin-Session-Store-File/trunk/Makefile.PL	2009-10-08 22:08:17 UTC (rev 11504)
+++ Catalyst-Plugin-Session-Store-File/trunk/Makefile.PL	2009-10-08 22:32:02 UTC (rev 11505)
@@ -12,7 +12,7 @@
 requires 'Class::Data::Inheritable'  => '0.04';
 requires 'Catalyst::Runtime'         => '5.7000';
 requires 'Cache::Cache'              => '1.02'; # for Cache::FileCache
-requires 'Catalyst::Plugin::Session' => '0.21';
+requires 'Catalyst::Plugin::Session' => '0.27';
 requires 'MRO::Compat' => '0.10';
 
 test_requires 'Test::More';

Modified: Catalyst-Plugin-Session-Store-File/trunk/lib/Catalyst/Plugin/Session/Store/File.pm
===================================================================
--- Catalyst-Plugin-Session-Store-File/trunk/lib/Catalyst/Plugin/Session/Store/File.pm	2009-10-08 22:08:17 UTC (rev 11504)
+++ Catalyst-Plugin-Session-Store-File/trunk/lib/Catalyst/Plugin/Session/Store/File.pm	2009-10-08 22:32:02 UTC (rev 11505)
@@ -22,7 +22,7 @@
 
     use Catalyst qw/Session Session::Store::File Session::State::Foo/;
 
-    MyApp->config->{session} = {
+    MyApp->config->{'Plugin::Session'} = {
         storage => '/tmp/session'
     };
 
@@ -88,16 +88,16 @@
     my $c = shift;
     return if $c->_session_file_storage;
 
-    $c->config->{session}{namespace} ||= '';
-    my $root = $c->config->{session}{storage} ||=
+    $c->_session_plugin_config->{namespace} ||= '';
+    my $root = $c->_session_plugin_config->{storage} ||=
       File::Spec->catdir( Catalyst::Utils::class2tempdir(ref $c),
         "session", "data", );
 
-    $root = $c->path_to($root) if $c->config->{session}{relative};
+    $root = $c->path_to($root) if $c->_session_plugin_config->{relative};
 
     Path::Class::dir($root)->mkpath;
 
-    my $cfg = $c->config->{session};
+    my $cfg = $c->_session_plugin_config;
     $c->_session_file_storage(
         Cache::FileCache->new(
             {
@@ -116,7 +116,7 @@
 
 =head1 CONFIGURATION
 
-These parameters are placed in the hash under the C<session> key in the
+These parameters are placed in the hash under the C<Plugin::Session> key in the
 configuration hash.
 
 =over 4




More information about the Catalyst-commits mailing list