Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: How do you get around the lexical scoping of use pragmas? (import)by tye (Sage) |
on Aug 27, 2006 at 05:49 UTC ( [id://569862]=note: print w/replies, xml ) | Need Help?? |
Note that use strict boils down to
So strict->import() actually applies to the lexical scope one step outside of from where import() was called (or something like that). So, the following actually works:
Then:
Gives:
And diagnostics.pm isn't lexically scoped (and I'm not sure why people even use it, to be quite frank), so you can just "use diagnostics" inside your common.pm file. - tye
In Section
Seekers of Perl Wisdom
|
|