in reply to Re: CGI::Session flush() functions
in thread CGI::Session flush() functions

I think it actually tries to flush when the Session object goes out of scope. I believe it fails to flush only when the script dies unexpectedly.

UPDATE: No doubt. Explicitly flushing is better in every way. I was just saying that there are occasions where it will flush on its own, not terribly reliable, but they exist.

-Paul

Replies are listed 'Best First'.
Re^3: CGI::Session flush() functions
by moritz (Cardinal) on Aug 20, 2008 at 12:41 UTC
    Not only when it dies unexpectedly. I had a whole lot of cases of normal exits where it also failed to flush the session, which is why I recommend to always manually call $session->flush().

    The CGI::Session maintainers know of these problems, and encourage you to not rely on auto flushing.