in reply to Nested runtime warning disabling
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(); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Nested runtime warning disabling
by kryten (Scribe) on Jul 26, 2004 at 21:34 UTC |