develooper Front page | perl.perl5.changes | Postings from March 2018

[perl.git] branch blead updated. v5.27.9-99-g8e4ae0ffc8

From:
Aaron Crane
Date:
March 5, 2018 09:31
Subject:
[perl.git] branch blead updated. v5.27.9-99-g8e4ae0ffc8
Message ID:
E1esmT7-0001Y0-1z@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/8e4ae0ffc862568e59935c22e552488892eabe59?hp=ef5d49f01a20e446aa8682e02aca0c966ed57455>

- Log -----------------------------------------------------------------
commit 8e4ae0ffc862568e59935c22e552488892eabe59
Author: Aaron Crane <arc@cpan.org>
Date:   Mon Mar 5 09:22:46 2018 +0000

    RT #132834: prevent duplicate Config.pm vars
    
    Commit 6c2ae6421675ba5ff81dd43f9167136f02dfe9d9 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.

-----------------------------------------------------------------------

Summary of changes:
 configpm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configpm b/configpm
index 2fda5a57c3..09c4a3b7a7 100755
--- a/configpm
+++ b/configpm
@@ -574,9 +574,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

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About