in reply to Re^2: Disabling runtime warnings in dynamic scope?
in thread Disabling runtime warnings in dynamic scope?
Only lexical aka static scopes.
Eg local has a dynamic scope.
<edit>
Because of LanX answer below:
Well, local
has no scope at all - it just masks a (package) global at runtime until the localizing goes out of (lexical) scope, but that's just nitpicking at wording perhaps. See also my/local, space/time (was: Re: The difference between my and local).
local has a static scope. Localized variables have a dynamic scope.
</edit>
But here you answered the question for yourself. The warning bits are compiled into each lexical scope at compile time, and a local $^W = $my_bits doesn't change them at runtime for scopes further down.
So there are two possibilities:
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Disabling runtime warnings in dynamic scope?
by Veltro (Hermit) on Apr 26, 2018 at 12:52 UTC | |
by LanX (Saint) on Apr 26, 2018 at 13:13 UTC | |
by LanX (Saint) on Apr 26, 2018 at 14:02 UTC | |
|
Re^4: Disabling runtime warnings in dynamic scope?
by LanX (Saint) on Apr 26, 2018 at 09:58 UTC | |
by QM (Parson) on Apr 26, 2018 at 11:37 UTC | |
by LanX (Saint) on Apr 26, 2018 at 11:55 UTC |