summaryrefslogtreecommitdiff
path: root/lib/dumpvar.pl
diff options
context:
space:
mode:
authorSalvador FandiƱo <sfandino@yahoo.com>2006-02-25 12:14:20 +0100
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-02-27 14:45:00 +0000
commitbef1d2845fb0db7845d14820c48acfde8ab087fe (patch)
treec0d9ccf87b518bd2a41dff82259da268809e5d7f /lib/dumpvar.pl
parent27af0734ff197d2d3cb6b991b9e13e0cd9e8d62c (diff)
downloadperl-bef1d2845fb0db7845d14820c48acfde8ab087fe.tar.gz
[patch] dumping tied globs without FILENO method on the debugger fails
Message-ID: <20060225101254.726.qmail@lists.develooper.com> p4raw-id: //depot/perl@27342
Diffstat (limited to 'lib/dumpvar.pl')
-rw-r--r--lib/dumpvar.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/dumpvar.pl b/lib/dumpvar.pl
index 43e107ff5f..fa5b4dfb47 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) {