in reply to CGI::Application/HTML::Template error handling

I haven't played with CGI::Application enough, but i would attempt to override the load_tmpl() method. However, instead of wrapping in eval, i would first check to see if the template truly exists (a simple -f and/or -r test should do the trick).

If the template does exist, then call

$self->SUPER::load_tmpl($tmpl_file, @extra_params);
(i suppose you could also just pass @_ instead).

If it doesn't exist, then call
$self->SUPER::load_tmpl('404.tmpl', @extra_params);
where 404.tmpl is your canned '404 Not found' response.

Hope this helps.

jeffa

L-LL-L--L-LL-L--L-LL-L--
-R--R-RR-R--R-RR-R--R-RR
B--B--B--B--B--B--B--B--
H---H---H---H---H---H---
(the triplet paradiddle with high-hat)