develooper Front page | perl.perl5.porters | Postings from February 2013

[perl #116206] [PATCH] Add regcomp.c warnings support to diagnostics.pm/splain

From:
Father Chrysostomos via RT
Date:
February 10, 2013 22:36
Subject:
[perl #116206] [PATCH] Add regcomp.c warnings support to diagnostics.pm/splain
Message ID:
rt-3.6.HEAD-27190-1360535768-725.116206-15-0@perl.org
On Thu Dec 27 08:30:52 2012, public@khwilliamson.com wrote:
> On 12/26/2012 01:03 PM, Matthew Horsfall (via RT) wrote:
> > # New Ticket Created by  Matthew Horsfall
> > # Please include the string:  [perl #116206]
> > # in the subject line of all future correspondence about this issue.
> > # <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=116206 >
> >
> >
> > This is a bug report for perl from WolfSage@gmail.com,
> > generated with the help of perlbug 1.39 running under perl 5.10.1.
> >
> >
> > -----------------------------------------------------------------
> > [Please describe your issue here]
> >
> > t/porting/diag.t was not aware of any warnings generated by regcomp.c's
> > macros.
> >
> > I've added support for the ckWARN-style macros in regcomp.c as well as
> > the vWARN macros.
> >
> > I've updated a number of pod/perldiag.pod entries to now match correctly
> > as well as allowed t/porting/diag.t to match things like %*.*s smarter.
> >
> > The one thing I'm not entirely sure of is the warning severities for
those
> > in regcomp.c. From the attached patch:
> > +    my $severity = !$routine                   ? '[PFX]'
> > +                 :  $routine =~ /warn.*_d\z/   ? '[DS]'
> > +                 :  $routine =~ /warn/         ? '[WDS]'
> > +                 :  $routine =~ /ckWARN\d*reg/ ? '[WDS]'
> > +                 :  $routine =~ /vWARN\d/      ? '[WDS]'
> > +                 :                             '[PFX]';
> >
> > But aside from that I'm happy with it.
> >
> > Thanks,
> >
> > -- Matthew Horsfall (alh)
> >
> 
> Thanks, applied as b33c0c7199fc122a21f9e2338c8a0284ae9de754
> 
> I believe the severities are correct.

Actually, ckWARNreg is always W, and ckWARNregdep and ckWARNdep are
always D, so I have changed them in commit 3cfe9c806f5.

In fact, the existing logic (which I originally put in) for
Perl_ck_warner could be improved, so I did that in the same commit (q.v.
for details).

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: resolved
https://rt.perl.org:443/rt3/Ticket/Display.html?id=116206



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