Posted on 2007-01-19 00:47:10-08 by tomtom
Session expiry- Issues
I have the following code in my Athentication handler.
my $session = new CGI::Session() or die CGI::Session -> errstr; $session = new CGI::Session(undef, undef, {Directory => '../tmp/sessions'});
I just wanted to know How to cleanup the sessions inside the ../tmp/sessions folder. Will the files get deleted as part of the session expiry. Also if we instantiate $session like this, Is it all right to have following statements that is is_expired or is_empty with context to the above
if ( $session->is_expired ) { ## die "Your session is expired. Please refresh your browser to re-start your session"; $session = $session->new(); } if ( $session->is_empty ) { $session = $session->new(); }
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.