summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-06-23 09:34:26 -0700
committerRicardo Signes <rjbs@cpan.org>2012-06-25 19:46:56 -0400
commit528063bdd5c56ddd91e28475f55275e5a67745c3 (patch)
tree45414c988242d0019458c874cd887c9f2bdc3d12
parent5f130a02c417369c81af089f74d73a77b108fa4b (diff)
downloadperl-528063bdd5c56ddd91e28475f55275e5a67745c3.tar.gz
[perl #113798] Don’t hide PATH from perlglob
To fix another bug, miniperl was changed to clear out %ENV before shelling out to call the underlying glob program (csh on Unix; perlglob on Windows), in commit a3342be368. That proved slightly problematic, as it stopped <~> from working on Unix, so commit 93b2dae1 changed it to preserve just $ENV{HOME}. That turns out not to have been enough. For some compilers, Win- dows needs PATH preserved for perlglob to find certain DLLs it needs to load.
-rw-r--r--doio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/doio.c b/doio.c
index 0da05c127c..a57042b9ad 100644
--- a/doio.c
+++ b/doio.c
@@ -2384,9 +2384,12 @@ Perl_vms_start_glob
{
GV * const envgv = gv_fetchpvs("ENV", 0, SVt_PVHV);
SV ** const home = hv_fetchs(GvHV(envgv), "HOME", 0);
+ SV ** const path = hv_fetchs(GvHV(envgv), "PATH", 0);
if (home && *home) SvGETMAGIC(*home);
+ if (path && *path) SvGETMAGIC(*path);
save_hash(gv_fetchpvs("ENV", 0, SVt_PVHV));
if (home && *home) SvSETMAGIC(*home);
+ if (path && *path) SvSETMAGIC(*path);
}
(void)do_open(PL_last_in_gv, (char*)SvPVX_const(tmpcmd), SvCUR(tmpcmd),
FALSE, O_RDONLY, 0, NULL);