Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

Re^5: CGI::Session keeps re-using same session ID

by Anonymous Monk
on May 04, 2012 at 20:30 UTC ( #968980=note: print w/replies, xml ) Need Help??

in reply to Re^4: CGI::Session keeps re-using same session ID
in thread CGI::Session keeps re-using same session ID

Is it me, or is the documentation for CGI::Session severely misleading?

It's not just you, though at the moment, I can't judge if it is misleading

The latest version, which is what I read, says

If called without any arguments, $dsn defaults to driver:file;serializer:default;id:md5, $query||$sid defaults to CGI->new(), and \%dsn_args defaults to undef.

That isn't strictly true as it defaults to CGI->new whenever the second argument is undef

At the moment, I've no idea how that could be improved :) patches welcome

However, you probably would not have run into this if you weren't implementing your own login logic error :) as "Basic cookie management " teaches , you set one cookie per browser ( brand-the-browser , associate sessionid with browser)

Later, for login, you update some session data (username, login status )

Later, for logout, you delete the entire session, and delete the cookie

Or you could even, Later, for logout, keep the cookie (and session alive), but delete some session data (delete username, login status )...

  • Comment on Re^5: CGI::Session keeps re-using same session ID

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://968980]
[Corion]: Of course, the query performance for "all items on page 10" is likely worse than rank() between 100 and 109 , but if that means I can write 15 lines of SQL instead of needing to think about how to partition things and how to encode the page size...
[Corion]: ... that would be nice. But alas, I'm currently tied to SQLite as minimum implementation, and it doesn't implement window functions :-(
[Corion]: And I'm not aware of any other serverless SQL implementation that even reaches the capability of SQLite, not to mention surpasses it

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (10)
As of 2018-03-22 12:21 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (274 votes). Check out past polls.