This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to encoding-warnings-0.10
[perl5.git] / lib / FileCache.pm
index 7a2aa89..285307f 100644 (file)
@@ -1,6 +1,6 @@
 package FileCache;
 
-our $VERSION = '1.05';
+our $VERSION = '1.07';
 
 =head1 NAME
 
@@ -52,6 +52,8 @@ append them to the command string as you would system EXPR.
 Returns EXPR on success for convenience. You may neglect the
 return value and manipulate EXPR as the filehandle directly if you prefer.
 
+=back
+
 =head1 CAVEATS
 
 While it is permissible to C<close> a FileCache managed file,
@@ -78,7 +80,6 @@ so you may have to set I<maxopen> yourself.
 
 require 5.006;
 use Carp;
-use Config;
 use strict;
 no strict 'refs';
 
@@ -135,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]};
 }