diff options
author | Jan Dubois <jand@activestate.com> | 2006-12-18 08:34:33 -0800 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-12-19 09:49:30 +0000 |
commit | e17132c10efa2439add7a8a0b72ec676600f50f3 (patch) | |
tree | bcc1ec2a38f8d54ece073f51fa70df0e4440ba68 | |
parent | 2d29f438a90c25ad972d2cbbc131c54da2b0d8ba (diff) | |
download | perl-e17132c10efa2439add7a8a0b72ec676600f50f3.tar.gz |
Don't destroy the Unicode system environment on Perl startup
Message-ID: <bsbeo2hama2sdo3kqdbrdhp505caeft6h9@4ax.com>
p4raw-id: //depot/perl@29590
-rw-r--r-- | perl.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -4653,6 +4653,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register } if ((PL_envgv = gv_fetchpvs("ENV", GV_ADD|GV_NOTQUAL, SVt_PVHV))) { HV *hv; + bool env_is_not_environ; GvMULTI_on(PL_envgv); hv = GvHVn(PL_envgv); hv_magic(hv, NULL, PERL_MAGIC_env); @@ -4665,7 +4666,8 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register */ if (!env) env = environ; - if (env != environ + env_is_not_environ = env != environ; + if (env_is_not_environ # ifdef USE_ITHREADS && PL_curinterp == aTHX # endif @@ -4687,7 +4689,7 @@ S_init_postdump_symbols(pTHX_ register int argc, register char **argv, register #endif sv = newSVpv(s+1, 0); (void)hv_store(hv, *env, s - *env, sv, 0); - if (env != environ) + if (env_is_not_environ) mg_set(sv); if (origenv != environ) { /* realloc has shifted us */ |