develooper Front page | perl.perl5.porters | Postings from March 2018

Re: [perl #131930] s [foo] \n [bar] confuses line numbers

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
March 7, 2018 09:36
Subject:
Re: [perl #131930] s [foo] \n [bar] confuses line numbers
Message ID:
20180307093616.GF3216@iabyn.com
On Mon, Sep 11, 2017 at 08:05:59AM +0100, Dave Mitchell wrote:
> On Sat, Aug 19, 2017 at 06:40:24PM -0700, Father Chrysostomos via RT wrote:
> > > #!/opt/perl/bin/perl
> > > 
> > > use 5.010;
> > > 
> > > say "This is line " . __LINE__;
> > > s [foo]
> > >   [bar];
> > > say "This is line " . __LINE__;
> > > 
> > > __END__
> > > 
> > > Now it gets the second line number wrong:
> > > 
> > > This is line 5
> > > This is line 7
> > 
> > perl5.24.2 is fine, so it was introduced some time between 5.24.0 and 5.26.0.
> 
> It bisects to this. I'll have a further look sometime.
> 
> 6432a58ad9a504c2dc834eb0d131a10b4b6c886b is the first bad commit
> commit 6432a58ad9a504c2dc834eb0d131a10b4b6c886b
> Author: David Mitchell <davem@iabyn.com>
> Date:   Thu Nov 10 21:38:30 2016 +0000
> 
>     Eliminate SVrepl_EVAL and SvEVALED()
>     
>     This flag is only used to indicate that the SV holding the text of the
>     replacement part of a s/// has seen at least one /e.
>     
>     Instead, set the IVX field in the SV to a true value.
>     (We already set the NVX field on that SV to indicate a multi-src-line
>     substitution).
>     

Now fixed with v5.27.9-124-g823ba44

-- 
Red sky at night - gerroff my land!
Red sky at morning - gerroff my land!
    -- old farmers' sayings #14

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