in reply to Re^4: use CGI::Carp qw(fatalsToBrowser); (is compile-time)
in thread use CGI::Carp qw(fatalsToBrowser);

And here's my experiment:
#!/usr/bin/perl use CGI::Carp qw( fatalsToBrowser ); asfgafhafh print "Hello";
bash-2.05a$ perl syntax error at line 7, near "asfgafhafh print" Execution of aborted due to compilation errors. bash-2.05a$
...which is just lovely if you have command-line access, but doesn't do you a lick of good through a browser (you'll just get a Error 500) even though the syntax error occurs after the use.

Gary Blackburn
Trained Killer

Replies are listed 'Best First'.
Re^6: use CGI::Carp qw(fatalsToBrowser); (strange)
by tye (Sage) on Apr 10, 2003 at 16:02 UTC

    For me, that exact code results in:

    Content-type: text/html <H1>Software error:</H1> <CODE>syntax error at - line 7, near &quot;asdfasefasdf print&quot; Execution of - aborted due to compilation errors. </C0DE> <P> For help, please send mail to this site's webmaster, giving this error + message and the time and date of the error. [Thu Apr 10 09:01:20 2003] -: syntax error at - line 7, near "asfgafha +fh [Thu Apr 10 09:01:20 2003] -: [Thu Apr 10 09:01:20 2003] -: print" [Thu Apr 10 09:01:20 2003] -: Execution of - aborted due to compilatio +n errors.
    Perhaps you have a old/broken version of CGI::Carp? I'm using version 1.14.

                    - tye
      Well I might have a NEW/broken version of CGI::Carp. ;-) I'm using CGI::Carp version 1.24 on Perl 5.6.1 on Linux. I'll see if I can figure out what's going... it was certainly nice getting that whole Compile/Runtime thing straightened out, though. Thanks!

      Gary Blackburn
      Trained Killer