"Mark A. Fuller" <[EMAIL PROTECTED]> wrote on 10/08/2006 02:24:57
PM:
> Oh yeah. :) I've seen that before but it didn't register with me. I
> just looked at the source for C::A and realize it wraps eval around
> the execution of the run mode. So, doing what I suggested (put an
> eval around the run method) would mostly duplicate what's already
happening.
It wouldn't be an exact duplicate. Wrapping the run() in an eval {} would
actually catch MORE as it would be in effect for most of the hooks (and
plugins?) as well. I'm currently using error_mode() pretty
extensively[1], but eval {}ing the run() would be more thorough. It
depends on your application structure.
[1] And I completely agree; I think die()ing in arbitrary places in your
application with a central error handler is a clean way of doing error
handling. CGI::App has changed my approach to constructing web
applications significantly.
Todd
---------------------------------------------------------------------
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]