in reply to Nested runtime warning disabling
use Hook::LexWrap; sub test_warnings { my $lexical = wrap 'GenerateWarning', pre => sub { no warnings }; GenerateWarning(); AnotherSub(); } [download]
Does anyone have a more elegant solution?