http://qs321.pair.com?node_id=460216


in reply to Re^4: having problems w/CGI-Session
in thread having problems w/CGI-Session

Thank you, I like being mistaken in that way :)

You might want to consider using CGI::Application::Plugin::Session. All that code you have could be boiled down to the following:
use CGI::Application::Plugin::Session; my %options = ( Directory => "/ctrlacc/lhdsurv/session/mid_yr_rpt_survey" ); $self->session_config( CGI_SESSION_OPTIONS => [ undef, $self->query, \%options ], SEND_COOKIE => 1, );
and it would be more readable. I typically throw that in the cgiapp_init() method of my CGI::Application base class, but if you wanted to throw it in it's own function it's probably alright.

And I've never had any luck setting expiration times with CGI::Session. They never work for me. Either don't expire the cookie, or set it to expire as soon as the browser closes.

Good luck, I hope this helps!
MrCromeDome