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

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

Thread Next
From:
Salvador Fandino
Date:
February 25, 2006 08:18
Subject:
[patch] dumping tied globs without FILENO method on the debuggerfails
Message ID:
20060225101254.726.qmail@lists.develooper.com
Hi

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/dumpvar.pl line 282.
 at /usr/share/perl/5.8/dumpvar.pl line 282
        dumpvar::unwrap('GLOB(0x8436aa8)', 3, -2) called at
/usr/share/perl/5.8/dumpvar.pl line 127
        dumpvar::DumpElem('GLOB(0x8436aa8)', 3, -2) called at
/usr/share/perl/5.8/dumpvar.pl line 253
        dumpvar::unwrap('ARRAY(0x84367a8)', 0, -1) called at
/usr/share/perl/5.8/dumpvar.pl line 34
        main::dumpValue('ARRAY(0x84367a8)', -1) called at
/usr/share/perl/5.8/perl5db.pl line 5576
        DB::dumpit('GLOB(0x81ef1f4)', 'ARRAY(0x84367a8)') called at
/usr/share/perl/5.8/perl5db.pl line 657
        DB::eval called at /usr/share/perl/5.8/perl5db.pl 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.
  DB<7>


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

Cheers,

 - Salva.


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About