in reply to Disabling runtime warnings in dynamic scope?
Is it possible to disable a certain warning in the dynamic scope?
Which scope is dynamic here? All scopes here are determined at compile time.
but maybe there is a cleaner solution?
The most obvious clean solutions are
{ no warnings 'exiting'; switch [1,2,3] => sub { print "bla" ; next}, 3 => sub { print "bla2" } for (3); }
or
switch [1,2,3] => sub { print "bla" ; { no warnings 'exiting'; next } }, 3 => sub { print "bla2" } for (3);
or even
sub goNext { no warnings 'exiting'; next } switch [1,2,3] => sub { print "bla" ; goNext }, 3 => sub { print "bla2" } for (3);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Disabling runtime warnings in dynamic scope?
by LanX (Saint) on Apr 26, 2018 at 09:09 UTC | |
by shmem (Chancellor) on Apr 26, 2018 at 09:51 UTC | |
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 | |
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 |