From dbcf84651786a1b0bf2fa79182945bcc58bb0451 Mon Sep 17 00:00:00 2001 From: Todd Rinaldo Date: Fri, 31 Jul 2020 16:41:55 -0500 Subject: [PATCH] Emit the truth about PERL_VERSION in %Config --- configpm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configpm b/configpm index 8fe498db7e..14ad464c36 100755 --- a/configpm +++ b/configpm @@ -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') { @@ -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}++;