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

Re: RFC: What to do about warning: "Code point 0xFOO is not Unicode, all \\p{} matches fail; all \\P{} matches succeed"

Thread Previous | Thread Next
From:
Father Chrysostomos
Date:
September 13, 2013 19:54
Subject:
Re: RFC: What to do about warning: "Code point 0xFOO is not Unicode, all \\p{} matches fail; all \\P{} matches succeed"
Message ID:
20130913195432.6338.qmail@lists-nntp.develooper.com
Nicholas Clark wrote:
> On Fri, Sep 13, 2013 at 08:55:03AM -0000, Father Chrysostomos wrote:
> > The end result is that I have to money-patch warnings.pm to get
> > things to work.
> 
> I don't see why this follows either. If your code is using a construction
> which is documented to warn, and you know that the code in question is
> behaving as designed even with inputs that will warning, then the code should
> disable the warning.

If it’s a CPAN I don’t control, sometimes it’s less maintenance to
monkey-patch (no, not money-patch :-) warnings.pm before loading
the module.

> I fail to see why your argument about warnings from the regular expression
> engine doesn't generalise to any other class of warnings triggered by data
> at runtime, which is why I believe that it's not valid to single out the
> regular expression engine.

I suppose you are right.  It’s just that regular expressions are there
for looking at strings to see what they have in them, and it seems
more sane to me for looking at a string not to warn about the contents
of the string.


Thread Previous | 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