Bisecting this was a bit tricky, but the results are that the regression was accidentally introduced in 6432a58, reported as RT#131930, and fixed in 823ba44 - the bug should therefore only exist in Perl releases v5.26.*.

#!/usr/bin/env perl use warnings; use strict; use Data::Dumper; $Data::Dumper::Useqq=1; # Run from the perl5 source tree: # $ ./Porting/bisect.pl --start=v5.24.0 --end=v5.26.3 -- + ./perl -Ilib /path/to/this.pl # => 6432a58ad9a504c2dc834eb0d131a10b4b6c886b # $ ./Porting/bisect.pl --start=v5.26.0 --end=v5.28.2 --expect-fail -- + ./perl -Ilib /path/to/this.pl # => 823ba440369100de3f2693420a3887a645a57d28 open my $ofh, '>', '/tmp/testdb.pl' or die $!; print $ofh <<'END_SCRIPT'; #!/bin/perl -w use strict; $_ = shift // ''; # line 3 s{a([bc])} # 4 {d$1}g; # 5 print; # 6 END_SCRIPT close $ofh; unlink('/tmp/test.listing'); local $ENV{PERLDB_OPTS} = "NonStop AutoTrace LineInfo=/tmp/test.listin +g"; system($^X,'-Ilib','-d','/tmp/testdb.pl')==0 or die "\$?=$?"; my $o = do { open my $fh, '<', '/tmp/test.listing' or die $!; local $/ +; <$fh> }; my $x = $o =~ /^main::\([^)]+\.pl:5\):\s+{d\$1}g;\s+#\s+5\s*$/m; # goo +d my $y = $o =~ /^main::\([^)]+\.pl:6\):\s+print;\s+#\s+6\s*$/m; # goo +d my $z = $o =~ /^main::\([^)]+\.pl:5\):\s+print;\s+#\s+6\s*$/m; # bad if ( $x && $y && !$z ) { print "GOOD\n"; exit 0; } elsif ( !$x && !$y && $z ) { print "BAD\n"; exit 1; } else { print STDERR Dumper($o,$x,$y,$z); die "What?"; }

In reply to Re: Debugger line numbering anomaly by haukex
in thread Debugger line numbering anomaly by lzipin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.