develooper Front page | perl.perl5.porters | Postings from April 2017

Re: [perl #130497] Revert "Unescaped left brace in regex" fatality

Thread Previous | Thread Next
From:
Karl Williamson
Date:
April 6, 2017 21:52
Subject:
Re: [perl #130497] Revert "Unescaped left brace in regex" fatality
Message ID:
55246cf1-fd9e-3957-c674-853ae6e8b2b3@khwilliamson.com
On 04/06/2017 02:36 PM, Karl Williamson via RT wrote:
> Reopened
>

Think about the following a little before doing a knee-jerk "No".

What if we put in a kludge so that it remained fatal except when 
compiling the exact single pattern that autoconf uses?  It is

	/\${[^\}]*}/

Thus, when we are about to die, we check if the pattern attempting to be 
compiled is this exact one, and if so, merely warn.

It is the one way I can think of that keeps us from being held hostage 
to this lackadaisical alien project for who knows how many more Decembers.

What are the downsides?

1.   It is inelegant
2.   It is inelegant
3.   It is inelegant
  ...
n-1. It is inelegant
n.   Any other code that has this exact pattern would compile instead of 
not.  But so what?  This particular pattern would not be affected by any 
of the proposed changes that making this illegal would allow.  They are, 
so far,

a. to be able to say \w{something}
b. to be able to have white space and a missing lower bound in {...} 
quantifiers.

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