develooper Front page | perl.perl5.porters | Postings from February 2015

Re: RFC: /w pattern modifier

Thread Previous | Thread Next
Karl Williamson
February 10, 2015 04:52
Re: RFC: /w pattern modifier
Message ID:
On 02/08/2015 07:31 PM, Ricardo Signes wrote:
> * Karl Williamson <> [2015-02-08T00:51:58]
>> It has now occurred to me that a lot of existing \b uses really would work
>> better if they were \b{wb}.  And that can be accomplished without having to
>> change every occurrence, by instead having a pattern modifier flag, which
>> could be in a 'use re "/w"' which says treat plain \b as \b{wb} in its
>> scope.
> I agree with your first sentence.
> Is your thinking that people...
> * will want to use /w
> * want some way of changing the behavior in all regexes in some scope
> * specifically want "use re '/w'" rather than just the above generically

I'm thinking the latter.  But I could be wrong.  In any event, I think 
it's too late for 5.22.

The use-case I was think of was someone using plain \b when they really 
wanted \b{wb} in a program.  But they could just do a global 
substitution and be done with it.

> I feel like Perl may soon be suffering from flag fatigue.

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