in reply to State-keeping modules

We have been using Apache::Session for a few months now and for some reason we are running into a fairly persistent problem: the session->DESTROY method isn't being called automatically all the time (only sometimes) so any time we start running into session issues, we have to throw a tied(%$sess)->DESTROY(); call. The symptoms: variables seem to randomly fail to get recorded to the session or deleted from the session when the script is finished running. The other programmer I work with thinks it's our convoluted scripts confusing perl's garbage collector.

Replies are listed 'Best First'.
Re^2: State-keeping modules
by TedYoung (Deacon) on Mar 02, 2005 at 22:04 UTC

    I, very often, have the same problem with CGI::Session (which will flush on DESTROY if you haven't done it explicitly). In my case too it is likely something I have done else where. I just have found it easier to explicitly flush the session at the end of the request, than to debug what I am doing.

    Ted Young

    ($$<<$$=>$$<=>$$<=$$>>$$) always returns 1. :-)
Re^2: State-keeping modules
by shenme (Priest) on Mar 03, 2005 at 02:06 UTC
    To amplify on TedYoung's reply, this mentions doing the flush manually, just to be sure.