in reply to Re^5: Disabling runtime warnings in dynamic scope?
in thread Disabling runtime warnings in dynamic scope?
use strict; use warnings; use Data::Dump qw/pp dd/; my ($before,$after); BEGIN { $before = ${^WARNING_BITS} } no warnings 'exiting'; BEGIN { $after = ${^WARNING_BITS} } my $diff = $before ^ $after; warn unpack ('B*',$diff); { use warnings; BEGIN { ${^WARNING_BITS} = $after }; # this only works at compile + time!!! sub test {last }; test(); }
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery
|
|---|