Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

[svn:dbd-oracle] r2460 - dbd-oracle/trunk
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 y
ourself!\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];
}


Report this thread to moderator Post Follow-up to this message
Old Post
timbo@cvs.perl.org
01-28-06 01:25 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

Oracle PERL DBD archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:49 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006