CGI:Application "error"by neptuneray (Sexton)
|on Nov 15, 2012 at 17:02 UTC||Need Help??|
neptuneray has asked for the
wisdom of the Perl Monks concerning the following question:
I have a CGI:Application running on Apache/mod_perl. Everything works, except when I get any sort of error. The application terminates with a 500 code, and I get the following message:
"Can't locate object method 'error' via package "Template::Exception" at /usr/local/lib .../CGI/Application/Dispatch.pm line 438."
In my Setup sub (where Run Modes are defined), I am setting "$app->error_mode('error')", and then I have my own sub named "error" in that module.
Is it me that is doing something wrong, or is this an internal module error that I have no control over?
Oh, and one more thing ...
In my own error sub, I am trying to use the $app object to call "tt_process" to display my error template.
Possibly I don't have access to the $app object?
In reading the docs, I see that I only get $@ passed.
Does this mean I get to write directly to the client (an otherwise no-no in CGI:Apps)?
Thanks much, Ray