[Israel.pm] Bug in debugger?

Peter Gordon peter at pg-consultants.com
Thu Jun 11 23:38:16 PDT 2009

Running Perl 5.10 on Linux I get different errors depending on whether
I am using the debugger or not. Why is the debugger giving
incorrect/useless errors?

#! /usr/bin/perl

use strict ;
use warnings ; 

open($f,"aaa") ;

Run without debugger
perl  /tmp/a.pl
Global symbol "$f" requires explicit package name at /tmp/a.pl line 6.
Execution of /tmp/a.pl aborted due to compilation errors.

Run with debugger:
perl  -d /tmp/a.pl

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

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

BEGIN not safe after errors--compilation aborted
at /usr/lib/perl5/5.10.0/Carp/Heavy.pm line 11.
Compilation failed in require at /usr/lib/perl5/5.10.0/Carp.pm line 33.
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.  

More information about the Perl mailing list