Mail Archives: djgpp-workers/1999/08/24/05:45:14
On Sun, Aug 22, 1999 at 10:41:13AM +0300, Eli Zaretskii wrote:
[..]
> $p = $ENV{"PATH"};
> $h = $ENV{"HOME"};
> $u = $ENV{"PURIFYOPTIONS"};
>
> # NT specific stuff
> $pnt = $ENV{"Path"};
> $sr = $ENV{"SystemRoot"};
>
> foreach $k (keys %ENV) { delete $ENV{$k}; }
> %ENV = ( "HOME", $h, "PATH", $p, "Path", $pnt, "SystemRoot", $sr);
>
> First, if I leave the last line as shown, most of the tests fail, as
> far as I understand because PATH is either empty or undefined, so none
> of the programs invoked by the scripts and Makefile's are found. If I
> replace the last line with this one:
>
> %ENV = ( "HOME", $h, "PATH", $p);
>
> then everything works. It seems like the value of $Path (which isn't
> defined on MSDOS) somehow causes $PATH to be emptied. Laszlo, can it
> be that environment variables are compared case-insensitively
> somewhere in Perl? If so, this is a bug.
Yeah, perl seems to add an strupr before setting an environment
variable (in an #ifdef MSDOS). There is a very old comment in the code
which says this is needed because some programs could break without it.
But I also think it's time to remove it. I'll submit a patch to the
perl5-porters.
Laszlo
- Raw text -