X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=blobdiff_plain;f=lib%2FCatalyst%2FPlugin%2FSession%2FState%2FCookie.pm;h=f1aaa8db77161040e223de63fea64e4f55086380;hp=3d8bd1b7225322ea9cc0d71e79c5ea38b71f6c77;hb=19c2baa1eebb6a6d4d16d427c5e169f1efb5dfe2;hpb=5e50008f1cfc2adca19810a28c1680e0221f2492 diff --git a/lib/Catalyst/Plugin/Session/State/Cookie.pm b/lib/Catalyst/Plugin/Session/State/Cookie.pm index 3d8bd1b..f1aaa8d 100644 --- a/lib/Catalyst/Plugin/Session/State/Cookie.pm +++ b/lib/Catalyst/Plugin/Session/State/Cookie.pm @@ -6,6 +6,8 @@ use warnings; use NEXT; +our $VERSION = "0.01"; + sub setup_session { my $c = shift; @@ -34,6 +36,8 @@ sub finalize { sub prepare_cookies { my $c = shift; + my $ret = $c->NEXT::prepare_cookies(@_); + my $cookie_name = $c->config->{session}{cookie_name}; if ( my $cookie = $c->request->cookies->{$cookie_name} ) { @@ -42,7 +46,7 @@ sub prepare_cookies { $c->log->debug(qq/Found sessionid "$sid" in cookie/) if $c->debug; } - $c->NEXT::prepare_cookies(@_); + return $ret; } __PACKAGE__ @@ -76,7 +80,12 @@ Will restore if an appropriate cookie is found. =item finalize -Will set a cookie called C if it doesn't exist or if it's value is not the current session id. +Will set a cookie called C if it doesn't exist or if it's value is not +the current session id. + +=item setup_session + +Will set the C parameter to it's default value if it isn't set. =back