[Catalyst-commits] r11554 - in Catalyst-Plugin-Session-Store-Memcached/trunk: . lib/Catalyst/Plugin/Session/Store

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Fri Oct 16 14:33:52 GMT 2009


Author: rafl
Date: 2009-10-16 14:33:51 +0000 (Fri, 16 Oct 2009)
New Revision: 11554

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

Modified: Catalyst-Plugin-Session-Store-Memcached/trunk/Makefile.PL
===================================================================
--- Catalyst-Plugin-Session-Store-Memcached/trunk/Makefile.PL	2009-10-16 13:37:04 UTC (rev 11553)
+++ Catalyst-Plugin-Session-Store-Memcached/trunk/Makefile.PL	2009-10-16 14:33:51 UTC (rev 11554)
@@ -1,9 +1,9 @@
 use inc::Module::Install 0.87;
-    
+
 license 'perl';
 name    'Catalyst-Plugin-Session-Store-Memcached';
 all_from 'lib/Catalyst/Plugin/Session/Store/Memcached.pm';
-requires 'Catalyst::Plugin::Session' => 0.01;
+requires 'Catalyst::Plugin::Session' => '0.26';
 requires 'Cache::Memcached::Managed';
 requires 'MRO::Compat';
 

Modified: Catalyst-Plugin-Session-Store-Memcached/trunk/lib/Catalyst/Plugin/Session/Store/Memcached.pm
===================================================================
--- Catalyst-Plugin-Session-Store-Memcached/trunk/lib/Catalyst/Plugin/Session/Store/Memcached.pm	2009-10-16 13:37:04 UTC (rev 11553)
+++ Catalyst-Plugin-Session-Store-Memcached/trunk/lib/Catalyst/Plugin/Session/Store/Memcached.pm	2009-10-16 14:33:51 UTC (rev 11554)
@@ -25,17 +25,19 @@
 =head1 SYNOPSIS
 
     use Catalyst qw/ Session Session::Store::Memcached Session::State::Foo /;
-    
-    MyApp->config->{session} = {
-        memcached_new_args => {
-            # L<Cache::Memcached::Managed/new>
-            'data' => [ "10.0.0.15:11211", "10.0.0.15:11212" ],
+
+    MyApp->config(
+        'Plugin::Session' => {
+            memcached_new_args => {
+                # L<Cache::Memcached::Managed/new>
+                'data' => [ "10.0.0.15:11211", "10.0.0.15:11212" ],
+            },
+            memcached_item_args => {
+                # L<Cache::Memcached::Managed/set>, get, delete
+                # ...
+            },
         },
-        memcached_item_args => {
-            # L<Cache::Memcached::Managed/set>, get, delete
-            # ...
-        },
-    };
+    );
 
     # ... in an action:
     $c->session->{foo} = 'bar';    # will be saved
@@ -106,7 +108,7 @@
 
     $c->maybe::next::method(@_);
 
-    my $cfg = $c->config->{session};
+    my $cfg = $c->_session_plugin_config;
 
     my $appname = "$c";
 
@@ -131,7 +133,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