Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Triggering 'strict' from within a package

by runrig (Abbot)
on Aug 12, 2002 at 16:47 UTC ( #189544=note: print w/replies, xml ) Need Help??


in reply to Triggering 'strict' from within a package

After reading Abigail-II's answer and tye's answer, I looked in perlvar for $^H and found something almost identical to tye's answer:
BEGIN { require strict; strict->import('vars') if $condition } # which to import all restrictions would be BEGIN { require strict; strict->import if $condition }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://189544]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (3)
As of 2017-11-19 02:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (278 votes). Check out past polls.

    Notices?