Just to pre-empt the probably soon to be frequently-asked question, here's one
data point: DBD::Oracle 1.15 appears to work OK on Oracle 10.1.0.2 on Linux.

[EMAIL PROTECTED]:~/src/DBD-Oracle-1.15-andyh$ make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0,
'blib/lib', 'blib/arch')" t/*.t
t/base.......ok                                                              
t/cursor.....ok                                                              
t/general....ok                                                              
t/long.......ok                                                              
t/meta.......ok                                                              
t/ph_type....ok 11/19 Placeholder behaviour for ora_type=1 (the default) varies
with Oracle version.
 Oracle 7 didn't strip trailing spaces, Oracle 8 did, until 9.2.x
 Your system doesn't. If that seems odd, let us know.
t/ph_type....ok                                                              
t/plsql......ok                                                              
t/reauth.....skipped
        all skipped: no reason given
t/select.....ok                                                              
All tests successful, 1 test skipped.
Files=9, Tests=1535, 42 wallclock secs ( 8.65 cusr +  0.81 csys =  9.46 CPU)


 Makefile.PL had some trouble with detecting the version; patch attached
addresses one aspect of that. However, it fell through the first two version
detection options and ended up with the 'scary but handy' part where it parses
the Oracle home directory for numbers. My Oracle home's called Ora101; had to
alter the check of $inspdver{rdbms_ver} to allow a version >10, and tweak the
regex to add a zero on the end.

 SQL*Plus can report the version of the Oracle home in a readily parseable way:

$ echo DEFINE _SQLPLUS_RELEASE | sqlplus -S /nolog
DEFINE _SQLPLUS_RELEASE = "1001000200" (CHAR)

 or on 9.2.0.4:

$ echo DEFINE _SQLPLUS_RELEASE | sqlplus -S /nolog
DEFINE _SQLPLUS_RELEASE = "902000400" (CHAR)

 I've tried this on various versions back to 8.1.6 and they all have the
predefined variable. It's only shown up in the documentation in 10g though:

http://download-west.oracle.com/docs/cd/B12037_01/server.101/b12170/ch13.htm#i2675128

 Any objections to me writing a patch to run sqlplus as above to get this
value? It seems to me that if you can't run sqlplus, you're unlikely to be able
to compile DBD::Oracle anyway - and besides, there's the other 4 existing
methods to fall back on. Also appears neater than parsing through obscure
files? (I can't find unix.rgs or inspdver in the docs)

thanks,
-- 
Andy Hassall <[EMAIL PROTECTED]> / Space: disk usage analysis tool
<http://www.andyh.co.uk> / <http://www.andyhsoftware.co.uk/space>
--- ../DBD-Oracle-1.15/Makefile.PL      2004-02-10 20:23:19.000000000 +0000
+++ ./Makefile.PL       2004-02-10 20:23:19.000000000 +0000
@@ -162,8 +162,8 @@
     elsif ( $OH =~ m!.*(\d+\.\d+\.\d+)! ) { #decode it from $OH if possible
         $inspdver{RDBMS} = $1;
     }
-    elsif ( "$OH/" =~ m!\D(1?\d)(\d)(\d)\D!) { # scary but handy
-        $inspdver{RDBMS} = join ".", $1, $2, $3;
+    elsif ( "$OH/" =~ m!\D(1?\d)(\d)(\d?)\D!) { # scary but handy
+        $inspdver{RDBMS} = join ".", $1, $2, ($3||'0');
     }
 
     # hack up a simple floating point form of the version: 8.1.6 => 8.106
@@ -171,7 +171,7 @@
 
     print "Oracle version $inspdver{RDBMS} ($inspdver{rdbms_ver})\n" if 
$inspdver{RDBMS};
 
-    if (!DBI::looks_like_number($inspdver{rdbms_ver}) || $inspdver{rdbms_ver} < 7 || 
$inspdver{rdbms_ver} > 10) {
+    if (!DBI::looks_like_number($inspdver{rdbms_ver}) || $inspdver{rdbms_ver} < 7 || 
$inspdver{rdbms_ver} >= 11) {
         print qq{
 WARNING: could not decode oracle version from
 $OH/orainst/inspdver, or $OH/install/unix.rgs
@@ -1494,5 +1494,3 @@
 }
 
 __END__
-
-

Reply via email to