[svn:dbd-oracle] r14942 - in dbd-oracle/branches/DBD-Oracle-1.31_00: . Oracle.ex README-files/hpux examples lib/DBD/Oracle t xt
[email protected] Thu, 6 Oct 2011 13:44:16 -0700 (PDT)
| Newsgroups | perl.dbd.oracle.changes |
|---|---|
| Message-ID | <[email protected]> |
Author: yanick
Date: Thu Oct 6 13:44:16 2011
New Revision: 14942
Added:
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/README
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/README
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/bind.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/bind.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/commit.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/commit.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/curref.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/curref.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/ex.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/ex.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/japh
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/japh
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/mktable.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/mktable.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/ora_explain.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/ora_explain.PL
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/oradump.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/oradump.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/proc.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/proc.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/sql
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/sql
dbd-oracle/branches/DBD-Oracle-1.31_00/examples/tabinfo.pl
- copied, changed from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/tabinfo.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/t/00versions.t
Removed:
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/README
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/bind.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/commit.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/curref.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/ex.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/japh
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/mktable.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/oradump.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/proc.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/sql
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/tabinfo.pl
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Lincoln-1.06
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Lincoln-1.07
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-580-10.20-cc
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-585-11.00-cc
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-585-11.11-cc
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-587-11.23-cc
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-588-10.20-gcc
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-588-11.00-gcc32
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-588-11.00-gcc64
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-588-11.11-gcc32
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-588-11.11-gcc64
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Merijn-588-11.23-gcc64
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Mike
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/Conf-Roger
dbd-oracle/branches/DBD-Oracle-1.31_00/README-files/hpux/libjava.eml
dbd-oracle/branches/DBD-Oracle-1.31_00/README.explain.txt
dbd-oracle/branches/DBD-Oracle-1.31_00/ora_explain.PL
dbd-oracle/branches/DBD-Oracle-1.31_00/xt/changes.t
dbd-oracle/branches/DBD-Oracle-1.31_00/xt/pod.t
Modified:
dbd-oracle/branches/DBD-Oracle-1.31_00/Changes
dbd-oracle/branches/DBD-Oracle-1.31_00/MANIFEST
dbd-oracle/branches/DBD-Oracle-1.31_00/META.yml
dbd-oracle/branches/DBD-Oracle-1.31_00/Makefile.PL
dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.pm
dbd-oracle/branches/DBD-Oracle-1.31_00/Oraperl.pm
dbd-oracle/branches/DBD-Oracle-1.31_00/README.macosx.txt
dbd-oracle/branches/DBD-Oracle-1.31_00/lib/DBD/Oracle/GetInfo.pm
dbd-oracle/branches/DBD-Oracle-1.31_00/t/10general.t
dbd-oracle/branches/DBD-Oracle-1.31_00/t/21nchar.t
dbd-oracle/branches/DBD-Oracle-1.31_00/t/30long.t
dbd-oracle/branches/DBD-Oracle-1.31_00/t/40ph_type.t
dbd-oracle/branches/DBD-Oracle-1.31_00/t/50cursor.t
dbd-oracle/branches/DBD-Oracle-1.31_00/t/70meta.t
dbd-oracle/branches/DBD-Oracle-1.31_00/t/nchar_test_lib.pl
Log:
release 1.31_00
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/Changes
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/Changes (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/Changes Thu Oct 6 13:44:16 2011
@@ -1,35 +1,55 @@
Revision history for DBD::Oracle
+Changes in DBD-Oracle 1.31_00
+
+ [ENHANCEMENTS]
+ - Makefile.PL's options are now documented
+ - move 'explain' to '/examples' directory
+
+ [BUG FIXES]
+ - support development release versions in GetInfo (Martin J. Evans)
+ - don't gag diag() on the tests by default
+ - SKIP condition in 10general.t was reversed (reported by Alois) [RT#46761]
+ - Check for LD_LIBRARY_PATH_(32|64) as well for solaris [RT#46761]
+ - convert a symbolically linked ORACLE_HOME to an absolute path
+ (patch by H.Merijn Brand, applied by Martin J. Evans) [rt70785]
+
+ [DOCUMENTATION]
+ - announce that Oraperl will be removed from the dist by v1.38.
+ - add Mac OS instructions for Lion (patch by David Wheeler) [rt71109]
+ - fixed minor typo in POD (John Scoles)
+
Changes in DBD-Oracle 1.30
[DOCUMENTATION]
- - add warning about RT##69350 in documentation
+ - add warning about RT#69350 in documentation
Changes in DBD-Oracle 1.29_1
[ENHANCEMENTS]
- added support for TAF callback (John Scoles)
- - now trap OCIServerAttach errors (patch by Marc Fielding, applied
+ - now trap OCIServerAttach errors (patch by Marc Fielding, applied
by Martin J. Evans) [rt68958]
- added installation notes for MAC Snow Leopard (Martin J. Evans)
- - added '/etc' to the search paths for tnsnames.ora (Martin J. Evans, Jay Senseman)
+ - added '/etc' to the search paths for tnsnames.ora (Martin J. Evans, Jay Senseman)
[rt67942]
- removed support for ProcC connections (John Scoles)
- added ora_db_shutdown and ora_db_startup private functions (Steffen Goeldner)
- added Test::Simple 0.90 to build_requires as we use note etc (Martin J. Evans)
[BUG FIXES]
- - fixed bug in bind_col which was broken in 1.27 and stopped anyone using
- a string as a column number. E.g., '1' (Martin J. Evans, Alexander
+ - fixed bug in bind_col which was broken in 1.27 and stopped anyone using
+ a string as a column number. e.g., '1' (Martin J. Evans, Alexander
Foken)
- removed obsolete oparse_lang (John Scoles)
- fixed some compiler warnings in dbdimp.c and oci8.c (Martin J. Evans)
- added missing OCIServerRelease to oci.def (Martin J. Evans) [rt68172]
- fixed up the POD based on DBD::Pg (John Scoles)
- POD review rephrasing, fixing typos and spelling mistakes up to
- "Placeholder Binding Attributes" (Martin J. Evans)
+ "Placeholder Binding Attributes" (Martin J. Evans)
+ - rt 56824 - add META_MERGE mentioning DBI required version (Martin J. Evans)
* Changes in DBD-Oracle 1.28 (svn rev 14765)
- Changed 26exe_array.t so it is compatiable with older version of Test::More by John Scoles
+ Changed 26exe_array.t so it is compatible with older version of Test::More by John Scoles
A fix from Charles Jardine for 58object.t to stop an error on some 64 bit systems
A few quick changes from H. Merijn Brand to fix some compiler warings and a fix for Oracle 9 clients
Added connection attribute 'ora_connect_with_default_signals' that will localize Perl's $SIG{INT} handler from Brian Phillips and T. Bunce
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/MANIFEST
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/MANIFEST (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/MANIFEST Thu Oct 6 13:44:16 2011
@@ -15,39 +15,23 @@
oci.def OCI.DLL export declarations
oci8.c
ocitrace.h
-ora_explain.PL
-Oracle.ex/bind.pl
-Oracle.ex/commit.pl
-Oracle.ex/curref.pl
-Oracle.ex/ex.pl
-Oracle.ex/japh
-Oracle.ex/mktable.pl
-Oracle.ex/oradump.pl
-Oracle.ex/proc.pl
-Oracle.ex/README
-Oracle.ex/sql
-Oracle.ex/tabinfo.pl
+examples/bind.pl
+examples/commit.pl
+examples/curref.pl
+examples/ex.pl
+examples/japh
+examples/mktable.pl
+examples/oradump.pl
+examples/proc.pl
+examples/README
+examples/sql
+examples/tabinfo.pl
Oracle.h
Oracle.pm
Oracle.xs
oraperl.ph Old oraperl file included for completeness of emulation
Oraperl.pm
README
-README-files/hpux/Conf-Lincoln-1.06
-README-files/hpux/Conf-Lincoln-1.07
-README-files/hpux/Conf-Merijn-580-10.20-cc
-README-files/hpux/Conf-Merijn-585-11.00-cc
-README-files/hpux/Conf-Merijn-585-11.11-cc
-README-files/hpux/Conf-Merijn-587-11.23-cc
-README-files/hpux/Conf-Merijn-588-10.20-gcc
-README-files/hpux/Conf-Merijn-588-11.00-gcc32
-README-files/hpux/Conf-Merijn-588-11.00-gcc64
-README-files/hpux/Conf-Merijn-588-11.11-gcc32
-README-files/hpux/Conf-Merijn-588-11.11-gcc64
-README-files/hpux/Conf-Merijn-588-11.23-gcc64
-README-files/hpux/Conf-Mike
-README-files/hpux/Conf-Roger
-README-files/hpux/libjava.eml
README-files/hpux/Makefile-Lincoln
README.64bit.txt
README.aix.txt
@@ -102,4 +86,6 @@
test.pl
Todo
typemap
+examples/ora_explain.pl
+t/00versions.t
META.yml Module meta-data (added by MakeMaker)
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/META.yml
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/META.yml (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/META.yml Thu Oct 6 13:44:16 2011
@@ -1,11 +1,25 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: DBD-Oracle
-version: 1.28
-version_from: Oracle.pm
-installdirs: site
+--- #YAML:1.0
+name: DBD-Oracle
+version: 1.31_00
+abstract: Oracle database driver for the DBI module
+author:
+ - Tim Bunce ([email protected])
+license: perl
+distribution_type: module
+configure_requires:
+ DBI: 1.51
+ ExtUtils::MakeMaker: 0
+build_requires:
+ DBI: 1.51
+ ExtUtils::MakeMaker: 0
+ Test::Simple: 0.90
requires:
- DBI: 1.51
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+ DBI: 1.51
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.56
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/Makefile.PL
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/Makefile.PL (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/Makefile.PL Thu Oct 6 13:44:16 2011
@@ -2,19 +2,19 @@
# Copyright (c) 1994-2006 Tim Bunce. Ireland.
# Copyright (c) 2006-2008 John Scoles (The Pythian Group). Canada.
-# vim: ts=8:sw=4
+use 5.6.0;
-BEGIN { $^W = 1 }
-BEGIN { require 5.006 }
+use strict;
+use warnings;
use ExtUtils::MakeMaker 5.16, qw(&WriteMakefile $Verbose);
use Getopt::Long;
use Config;
use Cwd;
use File::Find;
-use strict;
+use Pod::Usage;
-# This DBI must be installed before we can build a DBD.
+# DBI must be installed before we can build a DBD.
# For those not using Dynamic loading this means building a
# new static perl in the DBI directory by saying 'make perl'
# and then using _that_ perl to make this one.
@@ -23,22 +23,23 @@
# Some MakeMaker's forged some FileHandle methods
-require FileHandle unless defined(&FileHandle::new);
+require FileHandle unless defined &FileHandle::new;
-BEGIN { if ($^O eq 'VMS') {
- require vmsish;
- import vmsish;
- require VMS::Filespec;
- import VMS::Filespec;
-}}
+BEGIN {
+ return unless $^O eq 'VMS';
+ eval q{
+ use vmsish;
+ use VMS::Filespec;
+ 1;
+ } or die $@;
+
+}
-my $dbi_dir = dbd_dbi_dir();
my $dbi_arch_dir = dbd_dbi_arch_dir();
-my $os = $^O;
my $so = $Config{so}; # typically 'so', 'dylib' on Darwin/OSX
my $osvers = $Config{osvers}; $osvers =~ s/^\s*(\d+\.\d+).*/$1/; # drop sub-sub-version: 2.5.1 -> 2.5
-my $exe_ext = ($os eq 'VMS') ? '.pl' : '';
+my $exe_ext = ($^O eq 'VMS') ? '.pl' : '';
my $BELL = "\a";
# put this here as it might change
$| = 1;
@@ -48,11 +49,10 @@
VERSION_FROM => 'Oracle.pm',
PREREQ_PM => { "Test::Simple" => 0.90, # actually Test::More pkg in T::S dist
"DBI" => 1.51},
- EXE_FILES => [ "ora_explain$exe_ext" ],
OBJECT => '$(O_FILES)',
DEFINE => '',
DIR => [],
- clean => { FILES => 'xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*' },
+ clean => { FILES => 'xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def mk.pm DBD_ORA_OBJ.*' },
dist => {
DIST_DEFAULT => 'clean distcheck disttest tardist',
PREOP => '$(MAKE) -f Makefile.old distdir',
@@ -83,6 +83,89 @@
my %mk_target_deps;
my %mk_target_rules;
+=head1 OPTIONS
+
+=over
+
+=item -b
+
+Try to use Oracle's own 'build' rule. Defaults to true.
+
+
+=item -r
+
+With I<-b>, use this names build rule (eg -r=build64).
+
+=item -m
+
+Path to 'oracle.mk'
+
+=item -h
+
+Path to oracle header files.
+
+=item -p
+
+Alter preference for oracle.mk.
+
+=item -n
+
+Oracle .mk macro name to use for library list to link with.
+
+=item -c
+
+Don't encourage use of shared library.
+
+=item -l
+
+Try direct-link to libclntsh.
+
+=item -g
+
+Enable debugging (-g for compiler and linker).
+
+=item -s
+
+Find a symbol in oracle libs, Don't build a Makefile.
+
+=item -S
+
+Find a symbol in oracle & system libs, Don't build a Makefile.
+
+=item -v
+
+Be more verbose.
+
+=item -d
+
+Much more verbose for debugging.
+
+=item -f
+
+Include text of oracle's .mk file within generated Makefile.
+
+=item -F
+
+Force - ignore errors.
+
+=item -W
+
+Just write a basic default Makefile (won't build).
+
+=item -w
+
+Enable many gcc compiler warnings.
+
+=item -V
+
+Force assumption of specified Oracle version
+If == 8 then we don't use the new OCI_INIT code
+and we force our emulation of OCILobWriteAppend.
+
+=back
+
+=cut
+
# Options (rarely needed)
# to turn off an option prefix with 'no', ie 'perl Makefile.PL -nob'
#$::opt_ic10 = 1; # Build for Oracle 10g instantclient
@@ -109,7 +192,7 @@
Getopt::Long::config( qw( no_ignore_case ) );
GetOptions(qw(b! r=s v! d! g! p! l! c! f! F! W! w! m=s h=s n=s s=s S=s V=s ))
- or die "Invalid arguments";
+ or die pod2usage( -verbose => 99, -sections => [ 'OPTIONS' ] );
$::opt_g &&= '-g'; # convert to actual string
$::opt_v = 1 if $::opt_d;
@@ -117,14 +200,14 @@
my $is_developer = (-d ".svn" && -f "MANIFEST.SKIP");
if ($::opt_W) {
- open(MK_PM, ">/dev/null") or die "Unable to create mk.pm: $!";
+ open MK_PM, ">/dev/null" or die "Unable to create 'mk.pm': $!";
exit WriteMakefile( dbd_edit_mm_attribs(\%opts) )
}
# --- Introduction
print qq{
-Configuring DBD::Oracle for perl $] on $os ($Config{archname})
+Configuring DBD::Oracle for perl $] on $^O ($Config{archname})
Remember to actually *READ* the README file! Especially if you have any problems.
@@ -133,10 +216,10 @@
# --- Where is Oracle installed...
-my $ORACLE_ENV = ($os eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
+my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
my $OH = $ENV{$ORACLE_ENV} || '';
-$OH = win32_oracle_home($OH) if ($os eq 'MSWin32') or ($os =~ /cygwin/i);
-$OH = unixify $OH if $os eq 'VMS';
+$OH = win32_oracle_home($OH) if ($^O eq 'MSWin32') or ($^O =~ /cygwin/i);
+$OH = unixify $OH if $^O eq 'VMS';
$OH =~ s:/$::;
if (!$OH) {
@@ -153,20 +236,20 @@
print "WARNING: If these tests fail you may have to set ORACLE_HOME yourself!\n";
sleep 5;
}
-
+-l $OH and $OH = Cwd::abs_path ($OH); # Oracle really dislikes symbolic links
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
on this machine (or a machine with a compatible architecture).
For an Instant Client install, the directory should include an sdk subdirectory.
See the appropriate README file for your OS for more information.
ABORTED!
-} unless (-d $OH and $os eq 'VMS')
+} unless (-d $OH and $^O eq 'VMS')
or -d "$OH/sdk/." # Instant Client with SDK
or -d "$OH/lib/." # normal Oracle installation
or glob("$OH/libclntsh.$so*") # pre-sdk instant client or rpm
or -e "$OH/oci.dll"; # Windows Instant Client
-print "Installing on a $os, Ver#$osvers\n";
+print "Installing on a $^O, Ver#$osvers\n";
print "Using Oracle in $OH\n";
# $client_version => Major.Minor, $client_version_full => Major.Minor.X.Y.Z
@@ -176,20 +259,7 @@
if $client_version < 9;
-# Check for symbol table problem in libclntsh.dylib.9.0 on MacOS X
-if ($os eq 'darwin' and -f (my $oracle_lib = "$OH/lib/libclntsh.dylib")) {
- open FH,"nm $oracle_lib |";
- my $stripped = 1;
- while (<FH> ) {
- if (/^\s+U _(dlsym|dlclose)/) { $stripped = 0; last; }
- }
- close FH;
- unless ($stripped) {
- warn "WARNING: symbol table may need modification in Oracle library:\n"
- ."\t$oracle_lib\nIF the build fails in the linking stage,\n"
- . "manual modification is required - see README.macosx.txt\n";
- }
-}
+check_macos_symbol_table();
symbol_search() if $::opt_s or $::opt_S;
@@ -202,7 +272,7 @@
my $linkwith_msg = "";
my $need_ldlp_env;
-if ($os eq 'VMS') {
+if ($^O eq 'VMS') {
my $OCIINCLUDE = join " ", vmsify("$OH/rdbms/"),
vmsify("$OH/rdbms/public"),
vmsify("$OH/rdbms/demo/"),
@@ -227,7 +297,7 @@
}
}
-elsif (($os eq 'MSWin32') or ($os =~ /cygwin/i)) {
+elsif (($^O eq 'MSWin32') or ($^O =~ /cygwin/i)) {
my $OCIDIR = "";
find( sub {
@@ -235,9 +305,9 @@
$OCIDIR = $_ if /^OCI\d*$/i && $OCIDIR lt $_;
$File::Find::prune = 1 if -d $_ && $_ !~ /^\./;
}, $OH );
-
+
$OCIDIR = 'sdk' if !$OCIDIR && -d "$OH/sdk"; # Instant Client SDK
-
+
die "OCI directory not found, please install OCI in $OH" if ! $OCIDIR;
print "Using OCI directory '$OCIDIR'\n";
@@ -267,26 +337,26 @@
push @OCILIB, "OCI.LIB" if $OCILIB{'OCI.LIB'};
my $OCILIB = pop @OCILIB || '';
$OCILIB =~ s/\.LIB$//i;
-
+
die qq{
Unable to find required Oracle OCI files for the build. Please check
- that you have your OCI installed in your oracle home ($OH)
+ that you have your OCI installed in your oracle home ($OH)
directory and that it has the following files (and probably more):
-
+
$OH\\$OCIDIR\\include\\oratypes.h
$OH\\$OCIDIR\\lib\\$oci_compiler_dir\\$OCILIB.lib
-
+
Please install OCI or send comments back to dbi-users\@perl.org
- if you have an OCI directory other than $OCIDIR.
+ if you have an OCI directory other than $OCIDIR.
Alternatively, if you\'re using ActiveState perl on Windows try
ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBI.ppd
ppm install ftp://ftp.esoftmatic.com/outgoing/DBI/5.8.3/DBD-Oracle.ppd
-
- } unless (-e "$OH/$OCIDIR/include/oratypes.h"
+
+ } unless (-e "$OH/$OCIDIR/include/oratypes.h"
&& -e "$OH/$OCIDIR/lib/$oci_compiler_dir/$OCILIB.lib")
or $::opt_F;
-
+
print "Using $OCIDIR/lib/$oci_compiler_dir/$OCILIB.lib\n";
$opts{LIBS} = [ "-L$OH/$OCIDIR/LIB/$oci_compiler_dir $OCILIB" ];
};
@@ -309,7 +379,7 @@
my $libdir = ora_libdir();
$opts{dynamic_lib} = { OTHERLDFLAGS => "$::opt_g" };
my @h_dirs = find_headers();
- if ($client_version_full =~ /^8.0.6/ && $os eq 'hpux') {
+ if ($client_version_full =~ /^8.0.6/ && $^O eq 'hpux') {
$linkwith_msg = "-lextp -l$lib.";
$opts{LIBS} = [ "-L$OH/$libdir -lextp -l$lib $syslibs" ];
push @h_dirs, "$OH/network/public";
@@ -328,7 +398,7 @@
elsif (my @libclntsh = glob("$OH/libclntsh.$so*")) {
print "Looks like an Instant Client installation, okay\n";
-
+
# the libclntsh.$so (without version suffix) may be missing
# we need it to link to so try to create it
eval {
@@ -337,7 +407,7 @@
print "So I'm going to create a $OH/libclntsh.$so symlink to $libclntsh_v\n";
symlink($libclntsh_v, "$OH/libclntsh.$so")
or warn "Can't create symlink $OH/libclntsh.$so to $libclntsh_v: $!\n";
- } unless -e "$OH/libclntsh.$so";
+ } unless -e "$OH/libclntsh.$so";
check_ldlibpthname($OH);
@@ -406,9 +476,9 @@
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;
+ #now use logic based of oracle version
+ $linkwith =~ s!/lib\b!/$libdir!g;
+ $libhome =~ s!/lib\b!/$libdir!g;
#print "linkwith=$linkwith\n";
@@ -470,7 +540,7 @@
$build =~ s/-o build\S*//; # remove -o target that confuses gcc at least on Sun
$linkwith = $build;
# delete problematic crt?.o on solaris
- $linkwith = del_crtobj($linkwith, 1) if $os eq 'solaris';
+ $linkwith = del_crtobj($linkwith, 1) if $^O eq 'solaris';
}
else {
print "WARNING: Unable to interpret Oracle build commands from $mkfile.\a\n";
@@ -480,7 +550,7 @@
$::opt_b = 0;
}
unlink "$DBD_ORA_OBJ.c", "$DBD_ORA_OBJ.o"
- unless $os eq 'darwin'; # why?
+ unless $^O eq 'darwin'; # why?
print "\n";
}
else {
@@ -496,11 +566,11 @@
}
$linkwith =~ s/-Y P,/-YP,/g if $Config{gccversion};
- $linkwith =~ s:-R /:-R/:g if $os eq 'solaris';
+ $linkwith =~ s:-R /:-R/:g if $^O eq 'solaris';
# modifications (mostly) by Lincoln Baxter
- if ( ($os eq 'hpux') && ($osvers > 10) && (
- $Config{'cc'} eq 'cc' or $Config{'gccversion'}) )
+ if ( ($^O eq 'hpux') && ($osvers > 10) && (
+ $Config{'cc'} eq 'cc' or $Config{'gccversion'}) )
{
# these get dragged in from demo_rdbms.mk where Oracle uses them
# the linker bitches about them not being valid options
@@ -523,10 +593,10 @@
#Lincoln: pick the right library path
my $libdir = ora_libdir();
- $linkwith =~ s!/lib\b!/$libdir!g;
+ $linkwith =~ s!/lib\b!/$libdir!g;
# A number of folks have had to add this library to resolve
- # undefined symbol errors reported at runtime by ld.sl (the
+ # undefined symbol errors reported at runtime by ld.sl (the
# library loader) libqsmashr defines LhrStringInsert()...
# other libraries may have to be added (Lincoln Baxter <[email protected]>)
# we check for the library's existence first... (8.0.5 does not have it)
@@ -626,12 +696,12 @@
# Platform specific fix-ups:
# delete problematic crt?.o on solaris
- $linkwith_s = del_crtobj($linkwith_s) if $os eq 'solaris';
+ $linkwith_s = del_crtobj($linkwith_s) if $^O eq 'solaris';
$linkwith_s =~ s/-l:lib(\w+)\.sl\b/-l$1/g; # for hp-ux
# this kind of stuff should be in a ./hints/* file:
$linkwith_s .= " -lc" if $Config{osname} eq 'dynixptx'
or $Config{archname} =~ /-pc-sco3\.2v5/;
- if ($os eq 'solaris' and $linkwith_s =~ /-lthread/
+ if ($^O eq 'solaris' and $linkwith_s =~ /-lthread/
and $osvers >= 2.3 and $osvers <= 2.6
) {
print "WARNING: Solaris 2.5 bug #1224467 may cause '_rmutex_unlock' error.\n";
@@ -659,7 +729,7 @@
# --- Handle special cases ---
-if ($::opt_g && $os eq "MSWin32" && $Config::Config{cc} eq "cl") {
+if ($::opt_g && $^O eq "MSWin32" && $Config::Config{cc} eq "cl") {
$opts{LDDLFLAGS} = $Config::Config{lddlflags} . ' -debug'
}
@@ -669,7 +739,7 @@
-
+
@@ -677,7 +747,7 @@
# Use OCIEnvNlsCreate if available for best unicode behaviour
#$opts{DEFINE} .= ' -DNEW_OCI_INIT' if $client_version >= 9.2;
-$opts{DEFINE} .= ($os ne 'VMS')
+$opts{DEFINE} .= ($^O 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
@@ -690,15 +760,15 @@
print "\nclient_version=$client_version\n\n";
$opts{DEFINE} .= " -DORA_OCI_102" if ($::opt_V && $client_version == 10.2)
- or ( $client_version >= 10.2);
+ or ( $client_version >= 10.2);
$opts{DEFINE} .= " -DORA_OCI_112" if ($::opt_V && $client_version == 11.2)
- or ( $client_version >= 11.2);
+ or ( $client_version >= 11.2);
print "\nDEFINE=$opts{DEFINE}\n\n";
# OCIStmntFetch2() is a feature of OCI 9.0.0
$opts{DEFINE} .= " -DUSE_ORA_OCI_STMNT_FETCH " if ( $client_version < 9.0 );
-
+
# Set some private WriteMakefile options if this is 'me' :-)
if ($is_developer){ # a reasonable guess
@@ -717,9 +787,9 @@
# HP-UX 9 cannot link a non-PIC object file into a shared library.
# Since the # .a libs that Oracle supplies contain non-PIC object
# files, we sadly have to build static on HP-UX 9 :(
-if ($os eq 'hpux') {
+if ($^O eq 'hpux') {
if ($osvers < 10) {
- print "WARNING: Forced to build static not dynamic on $os $osvers.$BELL\n";
+ print "WARNING: Forced to build static not dynamic on $^O $osvers.$BELL\n";
$opts{LINKTYPE} = 'static';
}
else {
@@ -735,11 +805,11 @@
}
-# --- check for Test::Harness bug
+# --- check for Test::Harness bug
print "\nChecking for functioning wait.ph\n";
eval { package WAIT; local $^W = 0; require 'wait.ph' };
-if (!$@ && !defined(&WAIT::WCOREDUMP)) {
+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";
print "It does not define a WCOREDUMP function. That's probably an error.\n";
@@ -747,7 +817,7 @@
print "from Test::Harness about WCOREDUMP being undefined. You can either ignore\n";
print "it or try to fix your wait.ph file. The message DOES NOT reflect the\n";
print "cause of the test failure, it's just a problem interpreting the failure.\n";
-}
+}
print "\n";
@@ -757,7 +827,7 @@
print "\n";
print "System: perl$] @Config{qw(myuname)}\n";
print "Compiler: @Config{qw(cc optimize ccflags)}\n";
-print "Linker: ". (find_bin('ld')||"not found") ."\n" unless $os eq 'VMS';
+print "Linker: ". (find_bin('ld')||"not found") ."\n" unless $^O eq 'VMS';
print "Sysliblist: ".read_sysliblist()."\n";
print "Oracle makefiles would have used these definitions but we override them:\n"
if $MK{CFLAGS} || $MK{LDFLAGS} || $MK{LDSTRING};
@@ -781,7 +851,7 @@
# --- display extra notes and warnings
-if ($os eq 'aix' and $osvers >= 4 and $Config{cc} ne 'xlc_r') {
+if ($^O eq 'aix' and $osvers >= 4 and $Config{cc} ne 'xlc_r') {
print "\n";
print "WARNING: You will may need to rebuild perl using the xlc_r compiler.\a\n";
print " The important thing is that perl and DBD::Oracle be built with the same compiler.\n";
@@ -818,68 +888,59 @@
WriteMakefile( dbd_edit_mm_attribs(\%opts) );
-check_security() unless $os eq 'VMS' or $os eq 'MSWin32' or $os =~ /cygwin/i;
+check_security() unless $^O eq 'VMS' or $^O eq 'MSWin32' or $^O =~ /cygwin/i;
print "\n";
print "*** If you have problems...\n";
print " read all the log printed above, and the README and README.help.txt files.\n";
print " (Of course, you have read README by now anyway, haven't you?)\n\n";
-exit 0;
+vms_logical_names_sanity_check();
+exit 0;
-if ($os eq 'VMS') { # sanity check VMS logical names
+# === utility functions ================================
- sub search_in_search_list {
- # subroutine that searches list arg1 for item arg2
- my ($search_list_name , $logical) = @_ ;
- $search_list_name =~ s/;// ;
- $search_list_name = $search_list_name . ';';
- my $i = 0;
- my @s;
- while ( defined( $s[$i] = $ENV{$search_list_name.$i} ) ) {
- print "logical : $logical - fromlist : $s[$i] \n" if $::opt_v;
- return 1 if $s[$i++] eq $logical;
- }
- return 0
- }
+sub vms_logical_names_sanity_check {
+ return unless $^O eq 'VMS';
- if ( !$ENV{PERL_ENV_TABLES} ) { # perl_env_tables not set report
- print qq{
+ unless ( $ENV{PERL_ENV_TABLES} ) { # perl_env_tables not set report
+ print <<'END_TXT';
The logical PERL_ENV_TABLES is not set.
This means that any logical names set when testing the package
will be set in the first logical name table that occurs in the
- LNM\$FILE_DEV list.
+ LNM$FILE_DEV list.
Please read the Readme.VMS file for further information.
- \a\n};
- sleep 5;
+
+END_TXT
+
+ return;
}
- else {
- # perl_env_tables set but the element we want is missing
- if ( !search_in_search_list('PERL_ENV_TABLES;', 'LNM$JOB') ) {
- print qq{
+ return if grep { $ENV{$_} eq 'LNM$JOB' }
+ grep { /^PERL_ENV_TABLES;\d+$/ }
+ keys %ENV;
+
+# perl_env_tables set but the element we want is missing
+ print <<'END_TXT';
- The logical PERL_ENV_TABLES is set, but without LNM\$JOB.
+ The logical PERL_ENV_TABLES is set, but without LNM$JOB.
Testing the package can fail because of inability to correctly
- translate SYS\$SCRATCH for temporary storage, as SYS\$SCRATCH is
+ translate SYS$SCRATCH for temporary storage, as SYS$SCRATCH is
set at the JOB level.
- To ensure that testing the package correctly translates SYS\$SCRATCH,
- please ensure that LNM\$JOB is part of PERL_ENV_TABLES like this:
+ To ensure that testing the package correctly translates SYS$SCRATCH,
+ please ensure that LNM$JOB is part of PERL_ENV_TABLES like this:
+
+ $ DEFINE PERL_ENV_TABLES LNM$PROCESS, LNM$JOB , CRTL_ENV
+END_TXT
- \$ DEFINE PERL_ENV_TABLES LNM\$PROCESS, LNM\$JOB , CRTL_ENV
- \a\n};
- sleep 5;
- }
- } # end if
}
-# =====================================================================
sub find_oracle_home {
@@ -1029,7 +1090,7 @@
my $syslibs = (-f "$OH/lib/sysliblist")
? read_file("$OH/lib/sysliblist")
: (-f "$OH/rdbms/lib/sysliblist") ? read_file("$OH/rdbms/lib/sysliblist") : '';
- if ($os eq "hpux") {
+ if ($^O eq "hpux") {
$syslibs =~ s/-l:lib(\w+).(sl|a)\b/-l$1/g;
$syslibs =~ s/\s*-ldld\b//g;
$linkwith =~ m/-lcl\b/ or
@@ -1039,7 +1100,7 @@
}
-sub perl_is_64bit {
+sub perl_is_64bit {
return defined $Config{use64bitall} ;
}
sub ora_libdir {
@@ -1050,7 +1111,7 @@
else {
$libdir = 'lib64' if perl_is_64bit() and -d "$OH/lib64";
}
-
+
return $libdir;
}
@@ -1072,7 +1133,7 @@
sub find_mkfile {
-
+
my @mk_oci32 = (
'rdbms/demo/demo_xe.mk',
'rdbms/demo/demo_rdbms32.mk'
@@ -1084,10 +1145,10 @@
'rdbms/demo/demo_rdbms.mk',
'rdbms/demo/demo_rdbms64.mk',
'rdbms/lib/ins_rdbms.mk' #Oracle 11 full client for 64 bit and maybe 32 bit??
-
+
);
my @mk_oci = perl_is_64bit() ? @mk_oci64 : @mk_oci32;
-
+
# Add build.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
@@ -1125,7 +1186,7 @@
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;
+ } unless ($^O eq 'MSWin32') || ($^O eq 'VMS') || ($mkfile && -f $mkfile) || $::opt_F;
print "Using $mkfile\n";
return $mkfile;
@@ -1156,8 +1217,8 @@
$edit{COMPOBJS} = q{
# Firstly a Solaris specific edit:
- $_ = del_crtobj($_) if $os eq 'solaris';
-
+ $_ = del_crtobj($_) if $^O eq 'solaris';
+
# Delete any object files in COMPOBJS that don't actually exist
my $of;
foreach $of (split(/=|\s+/)) {
@@ -1166,7 +1227,7 @@
next if -e $obj;
print "Deleting $of from COMPOBJS because $obj doesn't exist.\n";
s:\Q$of::;
- }
+ }
};
# deal with (some subversions) of Oracle8.0.3's incompatible use of OBJ_EXT
@@ -1175,7 +1236,7 @@
# Don't include compiler options for these compilers
my @ignore_def = qw( BUILD_CCC296 BUILD_ICC );
my %ignore_def; @ignore_def{@ignore_def} = ('1') x @ignore_def;
-
+
my $mkver = 0;
my $lastline = '';
my @lines = read_inc_file($file);
@@ -1212,7 +1273,7 @@
}
push @rules, $tmp_line;
#print "target @tgts => $mk_target_deps{$tgt} => @{$mk_target_rules{$tgt}}\n";
- }
+ }
for (@tgts) { push @{ $mk_target_rules{$_} ||= [] }, @rules }
next;
}
@@ -1284,7 +1345,7 @@
else {
$linkvia .= '$(SSDBED) ' if $MK{SSDBED};
$linkvia .= '$(DEF_OPT) ' if $MK{DEF_OPT};
- if ($client_version_full =~ /^8\.0\./ and $os eq 'dec_osf' and $osvers >= 4.0) {
+ if ($client_version_full =~ /^8\.0\./ and $^O eq 'dec_osf' and $osvers >= 4.0) {
$linkvia .= '$(SCOREPT) $(NAETAB) $(NAEDHS) $(LLIBRDBMS_CLT) $(LLIBMM) ';
$linkvia .= '$(NETLIBS) $(CORELIBS) $(LLIBCOMMON) $(LLIBEPC) ';
$need_ldlp_env = "LD_LIBRARY_PATH";
@@ -1356,7 +1417,7 @@
my %expand_shellescape;
-sub expand_shellescape {
+sub expand_shellescape {
my($orig, $level) = @_;
my $cmd = $orig;
my $debug = $::opt_d || $::opt_v;
@@ -1373,7 +1434,7 @@
$result;
}
-sub expand_mkvars {
+sub expand_mkvars {
my ($string, $strip, $backtick, $level, $maxlevel) = @_;
return if(!defined $string);
@@ -1397,7 +1458,7 @@
}
-sub mkvar {
+sub mkvar {
my($var, $strip, $backtick, $level, $maxlevel) = @_;
my $default = $strip ? '' : "\$($var)";
print "$level Variable: $var\n" if $::opt_d;
@@ -1438,7 +1499,7 @@
my $bin = shift;
my $path_sep = $Config{path_sep};
foreach (split(/\Q$path_sep/, $ENV{PATH})){
- return "$_/$bin" if -x "$_/$bin";
+ return "$_/$bin" if -x "$_/$bin";
}
return undef;
}
@@ -1448,7 +1509,7 @@
# compensate for case where final .0 isn't in the install directory name
(my $client_version_trim = $client_version_full) =~ s/\.0$//;
-
+
my @try = ( # search the ORACLE_HOME we're using first
# --- Traditional full-install locations
"$OH/rdbms/public", # prefer public over others
@@ -1465,19 +1526,19 @@
"/usr/include/oracle/$client_version/client64", # Instant Client 11.1 and up
"/usr/include/oracle/$client_version_trim/client64", # Instant Client 64
"/usr/include/oracle/$client_version_full/client64", # Instant Client 64
-
+
);
-
+
# 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;
-
+
my %h_file;
if (@try) {
find( sub {
@@ -1512,7 +1573,7 @@
my $client_version_full = '';
- my $sqlplus_exe = ($os eq 'Win32' || $os eq 'MSWin32' || $os eq 'cygwin') ? "sqlplus.exe" : "sqlplus";
+ my $sqlplus_exe = ($^O eq 'Win32' || $^O eq 'MSWin32' || $^O eq 'cygwin') ? "sqlplus.exe" : "sqlplus";
# When building under Cygwin, ORACLE_HOME must be a native Windows
# path so Oracle itself can use it, but it needs to be translated
@@ -1520,7 +1581,7 @@
# Otherwise, the colon in the drive specification (e.g. "c:") is
# treated as a separator.
my $OH_path = $OH;
- chomp($OH_path = `/usr/bin/cygpath -u $OH_path`) if $os eq 'cygwin' && $OH;
+ chomp($OH_path = `/usr/bin/cygpath -u $OH_path`) if $^O eq 'cygwin' && $OH;
# if we have an ORACLE_HOME then prepend it to the PATH
local $ENV{PATH} = join $Config{path_sep}, "$OH_path/bin", $OH_path, $ENV{PATH} if $OH;
@@ -1539,13 +1600,13 @@
close FH;
my $sqlplus_release = `$sqlplus_exe -S /nolog \@define.sql 2>&1`;
if ($sqlplus_release =~ /(SP2-0750)|(SP2-0642)/) {
-
+
my $x = $ENV{ORACLE_HOME};
delete $ENV{ORACLE_HOME};
$sqlplus_release = `$sqlplus_exe -S /nolog \@define.sql 2>&1`;
$ENV{ORACLE_HOME} = $x;
- }
+ }
unlink "define.sql";
print $sqlplus_release; # the _SQLPLUS_RELEASE may not be on first line:
if ($sqlplus_release =~ /DEFINE _SQLPLUS_RELEASE = "(\d?\d)(\d\d)(\d\d)(\d\d)(\d\d)"/) {
@@ -1719,13 +1780,13 @@
sub const_loadlibs {
my $self = shift;
-
+
# ExtUtils::MM_Unix v1.50 (invoked by ExtUtils::MakeMaker)
# requires that $self->{LD_RUN_PATH} be defined and not be
- # an empty string for Makefile to specify its use during the
+ # an empty string for Makefile to specify its use during the
# build. This is required by both SUPER::const_loadlibs
# and SUPER::dynamic_lib. hence it is best if we define
- # or modify $self->{LD_RUN_PATH} here *before* calling
+ # or modify $self->{LD_RUN_PATH} here *before* calling
# SUPER::const_loadlibs.
@@ -1774,7 +1835,7 @@
local($_) = $self->SUPER::const_cccmd(@_);
# If perl Makefile.PL *-g* then switch on debugging
if ($::opt_g) {
- if ($os eq "MSWin32" and $Config::Config{cc} eq 'cl') {
+ if ($^O eq "MSWin32" and $Config::Config{cc} eq 'cl') {
s/\s-/ -Zi -/;
s/-O1//;
} else {
@@ -1783,7 +1844,7 @@
}
}
# are we using the non-bundled hpux compiler?
- if ($os eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
+ if ($^O eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
print "Changing -Aa to -Ae for HP-UX in ccmd.\n"
if s/-Aa\b/-Ae/g; # allow "long long" in oratypes.h
}
@@ -1796,17 +1857,17 @@
local($_) = $self->SUPER::cflags(@_);
# If perl Makefile.PL *-g* then switch on debugging
if ($::opt_g) {
- if ($os eq "MSWin32" and $Config::Config{cc} eq 'cl') {
+ if ($^O eq "MSWin32" and $Config::Config{cc} eq 'cl') {
s/\s-/ -Zi -/;
s/-O1//;
-
+
} else {
s/\s-O\d?\b//; # delete optimise option
s/\s-/ -g -/; # add -g option
}
}
# are we using the non-bundled hpux compiler?
- if ($os eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
+ if ($^O eq "hpux" and $Config::Config{ccflags} =~ /-Aa\b/) {
print "Changing -Aa to -Ae for HP-UX in cflags.\n"
if s/-Aa\b/-Ae/g; # allow "long long" in oratypes.h
}
@@ -1816,13 +1877,13 @@
sub dynamic_lib {
my($self) = shift;
- unless ($os eq 'VMS') {
+ unless ($^O eq 'VMS') {
my $m = $self->SUPER::dynamic_lib(@_);
- if ($os eq 'darwin') {
- $m = "NMEDIT = nmedit\n" . $m .
+ if ($^O eq 'darwin') {
+ $m = "NMEDIT = nmedit\n" . $m .
"\t\$(NMEDIT) -R ./hints/macos_bundle.syms \$(INST_DYNAMIC) || true\n";
}
- elsif (($os eq 'hpux') and ($osvers <11)) {
+ elsif (($^O eq 'hpux') and ($osvers <11)) {
$m =~ s/LD_RUN_PATH=(\S+)\s+(\S+)/$2 -Wl,+b $1/;
}
@@ -1854,7 +1915,7 @@
$(NOECHO) If F$TrnLNm("PerlShr").eqs."" Then Define/NoLog/User PerlShr Sys$Share:PerlShr.',$Config::Config{'dlext'},'
Lnproc $(MMS$TARGET)$(OTHERLDFLAGS) $(BASEEXT).opt/Option,$(PERL_INC)perlshr_attr.opt/Option i
';
-
+
}
push @m, $self->dir_target('$(INST_ARCHAUTODIR)');
join('',@m);
@@ -1864,8 +1925,10 @@
sub ldlibpth_info {
- my ($verbose) = @_;
+ my $verbose = shift;
+
my ($ldlibpthname, $val);
+
if ($^O eq "hpux") { # hpux is odd again: can use two env vars
my @envs = grep { $ENV{$_} } qw( LD_LIBRARY_PATH SHLIB_PATH );
$ldlibpthname = join "/", @envs;
@@ -1873,23 +1936,42 @@
}
else {
$ldlibpthname = $Config{ldlibpthname} or return;
- $val = $ENV{$ldlibpthname} || '';
+ $val = $ENV{$ldlibpthname} || '';
}
+
print "Your $ldlibpthname env var is set to '$val'\n" if $verbose;
- my @dirs = split /\Q$Config{path_sep}/o, $val, -1;
- return ($ldlibpthname, $val, @dirs);
+
+ return ( $ldlibpthname, $val, split /\Q$Config{path_sep}/, $val );
}
sub check_ldlibpthname {
- my ($libdir) = @_;
- $libdir ||= "$OH/".ora_libdir();
- $libdir =~ s:[\\/]$::;
+ my $libdir = shift || join '/', $OH, ora_libdir();
+
+ $libdir =~ s:[\\/]$::; # cut final / or \
+
my ($ldlibpthname, $val, @dirs) = ldlibpth_info(1);
+
+ my $warn_name = $ldlibpthname;
+
return 1 if grep { s:[\\/]$::; $_ eq $libdir } @dirs;
- warn "WARNING: Your $ldlibpthname env var doesn't include '$libdir' but probably needs to.$BELL\n";
- sleep 5;
- return;
+
+ # on solaris, it can be under LD_LIBRARY_PATH_(32|64)
+ if ( $^O eq 'solaris' ) {
+ my $ld_library_path_name = 'LD_LIBRARY_PATH_'
+ . ( perl_is_64bit() ? '64' : '32' );
+
+ $warn_name .= " or $ld_library_path_name";
+
+ my @dirs = split quotemeta($Config{path_sep}),
+ $ENV{$ld_library_path_name};
+
+ s#[\\/]$## for @dirs; # cut potential final / or \
+
+ return if grep { $_ eq $libdir } @dirs;
+ }
+
+ warn "WARNING: Your $warn_name env var doesn't include '$libdir' but probably needs to.\n";
}
@@ -1898,7 +1980,7 @@
# if set, this allows a user to fork a root shell!
# Get the octal portion of perms that indicates
# SUID and SGID, and warn if either is set
-
+
my @files = map { ($_,$_.'0') } qw(
oratclsh lsnrctl oemevent onrsd osslogin tnslsnr
tnsping trcasst trcroute cmctl cmadmin cmgw names namesctl otrccref
@@ -1922,5 +2004,29 @@
sleep 6;
}
+sub check_macos_symbol_table {
+ # Check for symbol table problem in libclntsh.dylib.9.0 on MacOS X
+ return unless $^O eq 'darwin';
+ my $oracle_lib = "$OH/lib/libclntsh.dylib";
+
+ return unless -f $oracle_lib;
+
+ open my $nm_fh, '-|', "nm $oracle_lib"
+ or die "couldn't run 'nm $oracle_lib': $!";
+
+ while ( <$nm_fh> ) {
+ return if /^\s+U _(dlsym|dlclose)/;
+ }
+
+ warn <<"END_WARNING";
+WARNING: symbol table may need modification in Oracle library:
+ $oracle_lib
+If the build fails in the linking stage, manual modification is
+required - see README.macosx.txt
+END_WARNING
+
+ return;
+}
+
__END__
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.pm
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.pm (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.pm Thu Oct 6 13:44:16 2011
@@ -7,7 +7,7 @@
require 5.006;
-$DBD::Oracle::VERSION = '1.30';
+$DBD::Oracle::VERSION = '1.31_00';
my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_ROOT' : 'ORACLE_HOME';
@@ -1580,7 +1580,7 @@
#import the ora fail over constants
#set up TAF on the connection
- my $dbh = DBI->connect('dbi:Oracle:XE','hr','hr',{ora_taf=>1,taf_sleep=>5,ora_taf_function=>'handle_taft'});
+ my $dbh = DBI->connect('dbi:Oracle:XE','hr','hr',{ora_taf=>1,taf_sleep=>5,ora_taf_function=>'handle_taf'});
#create the perl TAF event function
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/Oraperl.pm
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/Oraperl.pm (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/Oraperl.pm Thu Oct 6 13:44:16 2011
@@ -229,7 +229,7 @@
=head1 NAME
-Oraperl - deprecated (Repreived for now, but Will be removed in a future release) Perl access to Oracle databases for old oraperl scripts
+Oraperl - [DEPRECATED] Perl access to Oracle databases for old oraperl scripts
=head1 SYNOPSIS
@@ -292,6 +292,11 @@
eval 'use Oraperl; 1;' || die $@ if $] >= 5;
+
+The use of I<Oraperl> is deprecated in favor of L<DBD::Oracle>,
+and will be removed from the I<DBD::Oracle> distribution as of
+1.38.
+
=head2 Principal Functions
The main functions for database access are &ora_login(), &ora_open(),
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/README.macosx.txt
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/README.macosx.txt (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/README.macosx.txt Thu Oct 6 13:44:16 2011
@@ -4,10 +4,10 @@
time of writing).
MacOS X DBD::Oracle has been tested (and used) under Jaguar (10.2.x),
-Panther (10.3.x), Snow Leopard (10.6.x). Jaguar comes with a Perl
-version of 5.6.0., which I can report to work with DBD::Oracle 1.14
-and higher once you take certain steps (see below). You may want to
-install a later perl, e.g., Perl 5.8.x. Please refer to:
+Panther (10.3.x), Snow Leopard (10.6.x), Lion (10.7.x). Jaguar comes
+with a Perl version of 5.6.0., which I can report to work with
+DBD::Oracle 1.14 and higher once you take certain steps (see below).
+You may want to install a later perl, e.g., Perl 5.8.x. Please refer to:
Installing Perl 5.8 on Jaguar
http://developer.apple.com/internet/macosx/perl.html
@@ -48,6 +48,39 @@
10.3.x) for details.
======================================================================
+Instructions for 10.7.x (Lion)
+
+Because the 64 bit instantclient is currently [incompatible with Lion][],
+DBD::Oracle can only be compiled with the 32-bit instantclient libraries, and
+therefore requires 32-bit Perl. If your Perl is 64-bit (which, by default, it
+is on Mac OS X), you will not be able to build DBD::Oracle until an updated
+64-bit instantclient is released.
+
+[incompatible with Lion]: http://only4left.jpiwowar.com/2011/08/instant-client-osx-lion-32-bit-only/
+
+If you have a 32-bit Perl, however, then the following steps should work:
+
+* Download and install the 32-bit basic, sqlplus, and sdk instantclient
+ libraries and install them in a central location, such as
+ `/usr/oracle_instantclient`. [Downloads here][].
+
+ [Downloads here]: http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
+
+* Create a symlink from `libclntsh.dylib.10.1` to `libclntsh.dylib`:
+
+ cd /usr/oracle_instantclient/
+ link -s libclntsh.dylib.10.1 libclntsh.dylib
+
+* Update your environment to point to the libraries:
+
+ export ORACLE_HOME=/usr/oracle_instantclient
+ export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/oracle_instantclient
+
+* You should now be able to install DBD::Oracle from CPAN:
+
+ cpan DBD::Oracle
+
+======================================================================
Instructions for 10.6.x (Snow Leopard)
These are taken from a stackoverflow answer by "nickisfat" who gave
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/README (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/README)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/bind.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/bind.pl)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/commit.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/commit.pl)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/curref.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/curref.pl)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/ex.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/ex.pl)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/japh (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/japh)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/mktable.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/mktable.pl)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/ora_explain.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/ora_explain.PL)
==============================================================================
--- /dbd-oracle/branches/DBD-Oracle-1.31_00/ora_explain.PL (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/examples/ora_explain.pl Thu Oct 6 13:44:16 2011
@@ -1,9 +1,4 @@
-# -*- perl -*-
-
-use strict;
-
-my $script = <<'SCRIPT';
-~startperl~ -w
+#!/usr/bin/env perl
################################################################################
# Copyright (c) 1999 Alan Burlison
@@ -22,6 +17,8 @@
################################################################################
use strict;
+use warnings;
+
use File::Basename;
use DBI;
use Tk;
@@ -1417,7 +1414,7 @@
-columnspan => 2, -padx => 6, -pady => 6);
$frame1->pack(-fill => "x");
&$ord_bn_cb(); # Set the buttons to the initial state
-$frame->pack(-fill => "x", ipadx => 6, -ipady => 6);
+$frame->pack(-fill => "x", -padx => 6, -pady => 6);
### Buttons
$frame = $GrabMain->Frame(-borderwidth => 3, -relief => "raised");
@@ -1573,14 +1570,11 @@
=head1 NAME
-explain, ora_explain - deprecated (Will be removed from DBD::Oracle in 1.29) Visualise Oracle query plans
+ora_explain.pl - Visualise Oracle query plans
=head1 SYNOPSIS
- $ explain [ [ user/password@database ] sql script ]
- $ ora_explain [ [ user/password@database ] sql script ]
-
-B<Note:> When bundled with DBD::Oracle, the script is called ora_explain
+ $ ora_explain.pl [ [ user/password@database ] sql script ]
=head1 DESCRIPTION
@@ -1632,29 +1626,9 @@
Items 2 through 6 can be obtained from any CPAN mirror.
-=head1 INSTALLATION
-
-=over 2
-
-=item 1.
-
-Check you have all the prequisites installed and working.
-
-=item 2.
-
-Run 'perl Makefile.PL; make instal1'
-
-=item 3.
-
-Make sure you have run the script $ORACLE_HOME/rdbms/admin/utlxplan.sql
-from a SQL*Plus session. This script creates the PLAN_TABLE that is used
-by Oracle when explaining query plans.
-
-=back
-
=head1 HOW TO USE
-Type "explain" or "ora_explain" at the shell prompt. A window will appear with
+Type "ora_explain.pl" at the shell prompt. A window will appear with
a menu bar and three frames, labelled "Query Plan", "Query Step Details" and
"SQL Editor". At the bottom of the window are three buttons labelled
"Explain", "Clear" and "SQL Cache". A login dialog will also appear, into
@@ -1789,18 +1763,3 @@
endorsed or warrantied by Sun Microsystems.
=cut
-SCRIPT
-
-use Config;
-
-my $file = __FILE__; $file =~ s/\.PL$//;
-
-$script =~ s/\~(\w+)\~/$Config{$1}/eg;
-if (!(open(FILE, ">$file")) ||
- !(print FILE $script) ||
- !(close(FILE))) {
- die "Error while writing $file: $!\n";
-}
-print "Extracted $file from ",__FILE__," with variable substitutions.\n";
-
-# End.
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/oradump.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/oradump.pl)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/proc.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/proc.pl)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/sql (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/sql)
==============================================================================
Copied: dbd-oracle/branches/DBD-Oracle-1.31_00/examples/tabinfo.pl (from r14941, /dbd-oracle/branches/DBD-Oracle-1.31_00/Oracle.ex/tabinfo.pl)
==============================================================================
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/lib/DBD/Oracle/GetInfo.pm
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/lib/DBD/Oracle/GetInfo.pm (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/lib/DBD/Oracle/GetInfo.pm Thu Oct 6 13:44:16 2011
@@ -5,8 +5,14 @@
my $sql_driver = 'Oracle';
my $sql_ver_fmt = '%02d.%02d.%04d'; # ODBC version string: ##.##.#####
+my ($a,$b,$c) = (0,0,0);
+my $ver = $DBD::Oracle::VERSION;
+my @parts = split /\./, $ver;
+$a = $parts[0];
+($b,$c) = split /_/, $parts[1];
+$c = 0 if !$c;
-my $sql_driver_ver = sprintf $sql_ver_fmt, split (/\./, "$DBD::Oracle::VERSION.0.0.0.0.0.0");
+my $sql_driver_ver = sprintf $sql_ver_fmt, $a, $b, $c;
sub sql_dbms_version {
my $dbh = shift;
Added: dbd-oracle/branches/DBD-Oracle-1.31_00/t/00versions.t
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/t/00versions.t Thu Oct 6 13:44:16 2011
@@ -0,0 +1,45 @@
+# reports on all interesting versions
+
+use strict;
+use warnings;
+
+use lib 't';
+
+use Test::More tests => 2;
+
+use DBD::Oracle qw/ ORA_OCI /;
+require 'nchar_test_lib.pl';
+
+my $oci_version = ORA_OCI();
+
+diag "OCI client library version: ", $oci_version;
+
+ok $oci_version;
+
+SKIP: {
+ my $dsn = oracle_test_dsn();
+ my $dbuser = $ENV{ORACLE_USERID} || 'scott/tiger';
+
+ my $dbh = DBI->connect($dsn, $dbuser, '',{ PrintError => 0, }) or
+ note <<'END_NOTE' or skip q{can't connect to database} => 1;
+
+Can't connect to an Oracle instance.
+
+Without a database connection, most of DBD::Oracle's test suite will
+be skipped. To let the tests use a database, set up the
+environment variables ORACLE_USERID and ORACLE_DSN. E.g.:
+
+ $ export ORACLE_USERID='scott/tiger'
+ $ export ORACLE_DSN='dbi:Oracle:testdb'
+
+END_NOTE
+
+ my $sth = $dbh->prepare( q{select * from v$version where banner like 'Oracle%'} );
+ $sth->execute;
+
+ my $version = join ' ', $sth->fetchrow;
+
+ diag 'database version: ', $version;
+
+ ok $version;
+}
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/t/10general.t
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/t/10general.t (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/t/10general.t Thu Oct 6 13:44:16 2011
@@ -1,4 +1,5 @@
-#!perl -w
+use strict;
+use warnings;
use Test::More;
@@ -7,7 +8,6 @@
use Config;
use DBD::Oracle qw(ORA_OCI);
-
unshift @INC ,'t';
require 'nchar_test_lib.pl';
@@ -32,7 +32,10 @@
my($sth, $p1, $p2, $tmp);
SKIP: {
skip "not unix-like", 2 unless $Config{d_semctl};
- skip "solaris with OCI>9.x", 2 unless ($^O eq "solaris") and (scalar(ORA_OCI) ge 10);
+
+ my @ora_oci_version = split /\./, ORA_OCI();
+ skip 'solaris with OCI>9.x', 2
+ if $^O eq 'solaris' and $ora_oci_version[0] > 9;
# basic check that we can fork subprocesses and wait for the status
# after having connected to Oracle
@@ -111,5 +114,3 @@
ok((scalar @ora_oci == grep { DBI::looks_like_number($_) } @ora_oci),
'version looks like numbers');
is($ora_oci[0], int($ora_oci), 'first number is int');
-
-exit 0;
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/t/21nchar.t
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/t/21nchar.t (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/t/21nchar.t Thu Oct 6 13:44:16 2011
@@ -20,8 +20,8 @@
# $dbh->{PrintError} = 1;
plan skip_all => "Unable to connect to Oracle" if not $dbh;
- diag("testing control and 8 bit chars:\n") ;
- diag(" Database and client versions and character sets:\n");
+ note("testing control and 8 bit chars:\n") ;
+ note(" Database and client versions and character sets:\n");
show_db_charsets( $dbh);
plan skip_all => "Oracle charset tests unreliable for Oracle 8 client"
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/t/30long.t
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/t/30long.t (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/t/30long.t Thu Oct 6 13:44:16 2011
@@ -56,13 +56,13 @@
}
my $ora_server_version = $dbh->func("ora_server_version");
-diag("ora_server_version: @$ora_server_version\n");
+note("ora_server_version: @$ora_server_version\n");
show_db_charsets($dbh) if $dbh;
foreach (@test_sets) {
my ($type_name, $type_num, $test_no_type) = @$_;
$use_utf8_data = use_utf8_data($dbh,$type_name);
- diag( qq(
+ note( qq(
=========================================================================
Running long test for $type_name ($type_num) use_utf8_data=$use_utf8_data
));
@@ -111,7 +111,7 @@
my $utf_x = "0\x{263A}xyX"; #lab: the ubiquitous smiley face
$long_data[0] = ($utf_x x 2048) x (1 ); # 10KB < 64KB
if (length($long_data[0]) > 10240) {
- diag "known bug in perl5.6.0 utf8 support, applying workaround\n";
+ note "known bug in perl5.6.0 utf8 support, applying workaround\n";
my $utf_z = "0\x{263A}xyZ" ;
$long_data[0] = $utf_z;
$long_data[0] .= $utf_z foreach (1..2047);
@@ -151,11 +151,11 @@
if (!create_table($dbh, $tdata, 1));
# typically OCI 8 client talking to Oracle 7 database
- diag("long_data[0] length $len_data0\n");
- diag("long_data[1] length $len_data1\n");
- diag("long_data[2] length $len_data2\n");
+ note("long_data[0] length $len_data0\n");
+ note("long_data[1] length $len_data1\n");
+ note("long_data[2] length $len_data2\n");
- diag(" --- insert some $type_name data (ora_type $type_num)\n");
+ note(" --- insert some $type_name data (ora_type $type_num)\n");
my $sqlstr = "insert into $table values (?, ?, SYSDATE)" ;
ok( $sth = $dbh->prepare( $sqlstr ), "prepare: $sqlstr" );
my $bind_attr = { ora_type => $type_num };
@@ -172,10 +172,10 @@
array_test($dbh);
- diag(" --- fetch $type_name data back again -- truncated - LongTruncOk == 1\n");
+ note(" --- fetch $type_name data back again -- truncated - LongTruncOk == 1\n");
$dbh->{LongReadLen} = 20;
$dbh->{LongTruncOk} = 1;
- diag("LongReadLen $dbh->{LongReadLen}, LongTruncOk $dbh->{LongTruncOk}\n");
+ note("LongReadLen $dbh->{LongReadLen}, LongTruncOk $dbh->{LongTruncOk}\n");
# This behaviour isn't specified anywhere, sigh:
my $out_len = $dbh->{LongReadLen};
@@ -212,12 +212,12 @@
ok(!defined $tmp->[3][1], "last row undefined"); # NULL # known bug in DBD::Oracle <= 1.13
}
- diag(" --- fetch $type_name data back again -- truncated - LongTruncOk == 0\n");
+ note(" --- fetch $type_name data back again -- truncated - LongTruncOk == 0\n");
$dbh->{LongReadLen} = $len_data1 - 10; # so $long_data[0] fits but long_data[1] doesn't
$dbh->{LongReadLen} = $dbh->{LongReadLen} / 2 if $type_name =~ /RAW/i;
my $LongReadLen = $dbh->{LongReadLen};
$dbh->{LongTruncOk} = 0;
- diag("LongReadLen $dbh->{LongReadLen}, LongTruncOk $dbh->{LongTruncOk}\n");
+ note("LongReadLen $dbh->{LongReadLen}, LongTruncOk $dbh->{LongTruncOk}\n");
$sqlstr = "select * from $table order by idx";
ok($sth = $dbh->prepare($sqlstr), "prepare $sqlstr" );
@@ -235,10 +235,10 @@
}
$sth->finish;
- diag(" --- fetch $type_name data back again -- complete - LongTruncOk == 0\n");
+ note(" --- fetch $type_name data back again -- complete - LongTruncOk == 0\n");
$dbh->{LongReadLen} = $len_data1 +1000;
$dbh->{LongTruncOk} = 0;
- diag("LongReadLen $dbh->{LongReadLen}, LongTruncOk $dbh->{LongTruncOk}\n");
+ note("LongReadLen $dbh->{LongReadLen}, LongTruncOk $dbh->{LongTruncOk}\n");
$sqlstr = "select * from $table order by idx";
ok($sth = $dbh->prepare($sqlstr), "prepare: $sqlstr" );
@@ -257,7 +257,7 @@
if ($type_name =~ /LONG/i) ;
#$dbh->trace(4);
- diag(" --- fetch $type_name data back again -- via blob_read\n\n");
+ note(" --- fetch $type_name data back again -- via blob_read\n\n");
$dbh->{LongReadLen} = 1024 * 90;
$dbh->{LongTruncOk} = 1;
@@ -266,11 +266,11 @@
ok($sth->execute, "execute $sqlstr" );
- diag("fetch via fetchrow_arrayref\n");
+ note("fetch via fetchrow_arrayref\n");
ok($tmp = $sth->fetchrow_arrayref, "fetchrow_arrayref 1: $sqlstr" );
cmp_ok_byte_nice($tmp->[1], $long_data[0], "truncated to LongReadLen $out_len");
- diag("read via blob_read_all\n");
+ note("read via blob_read_all\n");
cmp_ok(blob_read_all($sth, 1, \$p1, 4096) ,'==', length($long_data[0]),
"blob_read_all = length(\$long_data[0])" );
ok($p1 eq $long_data[0], cdif($p1, $long_data[0]) );
@@ -289,7 +289,7 @@
cmp_ok($len,'==', length($long_data[2]), "length of long_data[2] = $len" );
cmp_ok_byte_nice($p1, $long_data[2], "3rd row via blob_read_all");
- diag("result is ".(utf8::is_utf8($p1) ? "UTF8" : "non-UTF8")."\n");
+ note("result is ".(utf8::is_utf8($p1) ? "UTF8" : "non-UTF8")."\n");
if ($be_utf8) {
ok( utf8::is_utf8($p1), "result should be utf8");
}
@@ -303,7 +303,7 @@
skip( "ora_auto_lob tests for $type_name" ."s - not supported", 7+(13*3) )
if not ( $type_name =~ /LOB/i );
- diag(" --- testing ora_auto_lob to access $type_name LobLocator\n\n");
+ note(" --- testing ora_auto_lob to access $type_name LobLocator\n\n");
my $data_fmt = "%03d foo!";
$sqlstr = qq{
@@ -315,7 +315,7 @@
ok($ll_sth->execute ,"execute $sqlstr" );
while (my ($lob_locator, $idx) = $ll_sth->fetchrow_array) {
- diag("$idx: ".DBI::neat($lob_locator)."\n");
+ note("$idx: ".DBI::neat($lob_locator)."\n");
last if !defined($lob_locator) && $idx == 43;
ok($lob_locator, '$lob_locator is true' );
@@ -327,22 +327,22 @@
ok(!$DBI::err, "DBI::errstr");
my $data = sprintf $data_fmt, $idx; #create a little data
- diag("length of data to be written at offset 1: " .length($data) ."\n" );
+ note("length of data to be written at offset 1: " .length($data) ."\n" );
ok($dbh->func($lob_locator, 1, $data, 'ora_lob_write') ,"ora_lob_write" );
}
is($ll_sth->rows, 4);
- diag(" --- round again to check contents after $type_name write updates...\n");
+ note(" --- round again to check contents after $type_name write updates...\n");
ok($ll_sth->execute,"execute (again 1) $sqlstr" );
while (my ($lob_locator, $idx) = $ll_sth->fetchrow_array) {
- diag("$idx locator: ".DBI::neat($lob_locator)."\n");
+ note("$idx locator: ".DBI::neat($lob_locator)."\n");
next if !defined($lob_locator) && $idx == 43;
diag("DBI::errstr=$DBI::errstr\n") if $DBI::err ;
my $content = $dbh->func($lob_locator, 1, 20, 'ora_lob_read');
diag("DBI::errstr=$DBI::errstr\n") if $DBI::err ;
ok($content,"content is true" );
- diag("$idx content: ".nice_string($content)."\n"); #.DBI::neat($content)."\n";
+ note("$idx content: ".nice_string($content)."\n"); #.DBI::neat($content)."\n";
cmp_ok(length($content) ,'==', 20 ,"lenth(content)" );
# but prefix has been overwritten:
@@ -374,10 +374,10 @@
} #while fetchrow
is($ll_sth->rows, 4);
- diag(" --- round again to check the $type_name length...\n");
+ note(" --- round again to check the $type_name length...\n");
ok($ll_sth->execute ,"execute (again 2) $sqlstr" );
while (my ($lob_locator, $idx) = $ll_sth->fetchrow_array) {
- diag("$idx locator: ".DBI::neat($lob_locator)."\n");
+ note("$idx locator: ".DBI::neat($lob_locator)."\n");
next if !defined($lob_locator) && $idx == 43;
my $len = $dbh->func($lob_locator, 'ora_lob_length');
#lab: possible logic error here w/resp. to len
@@ -410,8 +410,8 @@
$a = [];
$sth->bind_param_inout(1,\$a, 2);
$sth->execute;
- diag("a=$a\n");
- diag("a=@$a\n");
+ note("a=$a\n");
+ note("a=@$a\n");
};
die "RETURNING array: $@";
}
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/t/40ph_type.t
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/t/40ph_type.t (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/t/40ph_type.t Thu Oct 6 13:44:16 2011
@@ -69,9 +69,7 @@
my $ph_type = $test_info->{type} || die;
my $name = $test_info->{name} || die;
- diag("\n");
- diag("testing @{[ %$test_info ]} ...\n");
- diag("\n");
+ note("\ntesting @{[ %$test_info ]} ...\n\n");
SKIP: {
skip "skipping tests", 12 if ($test_info->{SKIP});
@@ -95,7 +93,7 @@
$dbh->rollback;
delete $_->{name} foreach values %$tmp;
- diag(Data::Dumper::Dumper($tmp));
+ note(Data::Dumper::Dumper($tmp));
# check trailing_space behaviour
my $expect = $val_with_trailing_space;
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/t/50cursor.t
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/t/50cursor.t (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/t/50cursor.t Thu Oct 6 13:44:16 2011
@@ -49,7 +49,7 @@
my @cursors;
my @row;
-diag("opening cursors\n");
+note("opening cursors\n");
my $open_cursor = $dbh->prepare( qq{
BEGIN OPEN :kursor FOR
SELECT * FROM all_objects WHERE rownum < 5;
@@ -58,7 +58,7 @@
ok($open_cursor, 'open cursor' );
foreach ( 1 .. $limit ) {
- diag("opening cursor $_\n");
+ note("opening cursor $_\n");
ok( $open_cursor->bind_param_inout( ":kursor", \my $cursor, 0, { ora_type => ORA_RSET } ), 'open cursor bind param inout' );
ok( $open_cursor->execute, 'open cursor execute' );
ok(!$open_cursor->{Active}, 'open cursor Active');
@@ -72,7 +72,7 @@
push @cursors, $cursor;
}
-diag("closing cursors\n");
+note("closing cursors\n");
my $close_cursor = $dbh->prepare( qq{ BEGIN CLOSE :kursor; END; } );
ok($close_cursor, 'close cursor');
foreach ( 1 .. @cursors ) {
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/t/70meta.t
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/t/70meta.t (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/t/70meta.t Thu Oct 6 13:44:16 2011
@@ -20,14 +20,14 @@
plan skip_all => "Unable to connect to Oracle";
}
-diag("type_info_all\n");
+note("type_info_all\n");
my @types = $dbh->type_info(SQL_ALL_TYPES);
ok(@types >= 8, 'more than 8 types');
-diag(Dumper( @types ));
+note(Dumper( @types ));
-diag("tables():\n");
+note("tables():\n");
my @tables = $dbh->tables;
-diag(@tables." tables\n");
+note(@tables." tables\n");
ok(scalar @tables, 'tables');
my @table_info_params = (
Modified: dbd-oracle/branches/DBD-Oracle-1.31_00/t/nchar_test_lib.pl
==============================================================================
--- dbd-oracle/branches/DBD-Oracle-1.31_00/t/nchar_test_lib.pl (original)
+++ dbd-oracle/branches/DBD-Oracle-1.31_00/t/nchar_test_lib.pl Thu Oct 6 13:44:16 2011
@@ -48,10 +48,6 @@
binmode($tb->failure_output, ':utf8');
binmode($tb->output, ':utf8');
-# disable diag unless TEST_VERBOSE is set.
-if (!exists($ENV{TEST_VERBOSE})) {
- $tb->no_diag(1);
-}
sub long_test_cols
{
my ($type) = @_ ;
@@ -193,7 +189,7 @@
my $nice_string = nice_string($v);
my $out = sprintf( "row: %3d: nice_string=%s byte_string=%s (%s, %s)\n",
$cnt, $nice_string, $byte_string, $v, DBI::neat($v));
- diag($out);
+ note($out);
}
return $cnt;
}
@@ -391,7 +387,7 @@
} else {
#$sql =~ s/ \( */(\n\t/g;
#$sql =~ s/, */,\n\t/g;
- diag("$sql\n") ;
+ note("$sql\n") ;
}
return $table;
# ok( not $dbh->err, "create table $table..." );
@@ -410,11 +406,11 @@
db_ochar_is_utf($dbh) ? "Unicode" : "Non-Unicode",
$paramsH->{NLS_NCHAR_CHARACTERSET},
db_nchar_is_utf($dbh) ? "Unicode" : "Non-Unicode";
- diag($out);
+ note($out);
my $ora_client_version = ORA_OCI();
$out = sprintf "Client $ora_client_version NLS_LANG is '%s', NLS_NCHAR is '%s'\n",
ora_env_var("NLS_LANG") || "<unset>", ora_env_var("NLS_NCHAR") || "<unset>";
- diag($out);
+ note($out);
}
sub db_ochar_is_utf { return shift->ora_can_unicode & 2 }
sub db_nchar_is_utf { return shift->ora_can_unicode & 1 }