On Wed Jul 01 17:18:18 2015, ETHER wrote:
Show quoted text> I found this in the documentation for File::Which. It doesn't seem to
> have been reported, so I report it here:
>
> =head1 SEE ALSO
>
> =over 4
>
> =item L<IPC::Cmd>
>
> Comes with a C<can_run> function with slightly different semantics
> that
> the traditional UNIX where. It will find executables in the current
> directory, even though the current directory is not searched for by
> default on Unix.
Just to clarify I am not sure this is a bug (which is why I didn't report it), but simply the result of a different goals. Consider:
twin% ls -l a.out
-rwxr-xr-x 1 ollisg ollisg 7052 Mar 19 06:58 a.out*
twin% which a.out
a.out: Command not found.
twin% perl -MIPC::Cmd -E 'say IPC::Cmd::can_run("a.out")'
./a.out
"./a.out" is a valid way to execute the a.out in the current directory, even if . isn't in the path. It may even be useful depending on the application and the expectation.
Either way, I will monitor this ticket and if it is deemed a bug and corrected I will update the doco on File::Which.