Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by Trimbach (Curate)
on Apr 09, 2003 at 19:55 UTC ( #249391=note: print w/replies, xml ) Need Help??


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";
yields
bash-2.05a$ perl test.pl syntax error at test.pl line 7, near "asfgafhafh print" Execution of test.pl 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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://249391]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (2)
As of 2021-10-22 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (85 votes). Check out past polls.

    Notices?