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

Ron Savage ron at savage.net.au
Fri Nov 21 15:03:59 EST 2008


Hi Mark

On Fri, 2008-11-21 at 13:02 -0500, Mark Stosberg wrote:
> On Fri, 21 Nov 2008 13:09:24 +0000
> Richard Jones <ra.jones at dpw.clara.co.uk> wrote:
> 
> > Richard Jones wrote:
> > 
> > [..]
> > 
> > > 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?
> > 
> > Just found another one: CAP::DebugScreen

Another fine achievement.

So, my policy of using a minimum number of plugins, to minimize
complexity, has been paying off all along, without me realizing what
dangers I have actually avoided. Scary.

> Is there a way we could better update the documenation around these issues?

Yeah, we need to think about this.

In summary, I'm more and more convinced now that CGI::Session has not
been at fault, but design faults (yes, bugs) in other modules create
circular references, which in turn cause symptoms making it look like
CGI::Session is at fault.

But - as always - these are symptoms, and the underlying reason - again,
as always - needs to be determined. And this process seems to have done
that.

As for docs, we can include a warning in the docs for CGI::Session, but
keep in mind the authors/maintainers of CGI::Session are not responsible
for the bugs in other modules.

And by that I mean it's not up to us to do something to CGI::Session to
fix these other problems, or even do something in the code to pre-empt
them.

However, a doc patch for CGI::Session (I'll draft something today, it's
7am here now) can definitely warn people about these symptoms, and which
tools to use to investigate.

> For example I see now that "DebugScreen" does not document that it registers a
> global "DIE" signal handler.

OK, that's a doc problem, but is it a code problem? Or are you just
thinking the docs need to be amended?

> Even though it's only meant to run in development that does seem worth 
> alerting people about.
> 
> I also wonder about the benefits and drawbacks of converting DebugScreen
> to use error_mode().... it would be able to catch fewer errors in that case,
> bout would avoid the global DIE signal handler. 

Is that also something to include in the doc patch for CGI::Session?
-- 
Ron Savage
ron at savage.net.au
http://savage.net.au/index.html




More information about the cgiapp mailing list