Subject: | File::Which bug |
Date: | Fri, 20 Feb 2015 16:42:21 -0500 |
To: | bug-File-Which [...] rt.cpan.org |
From: | Robert William Leach <rleach [...] genomics.princeton.edu> |
Hi,
Not sure if this is a bug or whether it's working as intended, however, I would have expected that the return would be the same as `which` at the command line.
perl -e 'use File::Which;print($File::Which::VERSION,"\n")'
1.09
perl --version
This is perl 5, version 16, subversion 2 (v5.16.2) built for darwin-thread-multi-2level
(with 3 registered patches, see perl -V for more detail)
...
uname -a
Darwin gen-rlimac 13.4.0 Darwin Kernel Version 13.4.0: Sun Aug 17 19:50:11 PDT 2014; root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64
Expected behavior:
I would have expected that:
perl -e 'use File::Which;print(scalar(which("/usr/local/bin/usearch7.0.1090_i86osx32")),"\n")'
would be the same as:
which /usr/local/bin/usearch7.0.1090_i86osx32
/usr/local/bin/usearch7.0.1090_i86osx32
Observed behavior:
But instead, it returns an undefined value:
perl -e 'use File::Which;print((defined(scalar(which("/usr/local/bin/usearch7.0.1090_i86osx32"))) ? "defined" : "undefined"),"\n")'
undefined
Rob
Robert William Leach
133A Carl C. Icahn Lab
Lewis-Sigler Institute for Integrative Genomics
Princeton University
Princeton, NJ 08544