[cgiapp] Graceful Error Handling in CGI::App (compile / init stages)

2010-07-07 Thread Mike Tonks
Hi All, I've just had the pleasure of a couple of colleagues trying to install our CGI::Application based project, and realised I could improve the basic error messages displayed to the user at this stage. Common errors are: 1) So and so CPAN module is not found 2) Config file not found

Re: [cgiapp] Graceful Error Handling in CGI::App (compile / init stages)

2010-07-07 Thread Michael Peters
On 07/07/2010 05:16 AM, Mike Tonks wrote: 1) So and so CPAN module is not found 2) Config file not found (ConfigAuto - in cgiapp_init) currently these produce an ugly 500 Server Error and loeave you searching in the apache log for the problem. For 1) is there a better way than: use

Re: [cgiapp] Graceful Error Handling in CGI::App (compile / init stages)

2010-07-07 Thread P Kishor
On Wed, Jul 7, 2010 at 8:43 AM, Michael Peters mpet...@plusthree.com wrote: On 07/07/2010 05:16 AM, Mike Tonks wrote: 1) So and so CPAN module is not found 2) Config file not found (ConfigAuto - in cgiapp_init) currently these produce an ugly 500 Server Error and loeave you searching in

Re: [cgiapp] Graceful Error Handling in CGI::App (compile / init stages)

2010-07-07 Thread Peter Karman
Michael Peters wrote on 7/7/10 8:43 AM: It's verbose, but the only thing I know of is: BEGIN { eval { require Data::Dumper; Data::Dumper::import() }; die Can't find Data::Dumper module: $@ if $@; } repeated for each one. or my @modules = qw( Data::Dumper ); for my $mod

Re: [cgiapp] Graceful Error Handling in CGI::App (compile / init stages)

2010-07-07 Thread Jerry Kaidor
On 07/07/2010 05:16 AM, Mike Tonks wrote: It's verbose, but the only thing I know of is: Btw, it's not a good idea to show detailed error messages on your website. *** Concur. I get a lot of mileage out of Sys::Syslog. It's easy to get your logging done to a separate file just for your