This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Stop reentr.pl changing EOL on the files it writes on Win32
[perl5.git] / configpm
index 6ac52e2..728e012 100755 (executable)
--- a/configpm
+++ b/configpm
@@ -82,7 +82,7 @@ use strict;
 # use vars pulls in Carp
 ENDOFBEG
 
-my $myver = sprintf "v%vd", $^V;
+my $myver = sprintf "%vd", $^V;
 
 printf CONFIG <<'ENDOFBEG', ($myver) x 3;
 # This file was created by configpm when Perl was built. Any changes
@@ -617,13 +617,15 @@ if ($Common{byteorder}) {
 }
 my $fast_config = join '', map { "    $_,\n" } sort values %Common;
 
+# Sanity check needed to stop an infite loop if Config_heavy.pl fails to define
+# &launcher for some reason (eg it got truncated)
 print CONFIG sprintf <<'ENDOFTIE', $fast_config;
 
 sub DESTROY { }
 
 sub AUTOLOAD {
     require 'Config_heavy.pl';
-    goto \&launcher;
+    goto \&launcher unless $Config::AUTOLOAD =~ /launcher$/;
     die "&Config::AUTOLOAD failed on $Config::AUTOLOAD";
 }