Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Re: Triggering 'strict' from within a package

by kal (Hermit)
on Aug 12, 2002 at 15:14 UTC ( [id://189524]=note: print w/replies, xml ) Need Help??


in reply to Re: Triggering 'strict' from within a package
in thread Triggering 'strict' from within a package

Ah, you mean the package main; importer code :-)

Sadly not :) It will actually look at other stuff - such as @INC ordering - based on location (& other factors) also, so it will actually load different version of a module based on what environment the script is being run in.

Anyway, strict is a lexical pragma, so you cannot set at it for other files. I assume this was done to keep non-strict code working together with strict code

I had a horrible feeling something like that might be the case. Note, though, that it's not a case of turning it off, but more a case of not turning it on - it's just not useful in a lot of cases.

Cheers!

  • Comment on Re: Re: Triggering 'strict' from within a package

Replies are listed 'Best First'.
•Re: Re: Re: Triggering 'strict' from within a package
by merlyn (Sage) on Aug 12, 2002 at 17:15 UTC
    Note, though, that it's not a case of turning it off, but more a case of not turning it on - it's just not useful in a lot of cases.
    Describe "a lot of cases" where "it's just not useful". Either you're badly informed, or I am.

    (I can see the gallery taking side bets. {grin})

    -- Randal L. Schwartz, Perl hacker

      Either you're badly informed, or I am.

      This is what is known as an argument you can't win, I believe ;)

      Basically, as I said further down, we try to keep the Apache logs free for traffic analysis, which means diverting errors elsewhere. Also, we do have a lot of scripts which are either 'trivial' (small, or we don't care if they fall over) or 'old' - either of which aren't suitable for 'strict' (at least, not in my opinion). Since this package of mine is going to be global (I want all our scripts using it really), it's not really suitable to set strictness policy within it - it's a per-script thing.

      However, on a development server, it's not optional :-).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (4)
As of 2024-04-19 14:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found