Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Well, that's interesting. You're absolutely correct, but it seems odd to me that anything would get compiled before the use CGI::Carp is compiled, except maybe other use declarations or the contents of BEGIN blocks, since use is automatically placed in an implicit BEGIN block.

A little experimentation reveals that perl throws syntax errors even before compilation really begins (or, at least before BEGIN blocks. This is implied in the Camel, where it says that "the Perl compiler reads through your entire program source before execution start." I guess when they say that BEGIN blocks execute as soon as possible they mean AFTER a syntax check, 'cause before that, it isn't possible. :-)

I guess this makes sense... if perl can't parse the program it has to give up without executing anything... but it does make catching syntax errors in a CGI environment (no error-log, FTP only) problematic. I guess the alternative is to install Perl on your local machine and do all your syntax checks locally.

Gary Blackburn
Trained Killer


In reply to Re: Re^2: use CGI::Carp qw(fatalsToBrowser); (is compile-time) by Trimbach
in thread use CGI::Carp qw(fatalsToBrowser); by Heidegger

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2021-12-02 16:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (22 votes). Check out past polls.

    Notices?