I have encountered a behavior that I think it is a little
odd and I have discovered it has to do with the standard
module Cwd. I had a Perl script which was called by
a Java application via Runtime.getRuntime().exec()

I have discovered that it was a good idea to use the
form that includes not only the name of the command
(in the case, something like "c:\perl\bin\perl.exe script.pl")
but also some minimum of the environment.
The application used to stop complaining about Cwd
which could not split an undefined object in line 103
(I'm using Windoze 2000, ActivePerl 5.6.1)
This line reads as

if($^O eq 'MacOS' || grep { -x "$_/pwd" } split(':', $ENV{PATH})) {

The point is that the Java application called the Perl interpreter
with no value for $PATH environment variable and this
caused Cwd to die.

I don't think this is desirable. A simple modification in the Cwd
would check for the defineteness of $ENV{PATH} before
accessing it.

What do you think?

Regards,

Adriano.





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to