On 25 September 2015 at 19:03, Victor ADAM <perlbug-followup@perl.org> wrote: > # New Ticket Created by Victor ADAM > # Please include the string: [perl #126185] > # in the subject line of all future correspondence about this issue. > # <URL: https://rt.perl.org/Ticket/Display.html?id=126185 > > > > This is a bug report for perl from victor.adam@derpymail.org, > generated with the help of perlbug 1.40 running under perl 5.23.4. > > > ----------------------------------------------------------------- > [Please describe your issue here] > > How to reproduce > ---------------- > >> perl5.23.4 -e '/(?-p)/p; print defined for ${^MATCH}, ${^PREMATCH}, ${^POSTMATCH}' > > Expected behavior > ----------------- > > Perl should die with the following diagnostic: > >> Regexp modifier "p" may not appear after the "-" in regex; marked by <-- HERE in m/(?-p <-- HERE )/ at -e line 1. I dont know that I agree that Perl should die. We warn instead: $ ./perl -we'qr/(?-p)foo/' Useless use of (?-p) in regex; marked by <-- HERE in m/(?-p <-- HERE )foo/ at -e line 1. Given the mild consequences of this type of mistake I think warnings are sufficient. Unless someone strongly disagrees I would like to close this ticket as "wont fix". Thanks for the report though! Yves YvesThread Previous | Thread Next