in reply to Re: Re: VI VI VI - the number of the beast
in thread VI VI VI - the number of the beast

And strict should have been inherited from the calling script.
I don't know if you meant that seriously... Apologies if this post is unnecessary.

strict is a lexical pragma, which means that affects only the rest of the enclosing scope, either block or file. So, use strict in the main script will not affect loaded modules, and vice versa.

Imagine if it didn't work that way... after putting use strict in your script, you wouldn't be able to use any modules which weren't strict-safe!

  • Comment on Re: Re: Re: VI VI VI - the number of the beast

Replies are listed 'Best First'.
Re: Re: Re: Re: VI VI VI - the number of the beast
by jepri (Parson) on May 05, 2001 at 20:21 UTC
    No apologies needed, you caught me in a brain-slip moment.

    As it happens, the second line was use strict, and when I interchanged them:

    orange:/usr/lib/cgi-bin/perl# perl -w event_dates.pl Uncaught exception from user code: Uncaught exception from user code: Uncaught exception from user code: Can't locate object method "Package" via package "Common_event +" at Common_event.pm line 2. require Common_event.pm called at event_dates.pl line 16 main::BEGIN() called at Common_event.pm line 0 eval {...} called at Common_event.pm line 0 main::BEGIN() called at Common_event.pm line 16 eval {...} called at Common_event.pm line 16 BEGIN failed--compilation aborted at event_dates.pl line 16.

    I don't think that there was anything I could have reasonably done to get more protection from a problem like that.

    ____________________
    Jeremy
    I didn't believe in evil until I dated it.