Hi Cees,

> -----Original Message-----
> - you use exit() to short circuit the execution of the program.  In a CGI
> environment that will probably be OK, but in persistant environments that
> may cause problems.  I'm pretty sure that mod_perl overrides CORE::exit so
> that the program doesn't end, but I'm not so sure about FastCGI and 
> SpeedyCGI.  TO get around it would probably require a change to 
> CGI::Application though.

I was thinking that might be an issue -- but I haven't been able to find any
information that might say either way. As far as I can tell there's no way
to short-circuit a CGI::App in a "clean" way.

> - you have effectively hijacked the prerun and postrun methods which means
> they are unavailable to any sub/super classes.  This brings me back to my
> request from many months ago for the ability to register prerun and 
> postrun hooks so that you can have multiple prerun/postrun execution 
> points (patch available here:
> http://cees.crtconsulting.ca/perl/patches/CGI-Application-
> 3.21.callbacks.patch)
> .  As an interim solution you may want to include a comment in your docs
> that lets people know they need to add $self->SUPER::cgiapp_postrun to 
> their own custom cgiapp_postrun method if they use it (same for 
> cgiapp_prerun). Otherwise your cache code stops working.

Right. In order for these methods to be called automatically, I've had to
use pre-existing and possibly already overridden subs. Ideally I could just
tack on to the app flow, but that would require your patch. :)
 
> - Is there a specific reason you are using Data::Dumper to flatten the
> object? I would think that Storable would be a better choice, since it 
> removes the need for the 'eval'.  Not a big deal though.

No particular reason other than it was "there."

> - maybe a useful addition could be the ability to decide whether a runmode
> is cachable from within the runmode itself.  something like this would do:

Yeah, that seems like a more obvious approach. I'll add that in.

Thanks!

-Brian


http://www.gordano.com - Messaging for educators.

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to