Subject: | Useless warning when PATH contains non-existing directories |
When working with PATH elements in the network, i.e. NFS, it happens
very often that the PATH environment contains non-existing directories.
When running a perl program using Inline, I get the following warning:
Use of uninitialized value in bitwise and (&) at blib/lib/Inline.pm
(autosplit into blib/lib/auto/Inline/env_untaint.al) line 983.
Those are generally not a problem of the perl program and could be
suppressed by removing non-existing path elements i.e. by changing line
983 from:
$ENV{PATH} = join $delim, grep {not /^\./ and
not ((stat($_))[2] & 0022)
} split $delim, $ENV{PATH};
to
$ENV{PATH} = join $delim, grep {not /^\./ and -d $_ and
not ((stat(_))[2] & 0022)
} split $delim, $ENV{PATH};
Best regards,
Heiko