[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATH & Perl 5.6 on Win32 ?

From: Johan Holmberg
Subject: PATH & Perl 5.6 on Win32 ?
Date: Tue, 10 Apr 2001 11:10:31 +0200 (MEST)

Has anyone got cons working with ActiveState 5.6 on
Windows (NT/2000/...) ?

After diving into the source code of Perl and rebuilding it with
debugging it seems to me that ActiveState Perl 5.6 *ignores* any
changes to the PATH environment variable in a Perl script, when
searching for the binary given in a call like:

    $ENV{PATH} = "...";        # ignored while searching for "cl"
    system("cl /c foo.c");

Instead Perl uses the PATH that was current when the script started.
(curiously enough, the process started ("cl.exe" in the example
above), is given the right PATH as part of its environment ...)

The way I encountered this problem initially was:

  - I have Visual C++ 5 in my PATH normally (as set in
    Settings->Control Panel->System->Environment)

  - I often want to use Visual C++ 6 when running cons,
    so I set PATH explicitly in Cons.

  - as described above my setting of PATH in Cons has no effect
    and Visual C++ 5 is executed instead 6. Not what I want ....

Until recently I have been using an older version of ActiveState
Perl (build 522 based on 5.005). There things seem to work better.

But now that I have looked at the code (of 5.6), I begin to worry
about if the old version also just "seems to work".

If my conclusions above are correct (I still hope someone can prove
me wrong), I wonder what Cons should do about it.
I think it is essential that one can "trust" Cons, and if Cons
itself can't trust Perl in Win32, what should be done ???

The only possible solution I can imagine, is to accept that some
Perl versions are "broken" and implement the PATH-searching
explicitly in Cons itself.

Any comments ?

/johan holmberg

reply via email to

[Prev in Thread] Current Thread [Next in Thread]