From: Nicholas Clark Date: Sat, 25 Jun 2005 17:58:26 +0000 (+0000) Subject: Add a sanity check to Config::AUTOLOAD to prevent infinte loops if X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=938af39eb5ebb494561ab6e53d6e8b8aa2d36adf;p=p5sagit%2Fp5-mst-13.2.git Add a sanity check to Config::AUTOLOAD to prevent infinte loops if Configure_heavy.pl gets truncated. p4raw-id: //depot/perl@24982 --- diff --git a/configpm b/configpm index ab26eef..728e012 100755 --- a/configpm +++ b/configpm @@ -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"; }