Home > Archive > Oracle PERL DBD > January 2006 > [svn:dbd-oracle] r2460 - dbd-oracle/trunk









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author [svn:dbd-oracle] r2460 - dbd-oracle/trunk
timbo@cvs.perl.org

2006-01-27, 8:25 pm

Author: timbo
Date: Fri Jan 27 15:38:11 2006
New Revision: 2460

Modified:
dbd-oracle/trunk/Changes
dbd-oracle/trunk/Makefile.PL
Log:
Improve/fix auto-oracle_home logic


Modified: dbd-oracle/trunk/Changes
====================
====================
====================
==================
--- dbd-oracle/trunk/Changes (original)
+++ dbd-oracle/trunk/Changes Fri Jan 27 15:38:11 2006
@@ -1,4 +1,4 @@
-=head1 Changes in DBD-Oracle 1.17 (svn rev 2429) XXth January 2005
+=head1 Changes in DBD-Oracle 1.17 (svn rev 2460) 27th January 2006

Fixed automatic csform setting for some UTF8 cases and for Oracle 8.0
Fixed truncation error on fetch into UTF8 charset thanks to Honza Pazdziora.

Modified: dbd-oracle/trunk/Makefile.PL
====================
====================
====================
==================
--- dbd-oracle/trunk/Makefile.PL (original)
+++ dbd-oracle/trunk/Makefile.PL Fri Jan 27 15:38:11 2006
@@ -127,13 +127,20 @@ $OH = win32_oracle_home($O
H) if ($os eq
$OH = unixify $OH if $os eq 'VMS';
$OH =~ s:/$::;

-$OH ||= find_oracle_home() || die qq{
- The $ORACLE_ENV environment variable is not set and I couldn't guess it.
- It must be set to hold the path to an Oracle installation directory
- on this machine (or a machine with a compatible architecture).
- See the README.clients.txt file for more information.
- ABORTED!
-};
+if (!$OH) {
+ $OH = find_oracle_home() || die qq{
+ The $ORACLE_ENV environment variable is not set and I couldn't guess it.
+ It must be set to hold the path to an Oracle installation directory
+ on this machine (or a machine with a compatible architecture).
+ See the README.clients.txt file for more information.
+ ABORTED!
+ \n};
+ $ENV{$ORACLE_ENV} = $OH;
+ print "\n";
+ print "WARNING: Setting $ORACLE_ENV env var to $OH for you.\a\n";
+ print "WARNING: The tests will probably fail unless you set $ORACLE_ENV yourself!\n";
+ sleep 5;
+}

die qq{ The $ORACLE_ENV environment variable value ($OH) is not valid.
It must be set to hold the path to an Oracle installation directory
@@ -847,16 +854,26 @@ if ($os eq 'VMS') { # sanity check VMS l

sub find_oracle_home {
print "Trying to find an ORACLE_HOME\n";
- my (undef, undef, @dirs) = ldlibpth_info(1);
+
my @path = split /\Q$Config{path_sep}/, $ENV{PATH};
- # this should work for properly configured instant client installs
- my @oh = grep { (glob("$_/libclntsh.$so*"))[0] } (@dirs, @path);
- if (!@oh) {
+ print "using PATH @path\n" if $::opt_v;
+ # instant client has libclntsh in same dir as sqlplus
+ my @oh = grep { (glob("$_/libclntsh.$so*"))[0] } @path;
+
+ if (!@oh) { # failing that, try LD_LIBRARY_PATH or equiv
+ my (undef, undef, @ldlibpth) = ldlibpth_info(1);
+ print "using ldlib @ldlibpth\n" if $::opt_v;
+ @oh = grep { (glob("$_/libclntsh.$so*"))[0] } @ldlibpth;
+ # for instant client @oh may be actual ORACLE_HOME
+ # but for non-IC ORACLE_HOME may be dir above a /lib*
+ s:/lib\w*/?$:: for @oh; # remove possible trailing lib dir
+ }
+ if (!@oh) { # else try the traditional kind of install
# this should work for non-instant-client installs ($OH/bin & $OH/lib*)
@oh = grep { (glob("$_/../lib*/libclntsh.$so*"))[0] } @path;
s:/[^/]/?$:: for @oh;
}
- die "Found @oh\n" if @oh;
+ print "Found @oh\n" if @oh;
return $oh[0];
}

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com