warnings have lexical scope, so
no warnings; sub test_warnings { GenerateWarning(); AnotherSub(); } sub AnotherSub { GenerateWarning(); }
also, may be this code be useful for you
sub test_warnings { local $SIG{__WARN__} = sub {}; GenerateWarning(); AnotherSub(); }
In reply to Re: Nested runtime warning disabling
by ccn
in thread Nested runtime warning disabling
by kryten
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |