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

RE: New regex modifier flags

Thread Previous | Thread Next
From:
Jan Dubois
Date:
August 3, 2010 17:53
Subject:
RE: New regex modifier flags
Message ID:
004f01cb336f$6524ad40$2f6e07c0$@activestate.com
On Tue, 03 Aug 2010, karl williamson wrote:
> 
> The problem is what those modifiers should be.  Perl currently allows a
> keyword to come right after a regex, like '/abc/lt 1'

Is there are comprehensive list of all potential conflicts?  Or is
/lt the only one relevant to the canonical choices of new modifiers?
This one could be rewritten as /tl if you really wanted them to be
modifiers, although I thought the combination of /l and /t would
be invalid anyways.

> Another possibility is to just not distinguish these mutually exclusive
> options from regular options.  They would all be lower case.  The
> standard Unix philosophy of "last option on the line overrides all
> previous conflicting ones" would apply.

That feels weird to me, given that multiple /e options on s///
cause the replacement to be evaluated multiple times (the
s/foo/bar/eieio inspired feature).

> 6) Use single letter lower case option letters implemented in such a way
> that until 5.16 ambiguities are resolved to the existing
> interpretations.  The option letters are not visibly distinguished from
> options that aren't mutually exclusive.  After the deprecation cycle in
> 5.14, there won't be these ambiguities.  My vote goes to this one.

I like this one too, especially if the number of cases that need to
be mapped to the existing implementation is really low.

Cheers,
-Jan


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