develooper Front page | perl.perl5.porters | Postings from May 2010

Re: PATCH: [perl #58182] partial, "The Unicode Bug". Add unicodesemantics for \s, \w

Thread Previous | Thread Next
Steffen Mueller
May 19, 2010 00:57
Re: PATCH: [perl #58182] partial, "The Unicode Bug". Add unicodesemantics for \s, \w
Message ID:
Hi all,

Jan Dubois wrote:
> On Tue, 18 May 2010, Eric Brine wrote:
>> On Tue, May 18, 2010 at 4:04 PM, demerphq <> wrote:
>>> Basically we only have to worry about 'l' because of 'le', and 'f'
>>> because of 'if'. Any others?


>> Any of the following immediately following the delimiter are currently
>> valid, but will become a syntax error (e.g. /foo/le+1) or different valid
>> code (e.g. /foo/lt+1):
>>    - unless & until from /u
>>    - le & lt from /l
>>    - [none] from /t
>> We're precluded from using these:
>>    - /a (and)
>>    - /f (for, foreach)
>>    - /n (ne)
>>    - /w (when, while)

I think these are MUCH more likely to be a problem than the three above.

>> We don't have to worry about these:


> Yes, but why bother?  What is wrong with your previous suggestion to only allow
> the new modifiers after a
>     use 5.014;
> That lets us pick the letters based on mnemonic value instead of having to
> work around some obscure edge cases.  And the code using the new letters
> will not work on earlier Perl versions anyways, so having the "use 5.014"
> in there is a good idea anyways.

I couldn't agree more with this last paragraph.

> This will also allow to us to turn any currently unused modifiers into syntax
> errors right away for all 5.14+ code as well without breaking any compatibility.
> What's not to like?

Edge cases and action at a distance. Edges cases internally (with any 
such decision, we start maintaining to branches of behaviour in the same 
code base). Action at a distance in user code.

Of course, use VERSION is lexical, so this isn't action across 1M lines 
of code, but it may well be across a couple of thousands in a badly 
written application or module.

Don't get me wrong. I'd rather move forward and make behaviour 
conditional on the use VERSION at the top of the file than not move on 
at all. But I believe that this is a case of being overzealous regarding 
backwards compatibility.

So I guess overall, this is a +1 to any solution, with use VERSION or 


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About