diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-06-23 09:34:26 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-06-23 09:34:26 -0700 |
commit | 25018358f5fe1e7a2595f788f4ad0296fece4086 (patch) | |
tree | e6e90d7dab9234ec7bef6c2997c322e9a1373385 /doio.c | |
parent | e8c1f67ad36996682d3bb5614b3ca3eede7cdc5e (diff) | |
download | perl-25018358f5fe1e7a2595f788f4ad0296fece4086.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.
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -2387,9 +2387,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); |