summaryrefslogtreecommitdiff
path: root/Porting/checkcfgvar.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-08-09 12:06:08 +0200
committerNicholas Clark <nick@ccl4.org>2011-08-09 12:06:08 +0200
commit68cf6151323b2a224f5d3e28a47922726683ff63 (patch)
tree72cc896327912b10637d02deda69d7539ce06a35 /Porting/checkcfgvar.pl
parent2dcb77c26736076b3481dcbbca7b173a29d8a0e4 (diff)
downloadperl-68cf6151323b2a224f5d3e28a47922726683ff63.tar.gz
In checkcfgvar.pl, eliminate the file-scope lexical %lst.
Diffstat (limited to 'Porting/checkcfgvar.pl')
-rwxr-xr-xPorting/checkcfgvar.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/Porting/checkcfgvar.pl b/Porting/checkcfgvar.pl
index 66787d5ae1..f0800851d9 100755
--- a/Porting/checkcfgvar.pl
+++ b/Porting/checkcfgvar.pl
@@ -29,7 +29,6 @@ GetOptions (
my $MASTER_CFG = "config_h.SH";
-my %lst;
my @CFG = (
# we check from MANIFEST whether they are expected to be present.
# We can't base our check on $], because that's the version of the
@@ -77,7 +76,7 @@ my %MANIFEST;
close $fh;
}
-for my $cfg (@CFG) {
+for my $cfg (sort @CFG) {
unless (exists $MANIFEST{$cfg}) {
print STDERR "[skipping not-expected '$cfg']\n";
next;
@@ -111,15 +110,15 @@ for my $cfg (@CFG) {
$cfg{startperl}++; # Cheat.
}
+ my $problems;
for my $v (@MASTER_CFG) {
exists $cfg{$v} and next;
if ($opt_l) {
- $lst{$cfg}{$v}++;
+ # print the name once, for the first problem we encounter.
+ print "$cfg\n" unless $problems++;
}
else {
print "$cfg: missing '$v'\n";
}
}
}
-
-$opt_l and print "$_\n" for sort keys %lst;