[Catalyst-commits] r8628 - in
trunk/Catalyst-Plugin-Session-Store-File: .
lib/Catalyst/Plugin/Session/Store
karpet at dev.catalyst.perl.org
karpet at dev.catalyst.perl.org
Sat Nov 22 14:40:49 GMT 2008
Author: karpet
Date: 2008-11-22 14:40:49 +0000 (Sat, 22 Nov 2008)
New Revision: 8628
Modified:
trunk/Catalyst-Plugin-Session-Store-File/Changes
trunk/Catalyst-Plugin-Session-Store-File/lib/Catalyst/Plugin/Session/Store/File.pm
Log:
fix for rt#27505
Modified: trunk/Catalyst-Plugin-Session-Store-File/Changes
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/Changes 2008-11-20 15:47:36 UTC (rev 8627)
+++ trunk/Catalyst-Plugin-Session-Store-File/Changes 2008-11-22 14:40:49 UTC (rev 8628)
@@ -1,5 +1,10 @@
Revision history for Perl extension Catalyst::Plugin::Session::Store::File.
+0.14 xxx
+ - defer creation of cache store until first time it is needed.
+ This should allow the plugin to work "out of the box" under mod_perl.
+ See https://rt.cpan.org/Ticket/Display.html?id=27505
+
0.13 16 Jan 2008
- remove Class::Accessor prereq
- further dist cleanups
Modified: trunk/Catalyst-Plugin-Session-Store-File/lib/Catalyst/Plugin/Session/Store/File.pm
===================================================================
--- trunk/Catalyst-Plugin-Session-Store-File/lib/Catalyst/Plugin/Session/Store/File.pm 2008-11-20 15:47:36 UTC (rev 8627)
+++ trunk/Catalyst-Plugin-Session-Store-File/lib/Catalyst/Plugin/Session/Store/File.pm 2008-11-22 14:40:49 UTC (rev 8628)
@@ -10,7 +10,7 @@
use Catalyst::Utils ();
use Path::Class ();
-our $VERSION = '0.13';
+our $VERSION = '0.14';
__PACKAGE__->mk_classdata(qw/_session_file_storage/);
@@ -54,16 +54,19 @@
sub get_session_data {
my ( $c, $sid ) = @_;
+ $c->_check_session_file_storage;
$c->_session_file_storage->get($sid);
}
sub store_session_data {
my ( $c, $sid, $data ) = @_;
+ $c->_check_session_file_storage;
$c->_session_file_storage->set( $sid, $data );
}
sub delete_session_data {
my ( $c, $sid ) = @_;
+ $c->_check_session_file_storage;
$c->_session_file_storage->remove($sid);
}
@@ -79,7 +82,12 @@
my $c = shift;
$c->NEXT::setup_session(@_);
+}
+sub _check_session_file_storage {
+ my $c = shift;
+ return if $c->_session_file_storage;
+
$c->config->{session}{namespace} ||= '';
my $root = $c->config->{session}{storage} ||=
File::Spec->catdir( Catalyst::Utils::class2tempdir($c),
More information about the Catalyst-commits
mailing list