[cgiapp] Problem with Flash, Session & persistent environment identified

Richard Jones ra.jones at dpw.clara.co.uk
Fri Nov 21 07:05:47 EST 2008


If Ron can make a working demo with CAP::Flash :) ..

Starting out with the bare minimum (no login, no authentication, direct 
use of $dbh, etc), I get the flash messages displaying under mod_cgi, 
but not under CA::Server unless I session->flush in teardown.

use base qw(Titanium);
use CGI::Application::Plugin::TT;
use CGI::Application::Plugin::Flash;

Startmode() sets some flash messages then re-directs to function1() to 
display the template.

Removing Titanium and substituting CGI::Application as the superclass 
was the key to getting the flash messages displayed under CA::Server 
without needing session->flush. Yay!!

Then, bringing back all the plugins that Titanium uses one by one until 
it broke again, CAP::ErrorPage is the one responsible. Presumably there 
is something in there that causes the session to be retained in a 
persistent env?

It's possible that one of the Titanium mods is also causing the failure 
of AutoRunmode to work under mod_perl for me, but that's another issue.
--
Richard Jones


More information about the cgiapp mailing list