develooper Front page | perl.perl5.porters | Postings from February 2006

[patch] dumping tied globs without FILENO method on the debuggerfails

Thread Next
Salvador Fandino
February 25, 2006 08:18
[patch] dumping tied globs without FILENO method on the debuggerfails
Message ID:

the bug:

  DB<1> use Symbol
  DB<2> $g = gensym
  DB<3> sub TIEHANDLE { bless [] }
  DB<5> tie *$g, main
  DB<6> x $g
0  GLOB(0x8436aa8)
   -> *Symbol::GEN0
Can't locate object method "FILENO" via package "main" at
/usr/share/perl/5.8/ line 282.
 at /usr/share/perl/5.8/ line 282
        dumpvar::unwrap('GLOB(0x8436aa8)', 3, -2) called at
/usr/share/perl/5.8/ line 127
        dumpvar::DumpElem('GLOB(0x8436aa8)', 3, -2) called at
/usr/share/perl/5.8/ line 253
        dumpvar::unwrap('ARRAY(0x84367a8)', 0, -1) called at
/usr/share/perl/5.8/ line 34
        main::dumpValue('ARRAY(0x84367a8)', -1) called at
/usr/share/perl/5.8/ line 5576
        DB::dumpit('GLOB(0x81ef1f4)', 'ARRAY(0x84367a8)') called at
/usr/share/perl/5.8/ line 657
        DB::eval called at /usr/share/perl/5.8/ line 3410
        DB::DB called at -e line 1
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.

the attached patch wraps all fileno calls in inside eval {}
blocks which solves the problem.


 - Salva.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About