Author: byterock
Date: Fri May  2 08:40:16 2008
New Revision: 11179

Modified:
   dbd-oracle/trunk/Makefile.PL
   dbd-oracle/trunk/Oracle.pm
   dbd-oracle/trunk/README

Log:
latest changes

Modified: dbd-oracle/trunk/Makefile.PL
==============================================================================
--- dbd-oracle/trunk/Makefile.PL        (original)
+++ dbd-oracle/trunk/Makefile.PL        Fri May  2 08:40:16 2008
@@ -159,8 +159,8 @@
 # $client_version => Major.Minor, $client_version_full => Major.Minor.X.Y.Z
 my ($client_version, $client_version_full) = get_client_version($::opt_V);
 
-die "DBD::Oracle no longer supports Oracle versions before 8.\n"
-    if $client_version < 8;
+die "DBD::Oracle no longer supports Oracle versions before 9.\n"
+    if $client_version < 9;
 
 
 # Check for symbol table problem in libclntsh.dylib.9.0 on MacOS X
@@ -388,17 +388,11 @@
                if !defined $ENV{ORA_CLIENT_LIB}
                && ($opts{LINKTYPE}||'') ne 'static' && @shared && !$::opt_c;
 
-
     my $linkvia = fetch_oci_macros($mkfile) if -f $mkfile;
-    my $libhome="$OH/lib";
-
-    if ($MK{LIBHOME}){
-      my $libhome = expand_mkvars($MK{LIBHOME}, 0, 1) || "$OH/lib";
-    }
 
+    my $libhome = expand_mkvars($MK{LIBHOME}, 0, 1) || "$OH/lib";
     $linkwith = expand_mkvars($linkvia, 0, 1);
 
-
     #now use logic based of oracle version 
     $linkwith =~ s!/lib\b!/$libdir!g; 
     $libhome =~ s!/lib\b!/$libdir!g; 
@@ -445,7 +439,6 @@
            next if $line =~ /^\s*\S*echo\s+/;
            next if $line =~ /^\s*\S*make\s+/; # remove recursive calls to make
            next if $line =~ /^\s*\S*make:/;   # remove message from make
-           next if $line =~ /^\s*\S*make\[.*\]:/;   # remove recursive message 
from make
            next if $line =~ /^\s*$/; # remove any blank lines
            push @filtered_cmds, $line;
        }
@@ -669,17 +662,11 @@
 $opts{DEFINE} .= ($os ne 'VMS')
        ? " -DORA_OCI_VERSION=\\\"$client_version_full\\\""
        : " -DORA_OCI_VERSION=\"$client_version_full\"";
-# force additional special behavior for oci 8.  For now, this means
-# emulating OciLobWriteAppend
-# use this if, for some reason the default handling for this function
-# doesn't work or you are building a binary release for distribution
-# to machines with older client libraries.
-$opts{DEFINE} .= " -DORA_OCI_8" if ($::opt_V && $client_version == 8.0)
-                               or ($^O eq 'VMS' && $client_version < 9.0); # 
OCILobIsTemporary
-
-# OCIStmntFetch2() is a feature of OCI 9.0.0
-$opts{DEFINE} .= " -DUSE_ORA_OCI_STMNT_FETCH " if ( $client_version < 9.0 );
- 
+# Will keep this for later user
+# older 9 clients might cause problems in later versions
+#.So far it is not used
+$opts{DEFINE} .= " -DORA_OCI_9" if ($::opt_V && $client_version == 9.0)
+                               or ($^O eq 'VMS' && $client_version < 10.0); 
 
 # Set some private WriteMakefile options if this is 'me' :-)
 if ($is_developer){  # a reasonable guess
@@ -719,7 +706,7 @@
 # --- check for Test::Harness bug 
 
 print "\nChecking for functioning wait.ph\n";
-eval { package WAIT; require 'wait.ph' };
+eval { package WAIT; local $^W = 0; require 'wait.ph' };
 if (!$@ && !defined(&WAIT::WCOREDUMP)) { 
     print "You have a wait.ph file generated by perl h2ph utility.\n";
     print "(I found it at $INC{'wait.ph'})\n";
@@ -1053,40 +1040,37 @@
 
 
 sub find_mkfile {
-
-    my $mkfile;
-    my @mkplaces;
-    if ($client_version>=11.1){
-    
-      my $proc_dir=~ s/lib/share/g;
-      $mkfile=$proc_dir."/demo.mk";
-    } else {  
-      my @mk_proc = (
+    my @mk_proc = (
        'precomp/demo/proc/proc.mk',
        'precomp/demo/proc/demo_proc.mk',
        'proc/lib/proc.mk',
        'proc16/lib/proc16.mk',
-      );
-      my @mk_oci = (
+    );
+    my @mk_oci = (
        'rdbms/demo/demo_xe.mk',
        'rdbms/lib/oracle.mk',
        'rdbms/demo/oracle.mk',
        'rdbms/demo/demo_rdbms.mk',
-      );
-      my @mkplaces = ($::opt_p) ? (@mk_proc,@mk_oci) : (@mk_oci,@mk_proc);
-      if ($::opt_m) {
-         $::opt_m = cwd()."/$::opt_m" unless $::opt_m =~ m:^/:;
-         die "-m $::opt_m: not found" unless -f $::opt_m;
-         unshift @mkplaces, $::opt_m;
-      }
-      
-      foreach my $place (@mkplaces) {
-         $place = "$OH/$place"
-             unless $place =~ m:^[/\.]:; # abs or relative path
-         next unless -f $place;
-         $mkfile ||= $place;   # use first one found
-         print "Found $place\n";
-      }
+    );
+
+        # Add bnild.mk from /usr/share/oracle based on the oracle home 
location if oracle home is under
+        # /usr/lib/oracle ( Linux RPM install ).  The 11g instant client only 
contains
+        # build.mk located in /usr/share/oracle/
+        push @mk_oci, "/usr/share/oracle/$1/demo.mk" if($OH =~ 
m|^/usr/lib/oracle/(.*)|);
+
+    my @mkplaces = ($::opt_p) ? (@mk_proc,@mk_oci) : (@mk_oci,@mk_proc);
+    if ($::opt_m) {
+       $::opt_m = cwd()."/$::opt_m" unless $::opt_m =~ m:^/:;
+       die "-m $::opt_m: not found" unless -f $::opt_m;
+       unshift @mkplaces, $::opt_m;
+    }
+    my $mkfile;
+    foreach my $place (@mkplaces) {
+       $place = "$OH/$place"
+           unless $place =~ m:^[/\.]:; # abs or relative path
+       next unless -f $place;
+       $mkfile ||= $place;     # use first one found
+       print "Found $place\n";
     }
     die qq{
        Unable to locate an oracle.mk, proc.mk or other suitable *.mk
@@ -1102,11 +1086,11 @@
 
        In the unlikely event that a suitable *.mk file is installed
        somewhere non-standard you can specify where it is using the -m option:
-         Perl Makefile.PL -m /path/to/your.mk
+               perl Makefile.PL -m /path/to/your.mk
 
        See the appropriate README file for your OS for more information and 
some alternatives.
 
-      } unless ($os eq 'MSWin32') || ($os eq 'VMS') || ($mkfile && -f $mkfile) 
|| $::opt_F  || ($client_version>=11.1);
+    } unless ($os eq 'MSWin32') || ($os eq 'VMS') || ($mkfile && -f $mkfile) 
|| $::opt_F;
 
     print "Using $mkfile\n";
     return $mkfile;
@@ -1356,6 +1340,9 @@
 
 sub expand_mkvars { 
     my ($string, $strip, $backtick, $level, $maxlevel) = @_;
+
+        return if(!defined $string);
+
     $level ||= 1;
     local($_) = $string;
     print "$level Expanding $_\n" if $::opt_d;
@@ -1439,9 +1426,13 @@
        "/usr/include/oracle/$client_version_trim/client", # Instant Client for 
RedHat FC4
        "/include/oracle/$client_version_full/client", # Instant Client for 
RedHat FC3
        "/include/oracle/$client_version_trim/client", # Instant Client for 
RedHat FC3
-       "/usr/include/oracle/11.1.0.1/client/" #Instant Client for RedHat FC3 
11.1.0.6 bad hack I know
-    
    );
+
+        # Add /usr/include/oracle based on the oracle home location if oracle 
home is under
+        # /usr/lib/oracle ( Linux RPM install ).  The 11g instant client 
reports
+        # client_version as 11.1.0.6 from sqlplus, but installs under 11.1.0.1.
+        push @try, "/usr/include/oracle/$1" if($OH =~ 
m|^/usr/lib/oracle/(.*)|);
+
    unshift @try, $::opt_h if $::opt_h;
    @try = grep { -d $_ } @try;
   
@@ -1578,7 +1569,7 @@
     }
 
     if (!$client_version_full) {
-       $client_version_full = "8.0.0.0";
+       $client_version_full = "9.0.0.0";
         print qq{
 WARNING: I could not determine Oracle client version so I'll just
 default to version $client_version_full. Some features of DBD::Oracle may not 
work.

Modified: dbd-oracle/trunk/Oracle.pm
==============================================================================
--- dbd-oracle/trunk/Oracle.pm  (original)
+++ dbd-oracle/trunk/Oracle.pm  Fri May  2 08:40:16 2008
@@ -966,7 +966,11 @@
 =head1 DESCRIPTION
 
 DBD::Oracle is a Perl module which works with the DBI module to provide
-access to Oracle databases.
+access to Oracle databases. 
+
+Since version 1.22 it only supports Oracle clients 9 or greater.  You still 
can connect to an 
+Oracle 8 DB you just have to use a newer client.
+
 
 =head1 CONNECTING TO ORACLE
 
@@ -1054,7 +1058,7 @@
 running on, "SID" is the SID of the database, "DB" is the SQL*Net 2.x
 connection descriptor for the database.
 
-B<Note:> Some of these formats may not work with Oracle 8+.
+B<Note:> Some of these formats may not work with Oracle 9+.
 
   BEGIN {
      $ENV{ORACLE_HOME} = '/home/oracle/product/7.x.x';
@@ -1795,12 +1799,6 @@
    NLS_NCHAR=UTF8
    NLS_NCHAR=AL32UTF8
 
-Oracle 8 client libraries have a number of bugs related to character
-set handling, especially when connected to an Oracle 9+ server.
-For this reason a number of DBD::Oracle tests are disabled when
-using an Oracle 8 client. If you wish to use Unicode, I recommend
-upgrading client and server to Oracle 9 or later.
-
 =head2 Oracle UTF8 is not UTF-8
 
 AL32UTF8 should be used in preference to UTF8 if it works for you,
@@ -3284,9 +3282,7 @@
 
 Here's an alternative form using a function that returns a cursor.
 This example uses the pre-defined weak (or generic) REF CURSOR type
-SYS_REFCURSOR. This is an Oracle 9 feature. For Oracle 8, you must
-create your own REF CURSOR type in a package (see the C<curref.pl>
-script mentioned at the end of this section).
+SYS_REFCURSOR. This is an Oracle 9 feature. 
 
   # Create the function that returns a cursor
   $dbh->do(q{

Modified: dbd-oracle/trunk/README
==============================================================================
--- dbd-oracle/trunk/README     (original)
+++ dbd-oracle/trunk/README     Fri May  2 08:40:16 2008
@@ -43,7 +43,7 @@
     Build, test and install Perl 5 (at least 5.6.1)
     It is very important to TEST it and INSTALL it!
 
-    Build, test and install the DBI module (at least DBI 1.21).
+    Build, test and install the DBI module (at least DBI 1.51).
     It is very important to TEST it and INSTALL it!
 
     Remember to *read* the DBI README file and this one CAREFULLY!
@@ -57,7 +57,12 @@
           your configuration and DBD::Oracle determine your Oracle version.
 
     For full Oracle installs: that usually includes Pro*C and SQL*Net.
-    (That's not very specific because it varies between Oracle releases.)
+    (That's not very specific because it varies between Oracle releases.).  
+    As of release 1.22 support of Oracle clients before 9 was dropped.
+    The main reason for this is that next few versions of DBD::Oracle will 
introduce a number of new features
+    whicht will required a great deal of extra coding to make the OCI 8 work. 
+    As well it is getting harder to find an Oracle client 8 to test against as 
well
+    Oracle no longer supports clients before 9.
 
     The ORACLE_HOME environment variable must point to the Oracle Home
     used to create DBD::Oracle. (Not essential under MS Windows).

Reply via email to