http://qs1969.pair.com?node_id=377980


in reply to Re: Nested runtime warning disabling
in thread Nested runtime warning disabling

Thanks. I tried out Hook::LexWrap
use Hook::LexWrap; sub test_warnings { my $lexical = wrap 'GenerateWarning', pre => sub { no warnings }; GenerateWarning(); AnotherSub(); }
This does produce the result I was looking for, but I agree it is a little hackish.

Does anyone have a more elegant solution?