summaryrefslogtreecommitdiff
path: root/lib/FileCache.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-03-31 08:00:08 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-03-31 08:00:08 +0000
commit414ef3ea9175fb97702b64f7bf165596a34444d7 (patch)
treef68627be240cb7b7f51da0d60d77e84bb228cf72 /lib/FileCache.pm
parent919acde01827c5ad450bac06c554f5a69eb06cef (diff)
downloadperl-414ef3ea9175fb97702b64f7bf165596a34444d7.tar.gz
Test for fileno definedness instead of truth
Don't load Config.pm, which isn't used p4raw-id: //depot/perl@27639
Diffstat (limited to 'lib/FileCache.pm')
-rw-r--r--lib/FileCache.pm5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/FileCache.pm b/lib/FileCache.pm
index 02bde7e68f..285307f37d 100644
--- a/lib/FileCache.pm
+++ b/lib/FileCache.pm
@@ -1,6 +1,6 @@
package FileCache;
-our $VERSION = '1.06';
+our $VERSION = '1.07';
=head1 NAME
@@ -80,7 +80,6 @@ so you may have to set I<maxopen> yourself.
require 5.006;
use Carp;
-use Config;
use strict;
no strict 'refs';
@@ -137,7 +136,7 @@ sub cacheout_open {
sub cacheout_close {
# Short-circuit in case the filehandle disappeared
my $pkg = caller($_[1]||0);
- fileno(*{$pkg . '::' . $_[0]}) &&
+ defined fileno(*{$pkg . '::' . $_[0]}) &&
CORE::close(*{$pkg . '::' . $_[0]});
delete $isopen{$_[0]};
}