Keep It Simple, Stupid | |
PerlMonks |
Re^4: Backdating strictby jcb (Parson) |
on Nov 20, 2020 at 02:49 UTC ( [id://11123868]=note: print w/replies, xml ) | Need Help?? |
No, code brought in with use or require is its own top-level lexical scope. Explained differently, lexical scopes do not cross file boundaries in Perl; the loading mechanism is not a preprocessor. If this were not so, the common convention of making use strict; the first statement in a script would also apply strict to all library modules, but this does not happen.
In Section
Seekers of Perl Wisdom
|
|