develooper Front page | perl.perl5.porters | Postings from July 2012

[perl #113094] Keeping track of 'Unescaped left brace in regex is deprecated' was Re: [perl #114128] silence warnings in build and test

Thread Next
From:
Karl Williamson via RT
Date:
July 21, 2012 12:42
Subject:
[perl #113094] Keeping track of 'Unescaped left brace in regex is deprecated' was Re: [perl #114128] silence warnings in build and test
Message ID:
rt-3.6.HEAD-11172-1342899726-784.113094-15-0@perl.org
On 07/21/2012 11:44 AM, Robin Barker wrote:> I suggest this bug is
marked as resolved.
> The only warnings now come from cpan/ modules.
> [perl#113094] is tracking the \{ issue for CPAN modules.
> 

OK, moving it to the 113094

On 07/21/2012 07:51 AM, Dave Mitchell wrote:
> On Fri, Jul 20, 2012 at 08:35:27PM -0700, Reverend Chip wrote:
>> On 7/19/2012 10:15 AM, Karl Williamson wrote:
>>> 3) Consider this as acceptable collateral breakage, document it, and
>>> keep the warning for a cycle or two, after which we prohibit unescaped
>>> literal left brackets.
>>>
>>> The final possibility is only feasible if there is very little current
>>> breakage.
>>
>> My 2c: I think this is ideal, since stripping \ on {} in regexes seems
>> like something we should never have done in the first place.
> 
> Note that if we changed it so that escaped delimiters are no longer
> stripped, *all* the following regexes would change their meaning; the last
> three would become compile errors, while the first four would just
> silently start matching different things:
> 
>      qr[^\[a-z\]$]
> 
>      qr#  a
> 	 \#xxx
> 	 b
>      #x;
> 
>      qr(^\(x\)$);
> 
>      m?^xy\?$?
> 
>      qr!a(?\!b)!;
> 
>      qr<a(?\<foo\>b)>;
> 
>      qr|a(?\|foo)|;
> 

Correct me if I'm wrong, but I believe that the most encompassing change
would have breakages with if the delimiter is any of the dirty dozen
metacharacters, but no others.  Since '/' isn't one of the 12, there
should be no potential problems with it.

Obviously, if we decided to, we could restrict the change to just '{',
as that is the only one we care about now.  But that isn't aesthetically
pleasing.






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

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