in reply to dying in the wrong place while using CGI::Carp
You might want to try using confess() instad of die to see what is happening in more detail:
use CGI::Carp qw( confess fatalsToBrowser ); foo( 'Hello', 'Carp' ); sub foo { &bar }; sub bar { &baz } sub baz { confess "Confessing I was called with @_\n" } __DATA__ Content-type: text/html <H1>Software error:</H1> <PRE>Confessing I was called with Hello Carp main::baz called at C:\PROGRA~1\PERLBU~1\debug\spbdtest.cgi line 8 main::bar called at C:\PROGRA~1\PERLBU~1\debug\spbdtest.cgi line 7 main::foo('Hello', 'Carp') called at C:\PROGRA~1\PERLBU~1\debug\sp +bdtest.cgi line 5 </PRE> <P> For help, please send mail to this site's webmaster, giving this error + message and the time and date of the error.
cheers
tachyon
|
|---|