[Catalyst-commits] r11547 - in
Catalyst-Plugin-Session-Store-FastMmap/trunk: .
lib/Catalyst/Plugin/Session/Store
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Fri Oct 16 13:13:36 GMT 2009
Author: rafl
Date: 2009-10-16 13:13:35 +0000 (Fri, 16 Oct 2009)
New Revision: 11547
Modified:
Catalyst-Plugin-Session-Store-FastMmap/trunk/Makefile.PL
Catalyst-Plugin-Session-Store-FastMmap/trunk/lib/Catalyst/Plugin/Session/Store/FastMmap.pm
Log:
Port to new session config key.
Modified: Catalyst-Plugin-Session-Store-FastMmap/trunk/Makefile.PL
===================================================================
--- Catalyst-Plugin-Session-Store-FastMmap/trunk/Makefile.PL 2009-10-16 13:07:17 UTC (rev 11546)
+++ Catalyst-Plugin-Session-Store-FastMmap/trunk/Makefile.PL 2009-10-16 13:13:35 UTC (rev 11547)
@@ -5,7 +5,7 @@
'VERSION_FROM' => 'lib/Catalyst/Plugin/Session/Store/FastMmap.pm',
'PREREQ_PM' => {
'Cache::FastMmap' => '1.29',
- 'Catalyst::Plugin::Session' => '0.22',
+ 'Catalyst::Plugin::Session' => '0.27',
'File::Spec' => '0',
'File::Temp' => '0',
'Path::Class' => '0',
Modified: Catalyst-Plugin-Session-Store-FastMmap/trunk/lib/Catalyst/Plugin/Session/Store/FastMmap.pm
===================================================================
--- Catalyst-Plugin-Session-Store-FastMmap/trunk/lib/Catalyst/Plugin/Session/Store/FastMmap.pm 2009-10-16 13:07:17 UTC (rev 11546)
+++ Catalyst-Plugin-Session-Store-FastMmap/trunk/lib/Catalyst/Plugin/Session/Store/FastMmap.pm 2009-10-16 13:13:35 UTC (rev 11547)
@@ -24,12 +24,14 @@
=head1 SYNOPSIS
use Catalyst qw/Session Session::Store::FastMmap Session::State::Foo/;
-
- MyApp->config->{session} = {
- expires => 3600,
- storage => '/tmp/session'
- };
+ MyApp->config(
+ 'Plugin::Session' => {
+ expires => 3600,
+ storage => '/tmp/session'
+ },
+ );
+
# ... in an action:
$c->session->{foo} = 'bar'; # will be saved
@@ -102,7 +104,7 @@
my $tmpdir = Catalyst::Utils::class2tempdir($c)
|| Catalyst::Exception->throw("Can't determine tempdir for $c");
- my $file = $c->config->{session}{storage} ||=
+ my $file = $c->_session_plugin_config->{storage} ||=
File::Spec->catfile( # Cache::FastMmap doesn't like Path::Class objects
$tmpdir,
"session_data",
@@ -118,7 +120,7 @@
$c->log->debug("Session Store file: $file");
}
- my $cfg = $c->config->{session};
+ my $cfg = $c->_session_plugin_config;
$c->_session_fastmmap_storage(
Cache::FastMmap->new(
@@ -146,15 +148,15 @@
L<Catalyst::Plugin::Session::PerUser>, for example.
As L<Cache::FastMmap> is not "thread-safe" (at least version 1.30 and before)
-therefore also this module does not work in multi-threaded enviroment.
-It is "fork-safe", however keep in mind that on Win32 the perl "fork" call is
+therefore also this module does not work in multi-threaded enviroment.
+It is "fork-safe", however keep in mind that on Win32 the perl "fork" call is
implemented as an emulation via threads - that is the reason why you cannot use
-this store for example when running you catalyst application on Win32 platform
-with L<Catalyst::Engine::HTTP::Prefork> engine.
+this store for example when running you catalyst application on Win32 platform
+with L<Catalyst::Engine::HTTP::Prefork> engine.
=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