This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
CreateTTY in -d
[perl5.git] / lib / FileCache.pm
index 3d01371..78a3e67 100644 (file)
@@ -1,5 +1,7 @@
 package FileCache;
 
+our $VERSION = '1.00';
+
 =head1 NAME
 
 FileCache - keep more files open than the system permits
@@ -19,7 +21,7 @@ maximum.
 =head1 BUGS
 
 F<sys/param.h> lies with its C<NOFILE> define on some systems,
-so you may have to set $cacheout::maxopen yourself.
+so you may have to set $FileCache::cacheout_maxopen yourself.
 
 =cut
 
@@ -53,7 +55,7 @@ sub cacheout {
     ($file) = @_;
     unless (defined $cacheout_maxopen) {
        if (open(PARAM,'/usr/include/sys/param.h')) {
-           local $.;
+           local ($_, $.);
            while (<PARAM>) {
                $cacheout_maxopen = $1 - 4
                    if /^\s*#\s*define\s+NOFILE\s+(\d+)/;