[Israel.pm] getting both compilation error and uninitialized errors

Gaal Yahas gaal at forum2.org
Thu May 3 19:48:12 EEST 2007


On 5/3/07, Yossi Itzkovich <Yossi.Itzkovich at ecitele.com> wrote:
> How can it be that when I run a script with syntax error, I get also
> warnings of uninitialized variables?  If I understand correctly if there
> is a syntax error no code will run so how come I get run-time warnings ?

Perl evaluates things at compile time:

* explicit BEGIN blocks
* modules loaded with use statements

In the case of modules, the code that gets run at compile time is the
module file-level, as well as its import routine if it exists. And, of
course, its own BEGIN and use thingies, recursively.

-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/



More information about the Perl mailing list