Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
RT #132834: prevent duplicate Config.pm vars
Browse files Browse the repository at this point in the history
Commit 6c2ae64 introduced variables whose
need was forced by configpm (for compatibility with older software), but
incorrectly added those variables to the generated Config_heavy.pl even when
they were already in use.

The resulting duplicate variables are clearly wrong, and in addition they
broke ExtUtils::InferConfig.

(cherry picked from commit 8e4ae0f)
  • Loading branch information
arc authored and rurban committed Jun 14, 2018
1 parent d8d3355 commit e92f561
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configpm
Original file line number Diff line number Diff line change
Expand Up @@ -595,9 +595,11 @@ local *_ = \my $a;
$_ = <<'!END!';
EOT
#proper lexicographical order of the keys
my %seen_var;
$heavy_txt .= join('',
map { $_->[-1] }
sort {$a->[0] cmp $b->[0] }
grep { !$seen_var{ $_->[0] }++ }
map {
/^([^=]+)/ ? [ $1, $_ ]
: [ $_, $_ ] # shouldnt happen
Expand Down

0 comments on commit e92f561

Please sign in to comment.