develooper Front page | perl.perl5.porters | Postings from December 2011

[perl #34489] noTTY=1 AutoTrace=1 cause problems

James E Keenan via RT
December 2, 2011 16:51
[perl #34489] noTTY=1 AutoTrace=1 cause problems
Message ID:
On Sat Mar 19 02:24:27 2005, wrote:
> This is a bug report for perl from,
> generated with the help of perlbug 1.35 running under perl v5.8.6.
> I try to start Perl debugger as follows and get runtime error:
> $ PERLDB_OPTS="noTTY=1 AutoTrace=1" perl -dS -e1
> Can't use an undefined value as a symbol reference at
>    /usr/lib/perl5/ line 5378.
>  at /usr/lib/perl5/ line 5378
>         DB::print_lineinfo('main::(-e:1):\x{9}1\x{a}') called at
>    /usr/lib/perl5/ line 2087        DB::DB called at -e line
>    1
> $
> Note that each option taken apart does not expose the problem:
> $ PERLDB_OPTS="noTTY=1" perl -dS -e1
> $ PERLDB_OPTS="AutoTrace=1" perl -dS -e1
> Loading DB routines from version 1.28
> Editor support available.
> ...

When I used Perl 5.14.2 to run code very close to that provided by the
original poster, I got the same failure:

$ PERLDB_OPTS="noTTY=1 AutoTrace=1" perl -d -e 'print qq{hello world\n};'
Can't use an undefined value as a symbol reference at
/usr/local/lib/perl5/5.14.2/ line 5403.
 at /usr/local/lib/perl5/5.14.2/ line 5403
        DB::print_lineinfo('main::(-e:1):\x{9}print qq{hello
world\n};\x{a}') called at /usr/local/lib/perl5/5.14.2/ line 2111
        DB::DB called at -e line 1

But when I switched to blead and changed the command appropriately, I
had no failures but had slightly different results depending on which
variation of the OP's command I used:

$ PERLDB_OPTS="noTTY=1 AutoTrace=1" ./perl -Ilib -d -e 'print qq{hello
hello world

$ PERLDB_OPTS="noTTY=1" ./perl -Ilib -d -e 'print qq{hello world\n};'
hello world

$ PERLDB_OPTS="AutoTrace=1" ./perl -Ilib -d -e 'print qq{hello world\n};'

Loading DB routines from version 1.34
Editor support available.

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

  DB<1> n
hello world
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<1> q

Is the debugger indeed behaving better in blead than in 5.14.2? (My Perl
-V for blead attached.)

Thank you very much.
Jim Keenan Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About