This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In checkcfgvar.pl, inline check_cfg() into its only caller.
authorNicholas Clark <nick@ccl4.org>
Tue, 9 Aug 2011 08:51:09 +0000 (10:51 +0200)
committerNicholas Clark <nick@ccl4.org>
Tue, 9 Aug 2011 09:29:50 +0000 (11:29 +0200)
Porting/checkcfgvar.pl

index 61ecb1e..b7022dc 100755 (executable)
@@ -87,19 +87,6 @@ read_file("MANIFEST",
 
 my @MASTER_CFG = sort keys %MASTER_CFG;
 
-sub check_cfg {
-    my ($fn, $cfg) = @_;
-    for my $v (@MASTER_CFG) {
-       exists $cfg->{$v} and next;
-       if ($opt_l) {
-           $lst{$fn}{$v}++;
-       }
-       else {
-           print "$fn: missing '$v'\n";
-       }
-    }
-}
-
 for my $cfg (@CFG) {
     unless (exists $MANIFEST{$cfg}) {
        print STDERR "[skipping not-expected '$cfg']\n";
@@ -130,7 +117,16 @@ for my $cfg (@CFG) {
     if ($cfg eq 'configure.com') {
        $cfg{startperl}++; # Cheat.
     }
-    check_cfg($cfg, \%cfg);
+
+    for my $v (@MASTER_CFG) {
+       exists $cfg{$v} and next;
+       if ($opt_l) {
+           $lst{$cfg}{$v}++;
+       }
+       else {
+           print "$cfg: missing '$v'\n";
+       }
+    }
 }
 
 $opt_l and print "$_\n" for sort keys %lst;