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

Re: [perl #126185] /(?-p)/ should be an error

Thread Previous | Thread Next
From:
Victor ADAM
Date:
October 7, 2015 20:02
Subject:
Re: [perl #126185] /(?-p)/ should be an error
Message ID:
CAATTT4UP2X0z2NZTvA-0K6tTGdS31UnS8xx8=q+wPHENej_DDQ@mail.gmail.com
> I think that the consequences are mild, so it was the right design decision to be a warning.

In that case we should fix all the equivalent but inconsistent errors:
/(?-a)/ dies with “Regexp modifier "a" may not appear after the "-" in
regex; marked by <-- HERE in m/(?-a <-- HERE )/ at -e line 1.”

Unless I’m missing something, the two are essentially the same, and
should thus have the same behavior. Having /(?-a)/ die but /(?-p)/
warn doesn’t sound like a “right design decision” to me.

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