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

Re: RFC: New regex modifier flags; also the whimsical nature of backward compatibility; new 'r' flag has issues

Thread Previous | Thread Next
From:
Eric Brine
Date:
August 6, 2010 22:04
Subject:
Re: RFC: New regex modifier flags; also the whimsical nature of backward compatibility; new 'r' flag has issues
Message ID:
AANLkTi=w_AXqV9p07+FLoTwzeR5ZGiP8L8GAFTFYES6j@mail.gmail.com
On Fri, Aug 6, 2010 at 3:51 PM, karl williamson <public@khwilliamson.com>wrote:

> Even though /or and /xor are ambiguous, there really isn't a backward
> compatibility problem here.  I'm sorry I cast aspersions on it.  The reason
> there is no problem is that there was no pre-existing code that this made
> ambiguous. '/xor' or '/or' previously generated a syntax error.
>

I can't find a case where where "or" is ambiguous. "or" can't currently
follow a regex delimiter or modifier.

>perl -e"//or 1"
Bareword found where operator expected at -e line 1, near "//or"
        (Missing operator before r?)
Number found where operator expected at -e line 1, near "r 1"
        (Do you need to predeclare r?)
syntax error at -e line 1, near "//or "
Execution of -e aborted due to compilation errors.

>perl -e"//oor 1"
Bareword found where operator expected at -e line 1, near "//oor"
        (Missing operator before r?)
Number found where operator expected at -e line 1, near "r 1"
        (Do you need to predeclare r?)
syntax error at -e line 1, near "//oor "
Execution of -e aborted due to compilation errors.

>perl -e"//omor 1"
Bareword found where operator expected at -e line 1, near "//omor"
        (Missing operator before r?)
Number found where operator expected at -e line 1, near "r 1"
        (Do you need to predeclare r?)
syntax error at -e line 1, near "//omor "
Execution of -e aborted due to compilation errors.

>perl -e"//olor 1"
Bareword found where operator expected at -e line 1, near "//olor"
        (Missing operator before lor?)
Number found where operator expected at -e line 1, near "lor 1"
        (Do you need to predeclare lor?)
syntax error at -e line 1, near "//olor "
Execution of -e aborted due to compilation errors.

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