Subject: | Adding "use Devel::Caller::Perl;" to a script causes "perl -d" to execute the entire script |
Using Devel::Caller::Perl causes the debugger to execute a script
without ever breaking. Rather than stopping at the first line of
executable code, it continues to the end of the script and then exits.
I have attached two simple scripts, they both do the same thing (print 3
lines one after the other). One "uses" Devel::Caller::Perl, the other
does not.
"perl -d debug_works.pl" breaks at the first "print"
"perl -d debug_does_not_work.pl" all three prints get printed and the
debugger exits.
$ perl -v
This is perl, v5.8.8 built for i486-linux-gnu-thread-multi
Copyright 1987-2006, Larry Wall
$ uname -a
Linux tungsten 2.6.15.5karma_test #5 PREEMPT Mon Mar 6 18:41:11 GMT 2006
i686 GNU/Linux
Subject: | debug_does_not_work.pl |
#!/usr/bin/perl
use Devel::Caller::Perl;
print "print 1\n";
print "print 2\n";
print "print 3\n";
Subject: | debug_works.pl |
#!/usr/bin/perl
#use Devel::Caller::Perl;
print "print 1\n";
print "print 2\n";
print "print 3\n";