summaryrefslogtreecommitdiff
path: root/configpm
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2004-11-28 13:20:39 +0000
committerNicholas Clark <nick@ccl4.org>2004-11-28 13:20:39 +0000
commit43d06990aaa822f75a12bcbeb69ad08960bcb417 (patch)
tree4e216dfae9e0142eeb2294c63e276fbc7d6e45e9 /configpm
parenta8e1d30be55774dfed1ebdbeeb60084324b04c25 (diff)
downloadperl-43d06990aaa822f75a12bcbeb69ad08960bcb417.tar.gz
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
Diffstat (limited to 'configpm')
-rwxr-xr-xconfigpm13
1 files changed, 11 insertions, 2 deletions
diff --git a/configpm b/configpm
index abe71bf03d..43f6173232 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 {