From: Salvador FandiƱo Date: Sat, 25 Feb 2006 11:14:20 +0000 (+0100) Subject: [patch] dumping tied globs without FILENO method on the debugger fails X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bef1d2845fb0db7845d14820c48acfde8ab087fe;p=p5sagit%2Fp5-mst-13.2.git [patch] dumping tied globs without FILENO method on the debugger fails Message-ID: <20060225101254.726.qmail@lists.develooper.com> p4raw-id: //depot/perl@27342 --- diff --git a/lib/dumpvar.pl b/lib/dumpvar.pl index 43e107f..fa5b4df 100644 --- a/lib/dumpvar.pl +++ b/lib/dumpvar.pl @@ -282,14 +282,14 @@ sub unwrap { if ($globPrint) { $s += 3; dumpglob($s, "{$$v}", $$v, 1, $m-1); - } elsif (defined ($fileno = fileno($v))) { + } elsif (defined ($fileno = eval {fileno($v)})) { print( (' ' x ($s+3)) . "FileHandle({$$v}) => fileno($fileno)\n" ); } } elsif (ref \$v eq 'GLOB') { # Raw glob (again?) if ($globPrint) { dumpglob($s, "{$v}", $v, 1, $m-1) if $globPrint; - } elsif (defined ($fileno = fileno(\$v))) { + } elsif (defined ($fileno = eval {fileno(\$v)})) { print( (' ' x $s) . "FileHandle({$v}) => fileno($fileno)\n" ); } } @@ -368,7 +368,7 @@ sub dumpglob { unwrap(\%entry,3+$off,$m) ; print( (' ' x $off) . ")\n" ); } - if (defined ($fileno = fileno(*entry))) { + if (defined ($fileno = eval{fileno(*entry)})) { print( (' ' x $off) . "FileHandle($key) => fileno($fileno)\n" ); } if ($all) {