summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoderick Schertler <roderick@gate.net>1997-01-08 23:45:58 -0500
committerChip Salzenberg <chip@atlantic.net>1997-01-16 07:24:00 +1200
commit7adad424447c8a24bce71f2593459be2ef4eb957 (patch)
treefa09a14d22dd838ecb6640071ccbb032e6140c29
parenta0b8c8c13b377533a792c02987f7129f1884ba85 (diff)
downloadperl-7adad424447c8a24bce71f2593459be2ef4eb957.tar.gz
Re: FileCache::cacheout clobbers $_
This bug report was from last July, but the bug is still there. FileCache.pm and cacheout.pl clobber $_. p5p-msgid: <pz3ewb3189.fsf@eeyore.ibcinc.com>
-rw-r--r--lib/FileCache.pm2
-rw-r--r--lib/cacheout.pl2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/FileCache.pm b/lib/FileCache.pm
index 3d01371b3b..4fd63315f9 100644
--- a/lib/FileCache.pm
+++ b/lib/FileCache.pm
@@ -53,7 +53,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+)/;
diff --git a/lib/cacheout.pl b/lib/cacheout.pl
index 48d594bf82..64378cffc6 100644
--- a/lib/cacheout.pl
+++ b/lib/cacheout.pl
@@ -35,7 +35,7 @@ $seq = 0;
$numopen = 0;
if (open(PARAM,'/usr/include/sys/param.h')) {
- local($.);
+ local($_, $.);
while (<PARAM>) {
$maxopen = $1 - 4 if /^\s*#\s*define\s+NOFILE\s+(\d+)/;
}