diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-06-23 09:34:26 -0700 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2012-06-25 19:46:56 -0400 |
commit | 528063bdd5c56ddd91e28475f55275e5a67745c3 (patch) | |
tree | 45414c988242d0019458c874cd887c9f2bdc3d12 | |
parent | 5f130a02c417369c81af089f74d73a77b108fa4b (diff) | |
download | perl-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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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); |