[Catalyst] restore session manually

Charlie Garrison garrison at zeta.org.au
Mon Jul 5 09:10:27 GMT 2010


Good evening,

On 5/07/10 at 8:47 AM +0200, Bernhard Bauch <bauch at zsi.at> wrote:

>yes i already thought about using Session::State::URI  for this problem.
>but i don't want to enable State::URI for the rest of the app.
>it is just this one action that needs to restore the session from the parameter.

I don't find having Session::State::URI enabled for the whole 
app to be a problem. What is your concern about having it? If 
it's because of the URL rewriting, then just add 
no_rewrite_if_cookie to your session config.

>i'd like fake a session restore, like State::URI does from the param, or State::Cookie from the cookie value..

Rather than re-inventing the wheel, copy what 
Session::State::URI (or Session::State::Cookie) does for 
restoring the session. Or just subclass Session::State::URI and 
make it a noop for all except a couple of selected actions.


Charlie

-- 
    Ꮚ Charlie Garrison ♊ <garrison at zeta.org.au>

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
〠  http://www.ietf.org/rfc/rfc1855.txt



More information about the Catalyst mailing list