develooper Front page | perl.perl5.porters | Postings from December 2009

Re: PATCH: partial [perl #58182]: regex case-sensitive matchingnow utf8ness independent

Thread Previous
From:
Zefram
Date:
December 9, 2009 13:10
Subject:
Re: PATCH: partial [perl #58182]: regex case-sensitive matchingnow utf8ness independent
Message ID:
20091209210958.GG11402@fysh.org
demerphq wrote:
>First, the problem of qr// raises its head. You construct a pattern
>one context with your new pragma in effect, and then embed it in
>another pattern somewhere else and the magicness of the pattern is
>lost.

Or vice versa, of course.  This means that for a pattern to be freely
embeddable you need to avoid all the constructs whose behaviour depend
on the pragma.  This is no worse than the current situation, where you
need to avoid those constructs because they're broken, but for that class
of situation it's no better either.  And how many people are actually
going to think about the pragma when they write their exportable regexps?

The existence of a pragma with this class of effects is a problem.  I also
don't think we should be supporting buggy behaviour by any mechanism.
The old behaviour isn't just legacy, it's a bug, and any code that
invokes it is buggy.  Please just fix the bug, don't bless it.

-zefram

Thread Previous


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