Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

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/ --start=v5.24.0 --end=v5.26.3 -- + ./perl -Ilib /path/to/ # => 6432a58ad9a504c2dc834eb0d131a10b4b6c886b # $ ./Porting/ --start=v5.26.0 --end=v5.28.2 --expect-fail -- + ./perl -Ilib /path/to/ # => 823ba440369100de3f2693420a3887a645a57d28 open my $ofh, '>', '/tmp/' 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/')==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

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2022-01-20 07:18 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.