summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames E Keenan <jkeenan@cpan.org>2021-07-05 01:06:27 +0000
committerJames E Keenan <jkeenan@cpan.org>2021-07-06 01:08:04 +0000
commitca8c8b63777e14372e9669546eaebed1575d73b1 (patch)
tree37f52a328d91246af3d43d8a44b45e406de01f50
parentb7797b7529bd03ccca65f2ce2ee8ffdff2bbb9bb (diff)
downloadperl-ca8c8b63777e14372e9669546eaebed1575d73b1.tar.gz
Use lowercase for lexical variables -- even filehandles
Per rjbs code review in https://github.com/Perl/perl5/pull/18950
-rw-r--r--ext/Pod-Html/lib/Pod/Html.pm12
-rw-r--r--ext/Pod-Html/t/lib/Testing.pm12
2 files changed, 12 insertions, 12 deletions
diff --git a/ext/Pod-Html/lib/Pod/Html.pm b/ext/Pod-Html/lib/Pod/Html.pm
index 46ff0da9ea..cb0f6b8152 100644
--- a/ext/Pod-Html/lib/Pod/Html.pm
+++ b/ext/Pod-Html/lib/Pod/Html.pm
@@ -574,16 +574,16 @@ sub _save_page {
sub write_file {
my ($globals, $output) = @_;
$globals->{Htmlfile} = "-" unless $globals->{Htmlfile}; # stdout
- my $FHOUT;
+ my $fhout;
if($globals->{Htmlfile} and $globals->{Htmlfile} ne '-') {
- open $FHOUT, ">", $globals->{Htmlfile}
+ open $fhout, ">", $globals->{Htmlfile}
or die "$0: cannot open $globals->{Htmlfile} file for output: $!\n";
} else {
- open $FHOUT, ">-";
+ open $fhout, ">-";
}
- binmode $FHOUT, ":utf8";
- print $FHOUT $output;
- close $FHOUT or die "Failed to close $globals->{Htmlfile}: $!";
+ binmode $fhout, ":utf8";
+ print $fhout $output;
+ close $fhout or die "Failed to close $globals->{Htmlfile}: $!";
chmod 0644, $globals->{Htmlfile} unless $globals->{Htmlfile} eq '-';
}
diff --git a/ext/Pod-Html/t/lib/Testing.pm b/ext/Pod-Html/t/lib/Testing.pm
index 3b993b10f2..8bfb6b8b65 100644
--- a/ext/Pod-Html/t/lib/Testing.pm
+++ b/ext/Pod-Html/t/lib/Testing.pm
@@ -672,19 +672,19 @@ sub record_state_of_cache {
die("'run' element takes integer") unless $args->{run} =~ m/^\d+$/;
my @cachelines = ();
- open my $IN, '<', $cache or die "Unable to open $cache for reading";
- while (my $l = <$IN>) {
+ open my $in, '<', $cache or die "Unable to open $cache for reading";
+ while (my $l = <$in>) {
chomp $l;
push @cachelines, $l;
}
- close $IN or die "Unable to close $cache after reading";
+ close $in or die "Unable to close $cache after reading";
my $outfile = catfile($args->{outdir}, "$args->{run}.cache.$args->{stub}.$$.txt");
die("$outfile already exists; did you remember to increment the 'run' argument?")
if -f $outfile;
- open my $OUT, '>', $outfile or die "Unable to open $outfile for writing";
- print $OUT "$_\n" for (sort @cachelines);
- close $OUT or die "Unable to close after writing";
+ open my $out, '>', $outfile or die "Unable to open $outfile for writing";
+ print $out "$_\n" for (sort @cachelines);
+ close $out or die "Unable to close after writing";
print STDERR "XXX: cache (sorted): $outfile\n";
}