in reply to Re^3: Disabling runtime warnings in dynamic scope?
in thread Disabling runtime warnings in dynamic scope?
... and a local $^W = $my_bits doesn't change them at runtime for scopes further down ...
What do you mean? This works fine:
use strict; my $lasthash = { lastfunc => sub { last ; }, } ; sub lastfunc { last ; } sub test { # local ($^W) = 1 ; # Activate this line to display the warnings while(1) { lastfunc } ; while(1) { $lasthash->{lastfunc}->(); } ; } test() ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Disabling runtime warnings in dynamic scope?
by LanX (Saint) on Apr 26, 2018 at 13:13 UTC | |
by LanX (Saint) on Apr 26, 2018 at 14:02 UTC |