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

Re: [perl #109798] '/e' regexp modifier is not recognized by re pragma

Thread Previous | Thread Next
From:
demerphq
Date:
February 5, 2012 09:40
Subject:
Re: [perl #109798] '/e' regexp modifier is not recognized by re pragma
Message ID:
CANgJU+U2YS4h37+hUM1t11tbQiOPnz8ygEapaBkMph7rFwO0eQ@mail.gmail.com
On 5 February 2012 11:56, Tom Christiansen <tchrist@perl.com> wrote:
>
> Eric Brine <ikegami@adaelis.com> wrote
>   on Sat, 04 Feb 2012 23:54:37 EST:
>
>> You removed "g" and "c", but they are accepted in patterns:
>
>>>perl -wcE"qr/(?c:foo)/;"
>>Useless (?c) - use /gc modifier in regex; marked by <-- HERE in m/(?c <--
>>HERE :foo)/ at -e line 1.
>>-e syntax OK
>
>>>perl -wcE"qr/(?g:foo)/;"
>>Useless (?g) - use /g modifier in regex; marked by <-- HERE in m/(?g <--
>>HERE :foo)/ at -e line 1.
>>-e syntax OK
>
>>I don't know why that is.
>
> I removed them because they are non-sensical, and I consider it a bug
> that they are accepted but whined about as pattern operators.

Why? You think throwing a fatal is preferred? They do nothing, they
have no affect.

>>If anything is misleading is that they are listed as pattern modifiers
>>(which are listed in perlre) instead of operator modifiers (which are
>>listed in perlop).
>
> Something else that's misleading is having to look in two different
> places for those things.

Yes agreed.

Yves


-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

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