File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -240,9 +240,11 @@ my %seen_quotes;
240240 # grandfather PATCHLEVEL and SUBVERSION and CONFIG
241241 if ($k) {
242242 if ($k eq 'PERL_VERSION') {
243+ $v = $^V->{version}->[1]; # Don't lie about PERL_VERSION in %Config
243244 push @v_others, "PATCHLEVEL='$v'\n";
244245 }
245246 elsif ($k eq 'PERL_SUBVERSION') {
247+ $v = $^V->{version}->[2]; # Don't lie about PERL_VERSION in %Config
246248 push @v_others, "SUBVERSION='$v'\n";
247249 }
248250 elsif ($k eq 'PERL_CONFIG_SH') {
@@ -272,6 +274,17 @@ my %seen_quotes;
272274
273275 $val =~ s/$quote\n?\z//;
274276
277+ # Don't lie about PERL_VERSION variables in %Config
278+ if( $k eq 'PERL_VERSION') {
279+ $val = $^V->{version}->[1];
280+ }
281+ elsif ($k eq 'PERL_SUBVERSION') {
282+ $val = $^V->{version}->[2];
283+ }
284+ elsif ($k eq 'PERL_REVISION') {
285+ $val = $^V->{version}->[0];
286+ }
287+
275288 my $line = "$name=$quote$val$quote\n";
276289 push(@v_others, $line);
277290 $seen_quotes{$quote}++;
You can’t perform that action at this time.
0 commit comments