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
karl williamson
May 24, 2010 06:15
Re: PATCH: [perl #58182] partial, "The Unicode Bug". Add unicodesemantics for \s, \w
Message ID:
Paul LeoNerd Evans wrote:
> On Thu, May 20, 2010 at 01:03:36PM +0100, Ben Morrow wrote:
>> Since there aren't any upper-case modifiers yet, it would be possible to
>> introduce the rule 'Upper-case modifiers take a single-character
>> argument' at this point. This would give a syntax like
>>     m/unicode    /Uugx;
>>     m/locale     /Ulgx;
>>     m/traditional/Utgx;
>> which seems at least as clear as three or four random letters that
>> happen to be mutually-exclusive.
> Oh, now I do like that. It has all the neatness of my suggestion, but
> with the added bonus that now we know that capitals take a sub-flag,
> which we should look at the next letter afterwards.
> Perhaps we could establish this as a general precident? I have no idea
> what this means
>  m/foo/AzTlxMvg
> but at least I can parse it as A=z, T=l, x=true, M=v, g=true

Somehow, I'm a little leery of this, but I can't put my finger on it. 
I'll wait a little longer to see what others may say.

One thing though if we do go this route, I think that U isn't as good a 
choice as maybe M for "matching mode", as Ul really isn't about Unicode: 
it is about locale.

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