diff options
author | Nicholas Clark <nick@ccl4.org> | 2004-11-28 13:20:39 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2004-11-28 13:20:39 +0000 |
commit | 43d06990aaa822f75a12bcbeb69ad08960bcb417 (patch) | |
tree | 4e216dfae9e0142eeb2294c63e276fbc7d6e45e9 /configpm | |
parent | a8e1d30be55774dfed1ebdbeeb60084324b04c25 (diff) | |
download | perl-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-x | configpm | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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 { |