From: Jarkko Hietaniemi Date: Tue, 29 Jul 2003 12:05:24 +0000 (+0000) Subject: Too many my $fh:s. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9a280216ca5568845e9ed0ff852023ef0737bc56;p=p5sagit%2Fp5-mst-13.2.git Too many my $fh:s. p4raw-id: //depot/perl@20306 --- diff --git a/lib/CPAN.pm b/lib/CPAN.pm index fb65e61..0afcef5 100644 --- a/lib/CPAN.pm +++ b/lib/CPAN.pm @@ -3667,9 +3667,12 @@ sub dir_listing { File::Spec->catfile($CPAN::Config->{keep_source_where}, "authors", "id", @$chksumfile); - my $fh = FileHandle->new; + + my $fh; + + # purge and refetch old (pre-PGP) CHECKSUMS; they are a security hazard + $fh = FileHandle->new; if (open($fh, $lc_want)){ - # purge and refetch old (pre-PGP) CHECKSUMS; they are a security hazard my $line = <$fh>; close $fh; unlink($lc_want) unless $line =~ /PGP/; } @@ -3696,7 +3699,7 @@ sub dir_listing { } # adapted from CPAN::Distribution::MD5_check_file ; - my $fh = FileHandle->new; + $fh = FileHandle->new; my($cksum); if (open $fh, $lc_file){ local($/);