[Israel.pm] getting both compilation error and uninitializederrors

Yossi Itzkovich Yossi.Itzkovich at ecitele.com
Thu May 3 20:20:08 EEST 2007


Thanks,
Indeed the warnings were of a used module, and then came the syntax
errors in the main script

Yossi 

-----Original Message-----
From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
Behalf Of Gaal Yahas
Sent: Thursday, May 03, 2007 7:48 PM
To: Perl in Israel
Subject: Re: [Israel.pm] getting both compilation error and
uninitializederrors

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/
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://perl.org.il/mailman/listinfo/perl




More information about the Perl mailing list