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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.