On 2011-05-18, at 11:56 AM, David Precious wrote:
Also, you don't call $session->flush at any point to write the session contents to disc.
In theory, CGI::Session will implicitly flush the session when the $session object goes out of scope (which, in your example, will only be as the Dancer app exits); that isn't always reliable, however.
CGI::Session's own docs state:
"As a last resort, CGI::Session will automatically call flush for you just before the program terminates or session object goes out of scope. Automatic flushing has proven to be unreliable..."
This has bitten me on more than one occasion. If you want to be sure your changes are being saved, an explicit call to flush is a very good idea. Olaf -- Olaf Alders olaf@wundersolutions.com http://www.wundersolutions.com http://twitter.com/wundercounter 866 503 2204 (Toll free - North America) 416 944 8306 (direct)