
andrew at cleverdomain
Nov 16, 2009, 2:39 PM
Post #1 of 2
(164 views)
Permalink
|
|
[Patch] Add warnings::fatal_enabled
|
|
While reviewing the upcoming _Effective Perl Programming_ I came upon a comment in the warnings section that while there is a warnings::enabled to test whether a given category bit is enabled in the caller, there's no equivalent to tell whether a given warning category has been set FATAL. This bugs me for the sake of symmetry, if nothing else, but it might occasionally be sensible to do some sort of special cleanup if the warnings::warn you're about to do is going to die. So please find attached a patch to create a C<warnings::fatal_enabled> to restore the symmetry. And please go easy, I've never sent a patch here before :) Thanks, Andrew
|