Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Import pragmas like strict and warnings into callers lexical scope

by youwin (Beadle)
on Feb 11, 2011 at 22:35 UTC ( [id://887696]=note: print w/replies, xml ) Need Help??


in reply to Re: Import pragmas like strict and warnings into callers lexical scope
in thread Import pragmas like strict and warnings into callers lexical scope

Is it special that Perl restores $^H at the end of the enclosing block? Like could I write an import statement that does the same with a different global variable ($main::G for instance)?
  • Comment on Re^2: Import pragmas like strict and warnings into callers lexical scope

Replies are listed 'Best First'.
Re^3: Import pragmas like strict and warnings into callers lexical scope
by ikegami (Patriarch) on Feb 11, 2011 at 23:12 UTC
    It's special to $^H and %^H, but %^H was created to give you access to that behaviour
    $^H{'mypragma'} = ...;
    $^H{'mypragma::G'} = ...;

Log In?
Username:
Password:

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

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

    No recent polls found