Subject: | Add a function for allow_warnings { block } |
I've recently switch to Test::Warnings from Test::NoWarnings, and now I'm doing search & destroy on tests that throw warnings.
It would be nice if I could do something like:
allow_warnings_in_this_block {
code(); code(); code();
};
I've been doing:
allow_warnings(1);
code();code();code();
allow_warnings(0);
or
my $ignore = warnings { code(); code(); };
and neither is very satisfying.