Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: (jeffa) Re: require() turns off strict?

by hawtin (Prior)
on Jan 04, 2003 at 21:41 UTC ( [id://224318]=note: print w/replies, xml ) Need Help??


in reply to (jeffa) Re: require() turns off strict?
in thread require() turns off strict?

#define PEDANTIC_MODE 1

use strict only works in the current package

I think you meant to say "use strict only works in the current lexical scope" which is slightly different from the current package. It could be that the two files had stuff from the same package (eg the main one).

Update: Sorry I see that you have corrected that while I wasn't paying attention

Replies are listed 'Best First'.
Re: Re: (jeffa) Re: require() turns off strict?
by broquaint (Abbot) on Jan 06, 2003 at 14:48 UTC
    #ifdef PEDANTIC_MODE # include <limits.h> # define PEDANTIC_MODE INT_MAX #endif
    I think you meant to say "use strict only works in the current lexical scope" which is slightly different from the current package
    Nope, the current package holds for the length of the current lexical scope[1], which is usually the file-level lexical scope. See the docs for more info.
    HTH

    _________
    broquaint

    [1] although the 5.005 docs say it is dynamically scoped but I'm pretty sure it's lexically scoped because it takes effect at compile-time which isn't orthogonal with dynamically scoping

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://224318]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (6)
As of 2024-03-28 14:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found