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'} = ...;