Change 25412 by [EMAIL PROTECTED] on 2005/09/14 08:35:19

        Integrate:
        [ 23752]
        Shave off the explict 1; from the end of lib/Config.pm
        
        [ 24982]
        Add a sanity check to Config::AUTOLOAD to prevent infinte loops if
        Configure_heavy.pl gets truncated.
        
        [ 25195]
        Remove :unique attribute from Config.pm,
        until we find a better implementation of it (or
        remove it). See [perl #36375].

Affected files ...

... //depot/maint-5.8/perl/configpm#17 integrate

Differences ...

==== //depot/maint-5.8/perl/configpm#17 (xtext) ====
Index: perl/configpm
--- perl/configpm#16~25389~     Mon Sep 12 07:42:43 2005
+++ perl/configpm       Wed Sep 14 01:35:19 2005
@@ -298,16 +298,12 @@
 print CONFIG_HEAVY @non_v, "\n";
 
 # copy config summary format from the myconfig.SH script
-print CONFIG_HEAVY "our \$summary : unique = <<'!END!';\n";
+print CONFIG_HEAVY "our \$summary = <<'!END!';\n";
 open(MYCONFIG,"<myconfig.SH") || die "open myconfig.SH failed: $!";
 1 while defined($_ = <MYCONFIG>) && !/^Summary of/;
 do { print CONFIG_HEAVY $_ } until !defined($_ = <MYCONFIG>) || /^\s*$/;
 close(MYCONFIG);
 
-# NB. as $summary is unique, we need to copy it in a lexical variable
-# before expanding it, because may have been made readonly if a perl
-# interpreter has been cloned.
-
 print CONFIG_HEAVY "\n!END!\n", <<'EOT';
 my $summary_expanded;
 
@@ -337,7 +333,7 @@
 
 my $config_sh_len = length $_;
 
-our $Config_SH_expanded : unique = "\n$_" . << 'EOVIRTUAL';
+our $Config_SH_expanded = "\n$_" . << 'EOVIRTUAL';
 EOT
 
 foreach my $prefix (qw(ccflags ldflags)) {
@@ -527,20 +523,21 @@
 }
 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";
 }
 
+# tie returns the object, so the value returned to require will be true.
 tie %%Config, 'Config', {
 %s};
-
-1;
 ENDOFTIE
 
 
End of Patch.

Reply via email to