From: Nicholas Clark Date: Sun, 28 Nov 2004 13:20:39 +0000 (+0000) Subject: Need to stub the public functions to keep some existing code X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=43d06990aaa822f75a12bcbeb69ad08960bcb417;p=p5sagit%2Fp5-mst-13.2.git Need to stub the public functions to keep some existing code working. No need to keep $Config_SH around in memory when we can easily re-create it. p4raw-id: //depot/perl@23561 --- diff --git a/configpm b/configpm index abe71bf..43f6173 100755 --- a/configpm +++ b/configpm @@ -95,6 +95,14 @@ use strict; @Config::EXPORT = qw(%%Config); @Config::EXPORT_OK = qw(myconfig config_sh config_vars config_re); +# Need to stub all the functions to make code such as print Config::config_sh +# keep working + +sub myconfig; +sub config_sh; +sub config_vars; +sub config_re; + my %%Export_Cache = map {($_ => 1)} (@Config::EXPORT, @Config::EXPORT_OK); our %%Config; @@ -298,7 +306,8 @@ print CONFIG_HEAVY join("", @v_fast, sort @v_others); print CONFIG_HEAVY <<'EOT'; !END! s/(byteorder=)(['"]).*?\2/$1$2$Config::byteorder$2/m; -our $Config_SH : unique = $_; + +my $config_sh_len = length $_; our $Config_SH_expanded : unique = "\n$_" . << 'EOVIRTUAL'; EOT @@ -379,7 +388,7 @@ sub STORE { die "\%Config::Config is read-only\n" } sub config_sh { - $Config_SH + substr $Config_SH_expanded, 1, $config_sh_len; } sub config_re {