Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Perl: porters

[Patch] Add warnings::fatal_enabled

 

 

Perl porters RSS feed   Index | Next | Previous | View Threaded


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
Attachments: 0002-Add-tests.patch (1.58 KB)
  0001-Add-code-and-starting-perldoc-for-warnings-fatal_ena.patch (2.03 KB)


rgs at consttype

Nov 24, 2009, 4:56 AM

Post #2 of 2 (123 views)
Permalink
Re: [Patch] Add warnings::fatal_enabled [In reply to]

2009/11/16 Andrew Rodland <andrew [at] cleverdomain>:
> 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, look good ! both patches applied. I also now bumped
$warning::VERSION in bleadperl.

Perl porters RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.