Skip to content

Commit

Permalink
Emit the truth about PERL_VERSION in %Config
Browse files Browse the repository at this point in the history
  • Loading branch information
toddr committed Jul 31, 2020
1 parent 77b11c8 commit dbcf846
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions configpm
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,11 @@ my %seen_quotes;
# grandfather PATCHLEVEL and SUBVERSION and CONFIG
if ($k) {
if ($k eq 'PERL_VERSION') {
$v = $^V->{version}->[1]; # Don't lie about PERL_VERSION in %Config
push @v_others, "PATCHLEVEL='$v'\n";
}
elsif ($k eq 'PERL_SUBVERSION') {
$v = $^V->{version}->[2]; # Don't lie about PERL_VERSION in %Config
push @v_others, "SUBVERSION='$v'\n";
}
elsif ($k eq 'PERL_CONFIG_SH') {
Expand Down Expand Up @@ -272,6 +274,17 @@ my %seen_quotes;

$val =~ s/$quote\n?\z//;

# Don't lie about PERL_VERSION variables in %Config
if( $k eq 'PERL_VERSION') {
$val = $^V->{version}->[1];
}
elsif ($k eq 'PERL_SUBVERSION') {
$val = $^V->{version}->[2];
}
elsif ($k eq 'PERL_REVISION') {
$val = $^V->{version}->[0];
}

my $line = "$name=$quote$val$quote\n";
push(@v_others, $line);
$seen_quotes{$quote}++;
Expand Down

0 comments on commit dbcf846

Please sign in to comment.