in reply to Re: Nested runtime warning disabling
in thread Nested runtime warning disabling
Thanks. I tried out Hook::LexWrap
This does produce the result I was looking for, but I agree it is a little hackish.use Hook::LexWrap; sub test_warnings { my $lexical = wrap 'GenerateWarning', pre => sub { no warnings }; GenerateWarning(); AnotherSub(); }
Does anyone have a more elegant solution?
|
---|
In Section
Seekers of Perl Wisdom