develooper Front page | perl.perl5.porters | Postings from December 2008

use filetest anomaly

Thread Next
Matthew Persico
December 28, 2008 12:01
use filetest anomaly
Message ID:
I recall being bitten by this before but I am not sure to whom I reported it.

I keep getting a bad result building DBD::Oracle because the
Makefile.PL cannot find the sqlplus executable to get the client
library version.

Naturally, the sqlplus executable is on the PATH and very findable, so
let me demonstrate the problem.

[1877] $ perl -e 'if (-x "/opt/oracle/product/bin/sqlplus"){print "got
it"}else{print "no got it"}'
got it

[1874] $ perl -e 'use filetest "access";if (-x
"/opt/oracle/product/bin/sqlplus"){print "got it"}else{print "no got
no got it

[1873] $ dir /opt/oracle/product/bin/sqlplus
-rwxr-x--x   1 oracle   dba       953052 Oct 19  2005

Notice that the file itself is other --x, not other r-x. I think
that's what's throwing off use filetest. I am not oracle or dba, yet I
can execute the file, without read access. This is on Solaris 2.8.

Bug or feature? Can we get DBD::Oracle to stop using filetest or fix
filetest in perl 5.10.0? Yes, I could get my admin to chmod 755
sqlplus, but I'd like to persue whether this behavior is right or not.

Matthew O. Persico

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About