From 67b366ad5cf150b2344126a465c83d2692dcf274 Mon Sep 17 00:00:00 2001 From: James E Keenan Date: Mon, 5 Jul 2021 01:06:27 +0000 Subject: [PATCH] Use lowercase for lexical variables -- even filehandles Per rjbs code review in https://github.com/Perl/perl5/pull/18950 Signed-off-by: James E Keenan --- ext/Pod-Html/lib/Pod/Html.pm | 12 ++++++------ ext/Pod-Html/t/lib/Testing.pm | 12 ++++++------ 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 f83545d2a23c..451b66de66fa 100644 --- a/ext/Pod-Html/lib/Pod/Html.pm +++ b/ext/Pod-Html/lib/Pod/Html.pm @@ -605,16 +605,16 @@ sub feed_tree_to_parser { 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 3b993b10f210..8bfb6b8b65e8 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"; }