develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #117135] v5.17.9-80-g9f351b4 breaksSARTAK/Path-Dispatcher-1.04.tar.gz

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
May 3, 2013 16:17
Subject:
Re: [perl #117135] v5.17.9-80-g9f351b4 breaksSARTAK/Path-Dispatcher-1.04.tar.gz
Message ID:
20130503161714.GI2216@iabyn.com
On Fri, Mar 15, 2013 at 05:19:49PM +0100, demerphq wrote:
> On 15 March 2013 17:03, Ricardo Signes <perl.p5p@rjbs.manxome.org> wrote:
> > Anyway, I had a look into this.  Regardless of where /p and (?p: belong, I
> > think something else is up.
> >
> > For example, you gave us this program:
> >
> >   perl -le'"abcdcba"=~ /(?p:[abcd](?{ print ${^MATCH} }))+/'
> >
> > That prints 7 blank lines since 5.17.4, inclusive.  With /p, it works.  I don't
> > think is exactly covered by Dave M.'s summary above about the "$& always
> > available," because there is no post-5.17.4 version in which the code prints
> > anything without the "p" flag.  Or, if it's related to the "bug with /p" that
> > he mentioned, it seems substantially different than the problem he
> > demonstrated.
> 
> This is a regression. It should definitely print out stuff. I cant say
> what caused the regression, but it is one.

(it bisects to 2c7b5d7698f).

But looking at the issue now, I think there's a bigger problem with
(?p:...) generally.  Which if any of the following behaviours do people
think is wrong?


"a" =~ /(?p)a/ or die; print "[${^MATCH}]\n";

    5.17.3: [a]
    5.17.4: [a]

"a" =~ /(?p:a)/ or die; print "[${^MATCH}]\n";

    5.17.3: []
    5.17.4: []

"a" =~ /(?p)a(?{ print "[${^MATCH}]\n" })/ or die;

    5.17.3: [a]
    5.17.4: [a]

"a" =~ /(?p:a(?{ print "[${^MATCH}]\n" }))/ or die;

    5.17.3: [a]
    5.17.4: []





-- 
In economics, the exam questions are the same every year.
They just change the answers.

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