Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Problems getting session management to work: is_expired seems to lie to me

by Corion (Pope)
on May 06, 2013 at 21:13 UTC ( #1032400=note: print w/ replies, xml ) Need Help??


in reply to Problems getting session management to work: is_expired seems to lie to me

I don't see a call to ->flush() in your code. I don't use CGI::Session, but the documentation recommends doing so.


Comment on Re: Problems getting session management to work: is_expired seems to lie to me
Download Code
Re^2: Problems getting session management to work: is_expired seems to lie to me
by ted.byers (Scribe) on May 06, 2013 at 21:38 UTC

    Thanks, good catch. Alas, adding that to the end of my script changed nothing.

    Out of curiousity, is you do not use CGI::Session, what do you use for session management?

    Thanks

    Ted

      Currently I use Dancer with Dancer::Session.

      Also, your script is still very long and includes lots of unrelated stuff, like that try/catch stuff and HTML generation. I recommend ripping all that out to make the structure more obvious.

        Thanks

        I may take a look at Dancer later, if time permits.

        You call 30 lines of code long? I am used to real world applications that, taken together, involved as much as half a million lines of code. I guess that is a matter of perspective. In any event, the try/catch stuff can be easily deleted, but that leaves only an anchor to reinvoke the CGI script on the first access to it. Without some content on the page, you have no way to know, without accessing the server logs, whether or not the script worked. Further, the HTML generation is an essential part of using CGI to generate pages, and as I pointed out to the other fellow, I encountered problems with is_expired only in the context of the code actually running in a CGI script.

        Thanks

        Ted

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1032400]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2014-10-22 10:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (114 votes), past polls