Skip Menu |

This queue is for tickets about the Devel-TraceCalls CPAN distribution.

Report information
The Basics
Id: 15716
Status: open
Worked: 15 min
Priority: 0/
Queue: Devel-TraceCalls

People
Owner: cosimo [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.04
Fixed in: (no value)



Subject: perl -d:TraceCalls fails
I can't seem the -dTraceCalls syntax to get work. I created a script named script.pl with the following contents: #!/usr/bin/perl -w sub foo { print "foo\n"; } sub bar { print "bar\n"; } foo(); bar(); foo(); __END__ When running $ perl5.8.7 -d:TraceCalls=Subs,foo,bar script.pl (as in the SYNOPSIS) I get: Subroutine main::Subs not defined at script.pl line 10 With perl 5.8.0 I get another error: $ perl5.8.0 -d:TraceCalls=Subs,foo,bar script.pl No DB::DB routine defined at /usr/perl5.8.0/lib/site_perl/5.8.0/Devel/TraceCalls.pm line 357. BEGIN failed--compilation aborted at /usr/perl5.8.0/lib/site_perl/5.8.0/Devel/TraceCalls.pm line 357. Compilation failed in require. BEGIN failed--compilation aborted. Tests for the -d:Tracecalls synatx would be nice, too. Regards, Slaven
[SREZIC - Fri Nov 11 15:47:17 2005]: Show quoted text
> I can't seem the -dTraceCalls syntax to get work. > I created a script named script.pl with the following contents: > > #!/usr/bin/perl -w > sub foo { > print "foo\n"; > } > > sub bar { > print "bar\n"; > } > > foo(); > bar(); > foo(); > __END__ > > When running > $ perl5.8.7 -d:TraceCalls=Subs,foo,bar script.pl > (as in the SYNOPSIS) I get: > Subroutine main::Subs not defined at script.pl line 10
It seems that: perl "-d:TraceCalls { Subs => ['foo','bar'] }" script.pl does what you want. Show quoted text
> With perl 5.8.0 I get another error: > $ perl5.8.0 -d:TraceCalls=Subs,foo,bar script.pl > No DB::DB routine defined at > /usr/perl5.8.0/lib/site_perl/5.8.0/Devel/TraceCalls.pm line 357.
No idea on this one. Can you indicate your version of debugger of perl 5.8.0 dist? Show quoted text
> Tests for the -d:Tracecalls synatx would be nice, too.
Sure. -- Cosimo
From: srezic [...] cpan.org
[COSIMO - Mon Nov 14 12:23:04 2005]: Show quoted text
> [SREZIC - Fri Nov 11 15:47:17 2005]: >
[...] Show quoted text
>
> > With perl 5.8.0 I get another error: > > $ perl5.8.0 -d:TraceCalls=Subs,foo,bar script.pl > > No DB::DB routine defined at > > /usr/perl5.8.0/lib/site_perl/5.8.0/Devel/TraceCalls.pm line 357.
> > No idea on this one. Can you indicate your version > of debugger of perl 5.8.0 dist? >
The version of perl5db.pl is 1.19 Regards, Slaven
From: w.c.humann [...] arcor.de
Just ran into the same problem: Show quoted text
> No DB::DB routine defined at [...]/Devel/TraceCalls.pm line 357.
Found this: http://groups.google.com/group/perl.perl5.porters/browse_thread/thread/f87c305dc06150e0 Looks like many Devel::* modules have this problem with 5.8.0. The easiest fix seems to be the one used in http://search.cpan.org/src/AEPAGE/Devel-ptkdb-1.1091/ptkdb.pm: Put a dummy "sub DB::DB {}" near the top of the file, to be overridden later by the 'real' sub. (Using just "sub DB {}" as in ptkdb.pm did not work for me)