Hi Father Chrysostomos (and all),
On Sunday 12 Jun 2011 13:58:43 Father Chrysostomos wrote:
Shlomi Fish wrote:
Hi all!

This link - http://xrl.us/bjrpd2 is a github branch that contains a set
of some commits to add this to perl -d :


=item b [file]:[line] [condition]
X<debugger command, b>

Set a breakpoint before the given line in a (possibly different) file.
If a condition is specified, it's evaluated each time the statement is
reached: a breakpoint is taken only if the condition is true.
Breakpoints may only be set

on lines that begin an executable statement. Conditions don't use C<if>:
b lib/MyModule.pm:237 $x > 30
b /usr/lib/perl5/site_perl/CGI.pm:100 ++$count100 < 11


I promised this earlier and I did not completely forget about it.

I don't expect it to get in before perl-5.14.0 is, but it's there if
anyone is interested. Some of the "make test" fail but it seems to be a
problem with t/porting/cmp_version.t .
When I first tried applying this some time ago, all tests passed. Just now
when I tried merging it with blead, I got this failure:

$ cd t
$ ./perl TEST ../lib/perl5db.t
t/../lib/perl5db....# Failed at ../lib/perl5db.t line 199
# got 'In MyModule.
# In Main File.
# Var=
# '
# expected /(?^msx:
# ^Var=Bar$
# .*
# ^In\ MyModule\.$
# .*
# ^In\ Main\ File\.$
# .*
# )/
FAILED at test 10
Failed 1 test out of 1, 0.00% okay.

Is there any chance you could look into that? Just it case it was a mistake
in the way I applied it, attached is what I applied.
after some investigation, I realised the problem was that perl -d's
"breakpoint" functionality is completely broken on blead:


shlomif@lap:~/Download/unpack/perl/p5/git/perl$ cat test.pl

use strict;
use warnings;

print "Foo\n";

for my $x (1 .. 10)
print "Step $x\n";
shlomif@lap:~/Download/unpack/perl/p5/git/perl$ ./perl -d test.pl

Loading DB routines from perl5db.pl version 1.34
Editor support available.

Enter h or `h h' for help, or `man perldebug' for more help.

main::(test.pl:6): print "Foo\n";
DB<2270> l
6==> print "Foo\n";

8: for my $x (1 .. 10)
9 {
10: print "Step $x\n";
11 }
DB<2270> b 10
DB<2271> L
10: print "Step $x\n";
break if (1)
DB<2271> c
Step 1
Step 2
Step 3
Step 4
Step 5
Step 6
Step 7
Step 8
Step 9
Step 10
Debugged program terminated. Use q to quit or R to restart,
use o inhibit_exit to avoid stopping after program termination,
h q, h R or h o to get additional info.
DB<2271> q


This needs to be fixed with a few tests before applying my patch.
(BTW, I find it a lot easier to apply things if they are sent as attachments
to perlbug@perl.org.)
OK, I'll keep it in mind.


Shlomi Fish

Shlomi Fish http://www.shlomifish.org/
What does "Zionism" mean? - http://shlom.in/def-zionism

Lone Starr: "Just what we need - a Druish princess."
Barf: "Funny! She doesn't look Druish."
-- Spaceballs, http://www.imdb.com/title/tt0094012/

Please reply to list if it's a mailing list post - http://shlom.in/reply .

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupperl5-porters @
postedJun 12, '11 at 8:59p
activeJun 14, '11 at 3:35p



site design / logo © 2021 Grokbase