develooper Front page | perl.perl5.porters | Postings from September 2010

[PATCH] improved means for registering warnings

Thread Next
From:
Ricardo Signes
Date:
September 8, 2010 14:18
Subject:
[PATCH] improved means for registering warnings
Message ID:
20100908211846.GA21245@cancer.codesimply.com

This patch was only testied against 5.12.2 because blead wasn't building for
me.  I think it will apply and work cleanly against blead.

I wanted to use warnings::register to make multiple categories of warnings for
my application, but it *only* registers new names based on the caller() of its
import routine.  Its guts are not modular and are tightly coupled to
warnings.pm's guts.

I've decoupled them by adding a warnings::register routine to warnings and
having 'use warnings::register' use that.

Additionally, you can now supply subcategories like this:

  use warnings::register qw(a b c d);

If the patch is applied, I'll commit tests and docs as well.

-- 
rjbs

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About