gphat's undef patch
Yuval Kogman [Fri, 13 Jan 2006 18:30:45 +0000 (18:30 +0000)]
Changes
lib/Catalyst/Plugin/Session.pm

diff --git a/Changes b/Changes
index 74fb89c..02918f8 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Perl extension Catalyst::Plugin::Session
 
+0.06
+        - Set sessionid only if unset, allowing State plugins to stack (gphat)
+
 0.05     
         - Un-workaround the Cache::FastMmap (actually Storable) limitation -
           it's not C::P::Session's business.
index 67934d5..f54cd60 100644 (file)
@@ -245,6 +245,10 @@ sub sessionid {
     my $c = shift;
 
     if (@_) {
+        if($c->_sessionid()) {
+            $c->log->warn('Session ID already set, ignoring.');
+            return $c->_sessionid();
+        }
         if ( $c->validate_session_id( my $sid = shift ) ) {
             $c->_sessionid($sid);
             return unless defined wantarray;