Author: byterock
Date: Mon Dec 21 10:25:03 2009
New Revision: 13698
Added:
dbd-oracle/branches/DBD-Oracle8/Oracle_8.bs
dbd-oracle/branches/DBD-Oracle8/Oracle_8.c
dbd-oracle/branches/DBD-Oracle8/Oracle_8.def
dbd-oracle/branches/DBD-Oracle8/Oracle_8.h
dbd-oracle/branches/DBD-Oracle8/Oracle_8.obj (contents, props changed)
dbd-oracle/branches/DBD-Oracle8/Oracle_8.pm
dbd-oracle/branches/DBD-Oracle8/Oracle_8.xs
dbd-oracle/branches/DBD-Oracle8/Oracle_8.xsi
dbd-oracle/branches/DBD-Oracle8/Oraperl_8.pm
dbd-oracle/branches/DBD-Oracle8/oraperl_8.ph
Modified:
dbd-oracle/branches/DBD-Oracle8/Makefile
dbd-oracle/branches/DBD-Oracle8/Makefile.PL
dbd-oracle/branches/DBD-Oracle8/Oracle.def
dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/Oracle.dll
dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/Oracle.exp
dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/Oracle.lib
dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/Oracle.pdb
dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/mk.pm
dbd-oracle/branches/DBD-Oracle8/dbdimp.c
dbd-oracle/branches/DBD-Oracle8/dbdimp.obj
dbd-oracle/branches/DBD-Oracle8/mk.pm
dbd-oracle/branches/DBD-Oracle8/oci8.c
dbd-oracle/branches/DBD-Oracle8/oci8.obj
dbd-oracle/branches/DBD-Oracle8/vc70.pdb
Log:
my changes for new 0ci8 compile
Modified: dbd-oracle/branches/DBD-Oracle8/Makefile
==============================================================================
--- dbd-oracle/branches/DBD-Oracle8/Makefile (original)
+++ dbd-oracle/branches/DBD-Oracle8/Makefile Mon Dec 21 10:25:03 2009
@@ -1,278 +1,311 @@
-# This Makefile is for the DBD::Oracle extension to perl.
+# This Makefile is for the DBD::Oracle_8 extension to perl.
#
# It was generated automatically by MakeMaker version
-# 5.45 (Revision: 1.222) from the contents of
+# 6.55_02 (Revision: 65502) from the contents of
# Makefile.PL. Don't edit this file, edit Makefile.PL instead.
#
-# ANY CHANGES MADE HERE WILL BE LOST!
+# ANY CHANGES MADE HERE WILL BE LOST!
#
# MakeMaker ARGV: ()
#
+
# MakeMaker Parameters:
-# ABSTRACT_FROM => q[Oracle.pm]
-# AUTHOR => q[Tim Bunce ([email protected])]
-# DEFINE => q[ -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.1.0.4\"]
-# DIR => []
-# EXE_FILES => [q[ora_explain]]
-# INC => q[-Ic:/instant10.1/sdk/include -Ic:/instant10.1/rdbms/demo -IC:/Perl/site/lib/auto/DBI/]
-# LIBS => [q[-Lc:/instant10.1/sdk/LIB/MSVC OCI]]
-# NAME => q[DBD::Oracle]
-# OBJECT => q[$(O_FILES)]
-# PREREQ_PM => { DBI=>q[0] }
-# VERSION_FROM => q[Oracle.pm]
-# clean => { FILES=>q[xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*] }
-# dist => { DIST_DEFAULT=>q[clean distcheck disttest tardist], PREOP=>q[$(MAKE) -f Makefile.old distdir], COMPRESS=>q[gzip -v9], SUFFIX=>q[gz] }
+# ABSTRACT_FROM => q[Oracle_8.pm]
+# AUTHOR => q[Tim Bunce ([email protected])]
+# BUILD_REQUIRES => { }
+# DEFINE => q[ -DUTF8_SUPPORT -DORA_OCI_VERSION=\"8.1.7.0\"]
+# DIR => []
+# EXE_FILES => [q[ora_explain]]
+# INC => q[-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/]
+# LIBS => [q[-LC:/oracle/ora92/oci/LIB/MSVC OCI]]
+# NAME => q[DBD::Oracle_8]
+# OBJECT => q[$(O_FILES)]
+# PREREQ_PM => { DBI=>q[0] }
+# VERSION_FROM => q[Oracle_8.pm]
+# clean => { FILES=>q[xstmp.c Oracle_8.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*] }
+# dist => { DIST_DEFAULT=>q[clean distcheck disttest tardist], COMPRESS=>q[gzip -v9], PREOP=>q[$(MAKE) -f Makefile.old distdir], SUFFIX=>q[gz] }
# --- MakeMaker post_initialize section:
# --- MakeMaker const_config section:
-# These definitions are from config.sh (via C:/Perl/lib/Config.pm)
-
-# They may have been overridden via Makefile.PL or on the command line
+# These definitions are from config.sh (via C:/Perl10/lib/Config.pm).
+# They may have been overridden via Makefile.PL or on the command line.
AR = lib
CC = cl
CCCDLFLAGS =
CCDLFLAGS =
DLEXT = dll
DLSRC = dl_win32.xs
+EXE_EXT = .exe
+FULL_AR =
LD = link
-LDDLFLAGS = -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86
-LDFLAGS = -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86
+LDDLFLAGS = -dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl10\lib\CORE" -machine:x86
+LDFLAGS = -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl10\lib\CORE" -machine:x86
LIBC = msvcrt.lib
LIB_EXT = .lib
OBJ_EXT = .obj
OSNAME = MSWin32
-OSVERS = 4.0
+OSVERS = 5.00
RANLIB = rem
+SITELIBEXP = C:\Perl10\site\lib
+SITEARCHEXP = C:\Perl10\site\lib
SO = dll
-EXE_EXT = .exe
-FULL_AR =
+VENDORARCHEXP =
+VENDORLIBEXP =
# --- MakeMaker constants section:
AR_STATIC_ARGS = cr
-NAME = DBD::Oracle
-DISTNAME = DBD-Oracle
-NAME_SYM = DBD_Oracle
-VERSION = 1.17
-VERSION_SYM = 1_17
-XS_VERSION = 1.17
-INST_BIN = blib\bin
-INST_EXE = blib\script
-INST_LIB = blib\lib
+DIRFILESEP = ^\
+DFSEP = $(DIRFILESEP)
+NAME = DBD::Oracle_8
+NAME_SYM = DBD_Oracle_8
+VERSION = 0.01
+VERSION_MACRO = VERSION
+VERSION_SYM = 0_01
+DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
+XS_VERSION = 0.01
+XS_VERSION_MACRO = XS_VERSION
+XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
INST_ARCHLIB = blib\arch
INST_SCRIPT = blib\script
-PREFIX = C:\Perl
+INST_BIN = blib\bin
+INST_LIB = blib\lib
+INST_MAN1DIR = blib\man1
+INST_MAN3DIR = blib\man3
+INST_HTMLDIR = blib\html
+MAN1EXT = 1
+MAN3EXT = 3
INSTALLDIRS = site
-INSTALLPRIVLIB = $(PREFIX)\lib
-INSTALLARCHLIB = $(PREFIX)\lib
-INSTALLSITELIB = C:\Perl\site\lib
-INSTALLSITEARCH = C:\Perl\site\lib
-INSTALLBIN = $(PREFIX)\bin
-INSTALLSCRIPT = $(PREFIX)\bin
-PERL_LIB = C:\Perl\lib
-PERL_ARCHLIB = C:\Perl\lib
-SITELIBEXP = C:\Perl\site\lib
-SITEARCHEXP = C:\Perl\site\lib
+DESTDIR =
+PREFIX = $(SITEPREFIX)
+PERLPREFIX = C:\Perl10
+SITEPREFIX = C:\Perl10\site
+VENDORPREFIX =
+INSTALLPRIVLIB = C:\Perl10\lib
+DESTINSTALLPRIVLIB = $(DESTDIR)$(INSTALLPRIVLIB)
+INSTALLSITELIB = C:\Perl10\site\lib
+DESTINSTALLSITELIB = $(DESTDIR)$(INSTALLSITELIB)
+INSTALLVENDORLIB =
+DESTINSTALLVENDORLIB = $(DESTDIR)$(INSTALLVENDORLIB)
+INSTALLARCHLIB = C:\Perl10\lib
+DESTINSTALLARCHLIB = $(DESTDIR)$(INSTALLARCHLIB)
+INSTALLSITEARCH = C:\Perl10\site\lib
+DESTINSTALLSITEARCH = $(DESTDIR)$(INSTALLSITEARCH)
+INSTALLVENDORARCH =
+DESTINSTALLVENDORARCH = $(DESTDIR)$(INSTALLVENDORARCH)
+INSTALLBIN = C:\Perl10\bin
+DESTINSTALLBIN = $(DESTDIR)$(INSTALLBIN)
+INSTALLSITEBIN = C:\Perl10\site\bin
+DESTINSTALLSITEBIN = $(DESTDIR)$(INSTALLSITEBIN)
+INSTALLVENDORBIN =
+DESTINSTALLVENDORBIN = $(DESTDIR)$(INSTALLVENDORBIN)
+INSTALLSCRIPT = C:\Perl10\bin
+DESTINSTALLSCRIPT = $(DESTDIR)$(INSTALLSCRIPT)
+INSTALLSITESCRIPT = C:\Perl10\site\bin
+DESTINSTALLSITESCRIPT = $(DESTDIR)$(INSTALLSITESCRIPT)
+INSTALLVENDORSCRIPT =
+DESTINSTALLVENDORSCRIPT = $(DESTDIR)$(INSTALLVENDORSCRIPT)
+INSTALLMAN1DIR = C:\Perl10\man\man1
+DESTINSTALLMAN1DIR = $(DESTDIR)$(INSTALLMAN1DIR)
+INSTALLSITEMAN1DIR = $(INSTALLMAN1DIR)
+DESTINSTALLSITEMAN1DIR = $(DESTDIR)$(INSTALLSITEMAN1DIR)
+INSTALLVENDORMAN1DIR =
+DESTINSTALLVENDORMAN1DIR = $(DESTDIR)$(INSTALLVENDORMAN1DIR)
+INSTALLMAN3DIR = C:\Perl10\man\man3
+DESTINSTALLMAN3DIR = $(DESTDIR)$(INSTALLMAN3DIR)
+INSTALLSITEMAN3DIR = $(INSTALLMAN3DIR)
+DESTINSTALLSITEMAN3DIR = $(DESTDIR)$(INSTALLSITEMAN3DIR)
+INSTALLVENDORMAN3DIR =
+DESTINSTALLVENDORMAN3DIR = $(DESTDIR)$(INSTALLVENDORMAN3DIR)
+INSTALLHTMLDIR = C:\Perl10\html
+DESTINSTALLHTMLDIR = $(DESTDIR)$(INSTALLHTMLDIR)
+INSTALLSITEHTMLDIR = C:\Perl10\html
+DESTINSTALLSITEHTMLDIR = $(DESTDIR)$(INSTALLSITEHTMLDIR)
+INSTALLVENDORHTMLDIR = C:\Perl10\html
+DESTINSTALLVENDORHTMLDIR = $(DESTDIR)$(INSTALLVENDORHTMLDIR)
+PERL_LIB = C:\Perl10\lib
+PERL_ARCHLIB = C:\Perl10\lib
LIBPERL_A = libperl.lib
FIRST_MAKEFILE = Makefile
+MAKEFILE_OLD = Makefile.old
MAKE_APERL_FILE = Makefile.aperl
PERLMAINCC = $(CC)
-PERL_INC = C:\Perl\lib\CORE
-PERL = C:\Perl\bin\perl.exe
-FULLPERL = C:\Perl\bin\perl.exe
-
-VERSION_MACRO = VERSION
-DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\"
-XS_VERSION_MACRO = XS_VERSION
-XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\"
-
-MAKEMAKER =
-MM_VERSION = 5.45
+PERL_INC = C:\Perl10\lib\CORE
+PERL = C:\Perl10\bin\perl.exe
+FULLPERL = C:\Perl10\bin\perl.exe
+ABSPERL = $(PERL)
+PERLRUN = $(PERL)
+FULLPERLRUN = $(FULLPERL)
+ABSPERLRUN = $(ABSPERL)
+PERLRUNINST = $(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+FULLPERLRUNINST = $(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+ABSPERLRUNINST = $(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"
+PERL_CORE = 0
+PERM_DIR = 755
+PERM_RW = 644
+PERM_RWX = 755
+
+MAKEMAKER = C:/Perl10/lib/ExtUtils/MakeMaker.pm
+MM_VERSION = 6.55_02
+MM_REVISION = 65502
# FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle).
# BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle)
-# ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD) !!! Deprecated from MM 5.32 !!!
# PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar)
# DLBASE = Basename part of dynamic library. May be just equal BASEEXT.
-FULLEXT = DBD\Oracle
-BASEEXT = Oracle
+MAKE = C:\Perl\bin\nmake.exe
+FULLEXT = DBD\Oracle_8
+BASEEXT = Oracle_8
PARENT_NAME = DBD
DLBASE = $(BASEEXT)
-VERSION_FROM = Oracle.pm
-INC = -Ic:/instant10.1/sdk/include -Ic:/instant10.1/rdbms/demo -IC:/Perl/site/lib/auto/DBI/
-DEFINE = -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\"10.1.0.4\"
+VERSION_FROM = Oracle_8.pm
+INC = -IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/
+DEFINE = -DUTF8_SUPPORT -DORA_OCI_VERSION=\"8.1.7.0\"
OBJECT = $(O_FILES)
LDFROM = $(OBJECT)
LINKTYPE = dynamic
+BOOTDEP =
# Handy lists of source code files:
-XS_FILES= Oracle.xs
-C_FILES = Oracle.c \
+XS_FILES = Oracle_8.xs
+C_FILES = Oracle_8.c \
dbdimp.c \
oci8.c
-O_FILES = Oracle.obj \
+O_FILES = Oracle_8.obj \
dbdimp.obj \
oci8.obj
-H_FILES = Oracle.h \
+H_FILES = Oracle_8.h \
dbdimp.h \
dbivport.h \
ocitrace.h
-HTMLLIBPODS =
-HTMLSCRIPTPODS =
-MAN1PODS =
-MAN3PODS =
-HTMLEXT = html
-INST_MAN1DIR =
-INSTALLMAN1DIR =
-MAN1EXT = 1
-INST_MAN3DIR =
-INSTALLMAN3DIR =
-MAN3EXT = 3
-
-# work around a famous dec-osf make(1) feature(?):
-makemakerdflt: all
-
-.SUFFIXES: .xs .c .C .cpp .cxx .cc $(OBJ_EXT)
-
-# Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to recall, that
-# some make implementations will delete the Makefile when we rebuild it. Because
-# we call false(1) when we rebuild it. So make(1) is not completely wrong when it
-# does so. Our milage may vary.
-# .PRECIOUS: Makefile # seems to be not necessary anymore
-
-.PHONY: all config static dynamic test linkext manifest
+MAN1PODS = ora_explain
+MAN3PODS = Oracle_8.pm \
+ Oraperl_8.pm
# Where is the Config information that we are using/depend on
-CONFIGDEP = $(PERL_ARCHLIB)\Config.pm $(PERL_INC)\config.h
+CONFIGDEP = $(PERL_ARCHLIB)$(DFSEP)Config.pm $(PERL_INC)$(DFSEP)config.h
-# Where to put things:
+# Where to build things
INST_LIBDIR = $(INST_LIB)\DBD
INST_ARCHLIBDIR = $(INST_ARCHLIB)\DBD
INST_AUTODIR = $(INST_LIB)\auto\$(FULLEXT)
INST_ARCHAUTODIR = $(INST_ARCHLIB)\auto\$(FULLEXT)
-INST_STATIC = $(INST_ARCHAUTODIR)\$(BASEEXT)$(LIB_EXT)
-INST_DYNAMIC = $(INST_ARCHAUTODIR)\$(DLBASE).$(DLEXT)
-INST_BOOT = $(INST_ARCHAUTODIR)\$(BASEEXT).bs
-
-EXPORT_LIST = Oracle.def
+INST_STATIC = $(INST_ARCHAUTODIR)\$(BASEEXT)$(LIB_EXT)
+INST_DYNAMIC = $(INST_ARCHAUTODIR)\$(DLBASE).$(DLEXT)
+INST_BOOT = $(INST_ARCHAUTODIR)\$(BASEEXT).bs
+
+# Extra linker info
+EXPORT_LIST = $(BASEEXT).def
+PERL_ARCHIVE = $(PERL_INC)\perl510.lib
+PERL_ARCHIVE_AFTER =
-PERL_ARCHIVE = $(PERL_INC)\perl56.lib
-TO_INST_PM = Oracle.h \
- Oracle.pm \
- Oraperl.pm \
+TO_INST_PM = Oracle_8.h \
+ Oracle_8.pm \
+ Oraperl_8.pm \
dbdimp.h \
lib/DBD/Oracle/GetInfo.pm \
mk.pm \
ocitrace.h \
- oraperl.ph
+ oraperl_8.ph
-PM_TO_BLIB = lib/DBD/Oracle/GetInfo.pm \
- $(INST_LIB)\DBD\Oracle\GetInfo.pm \
- Oracle.pm \
- $(INST_LIBDIR)\Oracle.pm \
+PM_TO_BLIB = Oraperl_8.pm \
+ $(INST_LIB)/Oraperl_8.pm \
+ Oracle_8.h \
+ $(INST_ARCHAUTODIR)/Oracle_8.h \
+ Oracle_8.pm \
+ $(INST_LIB)\DBD\Oracle_8.pm \
dbdimp.h \
$(INST_ARCHAUTODIR)/dbdimp.h \
- mk.pm \
- $(INST_ARCHAUTODIR)/mk.pm \
ocitrace.h \
$(INST_ARCHAUTODIR)/ocitrace.h \
- Oracle.h \
- $(INST_ARCHAUTODIR)/Oracle.h \
- oraperl.ph \
- $(INST_LIB)/oraperl.ph \
- Oraperl.pm \
- $(INST_LIB)/Oraperl.pm
+ oraperl_8.ph \
+ $(INST_LIB)/oraperl_8.ph \
+ lib/DBD/Oracle/GetInfo.pm \
+ blib\lib\DBD\Oracle\GetInfo.pm \
+ mk.pm \
+ $(INST_ARCHAUTODIR)/mk.pm
-# --- MakeMaker tool_autosplit section:
+# --- MakeMaker platform_constants section:
+MM_Win32_VERSION = 6.55_02
+
+# --- MakeMaker tool_autosplit section:
# Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto
-AUTOSPLITFILE = $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MAutoSplit -e "autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1);"
+AUTOSPLITFILE = $(ABSPERLRUN) -e "use AutoSplit; autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1)" --
+
# --- MakeMaker tool_xsubpp section:
-XSUBPPDIR = C:\Perl\lib\ExtUtils
-XSUBPP = $(XSUBPPDIR)/xsubpp
+XSUBPPDIR = C:\Perl10\lib\ExtUtils
+XSUBPP = $(XSUBPPDIR)$(DFSEP)xsubpp
+XSUBPPRUN = $(PERLRUN) $(XSUBPP)
XSPROTOARG =
-XSUBPPDEPS = $(XSUBPPDIR)\typemap typemap $(XSUBPP)
-XSUBPPARGS = -typemap $(XSUBPPDIR)\typemap -typemap typemap
+XSUBPPDEPS = C:\Perl10\lib\ExtUtils\typemap typemap $(XSUBPP)
+XSUBPPARGS = -typemap C:\Perl10\lib\ExtUtils\typemap -typemap typemap
+XSUBPP_EXTRA_ARGS =
# --- MakeMaker tools_other section:
-
-SHELL = cmd /x /c
-CHMOD = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e chmod
-CP = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e cp
-LD = link
-MV = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mv
+CHMOD = $(ABSPERLRUN) -MExtUtils::Command -e "chmod" --
+CP = $(ABSPERLRUN) -MExtUtils::Command -e "cp" --
+MV = $(ABSPERLRUN) -MExtUtils::Command -e "mv" --
NOOP = rem
-RM_F = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f
-RM_RF = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_rf
-TEST_F = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e test_f
-TOUCH = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e touch
+NOECHO = @
+RM_F = $(ABSPERLRUN) -MExtUtils::Command -e "rm_f" --
+RM_RF = $(ABSPERLRUN) -MExtUtils::Command -e "rm_rf" --
+TEST_F = $(ABSPERLRUN) -MExtUtils::Command -e "test_f" --
+TOUCH = $(ABSPERLRUN) -MExtUtils::Command -e "touch" --
UMASK_NULL = umask 0
DEV_NULL = > NUL
-
-# The following is a portable way to say mkdir -p
-# To see which directories are created, change the if 0 to if 1
-MKPATH = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mkpath
-
-# This helps us to minimize the effect of the .exists files A yet
-# better solution would be to have a stable file in the perl
-# distribution with a timestamp of zero. But this solution doesn't
-# need any changes to the core distribution and works with older perls
-EQUALIZE_TIMESTAMP = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e eqtime
-
-# Here we warn users that an old packlist file was found somewhere,
-# and that they should call some uninstall routine
-WARN_IF_OLD_PACKLIST = $(PERL) -lwe "exit unless -f $$ARGV[0];" \
--e "print 'WARNING: I have found an old package in';" \
--e "print ' ', $$ARGV[0], '.';" \
--e "print 'Please make sure the two installations are not conflicting';"
-
-UNINST=0
-VERBINST=1
-
-MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \
--e "install({ @ARGV },'$(VERBINST)',0,'$(UNINST)');"
-
-DOC_INSTALL = $(PERL) -e "$$\=\"\n\n\";" \
--e "print '=head2 ', scalar(localtime), ': C<', shift, '>', ' L<', $$arg=shift, '|', $$arg, '>';" \
--e "print '=over 4';" \
--e "while (defined($$key = shift) and defined($$val = shift)) { print '=item *';print 'C<', \"$$key: $$val\", '>'; }" \
--e "print '=back';"
-
-UNINSTALL = $(PERL) -MExtUtils::Install \
--e "uninstall($$ARGV[0],1,1); print \"\nUninstall is deprecated. Please check the";" \
--e "print \" packlist above carefully.\n There may be errors. Remove the\";" \
--e "print \" appropriate files manually.\n Sorry for the inconveniences.\n\""
+MKPATH = $(ABSPERLRUN) -MExtUtils::Command -e "mkpath" --
+EQUALIZE_TIMESTAMP = $(ABSPERLRUN) -MExtUtils::Command -e "eqtime" --
+FALSE = $(ABSPERLRUN) -e "exit 1" --
+TRUE = $(ABSPERLRUN) -e "exit 0" --
+ECHO = $(ABSPERLRUN) -l -e "print qq{@ARGV}" --
+ECHO_N = $(ABSPERLRUN) -e "print qq{@ARGV}" --
+UNINST = 0
+VERBINST = 0
+MOD_INSTALL = $(ABSPERLRUN) -MExtUtils::Install -e "install([ from_to => {@ARGV}, verbose => '$(VERBINST)', uninstall_shadows => '$(UNINST)', dir_mode => '$(PERM_DIR)' ]);" --
+DOC_INSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e "perllocal_install" --
+UNINSTALL = $(ABSPERLRUN) -MExtUtils::Command::MM -e "uninstall" --
+WARN_IF_OLD_PACKLIST = $(ABSPERLRUN) -MExtUtils::Command::MM -e "warn_if_old_packlist" --
+MACROSTART =
+MACROEND =
+USEMAKEFILE = -f
+FIXIN = pl2bat.bat
+
+
+# --- MakeMaker makemakerdflt section:
+makemakerdflt : all
+ $(NOECHO) $(NOOP)
# --- MakeMaker dist section:
-
-DISTVNAME = $(DISTNAME)-$(VERSION)
-TAR = tar
+TAR = tar
TARFLAGS = cvf
-ZIP = zip
+ZIP = zip
ZIPFLAGS = -r
COMPRESS = gzip -v9
SUFFIX = gz
SHAR = shar
PREOP = $(MAKE) -f Makefile.old distdir
-POSTOP = @$(NOOP)
-TO_UNIX = @$(NOOP)
+POSTOP = $(NOECHO) $(NOOP)
+TO_UNIX = $(NOECHO) $(NOOP)
CI = ci -u
RCS_LABEL = rcs -Nv$(VERSION_SYM): -q
DIST_CP = best
DIST_DEFAULT = clean distcheck disttest tardist
+DISTNAME = DBD-Oracle_8
+DISTVNAME = DBD-Oracle_8-0.01
# --- MakeMaker macro section:
@@ -283,24 +316,24 @@
# --- MakeMaker cflags section:
-CCFLAGS = -nologo -O1 -MD -Zi -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX
-OPTIMIZE = -O1 -MD -Zi -DNDEBUG
+CCFLAGS = -nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX
+OPTIMIZE = -MD -Zi -DNDEBUG -O1
PERLTYPE =
-MPOLLUTE =
# --- MakeMaker const_loadlibs section:
-# DBD::Oracle might depend on some other libraries:
+# DBD::Oracle_8 might depend on some other libraries:
# See ExtUtils::Liblist for details
#
-EXTRALIBS = c:\instant10.1\sdk\LIB\MSVC\OCI.lib "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\oldnames.lib" "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\kernel32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\user32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\gdi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\winspool.lib" "C:\Program Files\Microsoft Platform SDK\Lib\comdlg32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\advapi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\shell32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ole32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\oleaut32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\netapi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\uuid.lib" "C:\Program Files\Microsoft Platform SDK\Lib\wsock32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\mpr.lib" "C:\Program Files\Microsoft Platform SDK\Lib\winmm.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ver
sion.lib" "C:\Program Files\Microsoft Platform SDK\Lib\odbc32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\odbccp32.lib" "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\msvcrt.lib" -L$(LIBHOME)
-LDLOADLIBS = c:\instant10.1\sdk\LIB\MSVC\OCI.lib "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\oldnames.lib" "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\kernel32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\user32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\gdi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\winspool.lib" "C:\Program Files\Microsoft Platform SDK\Lib\comdlg32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\advapi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\shell32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ole32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\oleaut32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\netapi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\uuid.lib" "C:\Program Files\Microsoft Platform SDK\Lib\wsock32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\mpr.lib" "C:\Program Files\Microsoft Platform SDK\Lib\winmm.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ve
rsion.lib" "C:\Program Files\Microsoft Platform SDK\Lib\odbc32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\odbccp32.lib" "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\msvcrt.lib"
+EXTRALIBS = C:\oracle\ora92\oci\LIB\MSVC\OCI.lib "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\oldnames.lib" "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\kernel32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\user32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\gdi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\winspool.lib" "C:\Program Files\Microsoft Platform SDK\Lib\comdlg32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\advapi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\shell32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ole32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\oleaut32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\netapi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\uuid.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ws2_32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\mpr.lib" "C:\Program Files\Microsoft Platform SDK\Lib\winmm.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ver
sion.lib" "C:\Program Files\Microsoft Platform SDK\Lib\odbc32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\odbccp32.lib" "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\msvcrt.lib" -L$(LIBHOME)
+LDLOADLIBS = C:\oracle\ora92\oci\LIB\MSVC\OCI.lib "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\oldnames.lib" "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\kernel32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\user32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\gdi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\winspool.lib" "C:\Program Files\Microsoft Platform SDK\Lib\comdlg32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\advapi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\shell32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ole32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\oleaut32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\netapi32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\uuid.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ws2_32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\mpr.lib" "C:\Program Files\Microsoft Platform SDK\Lib\winmm.lib" "C:\Program Files\Microsoft Platform SDK\Lib\ve
rsion.lib" "C:\Program Files\Microsoft Platform SDK\Lib\odbc32.lib" "C:\Program Files\Microsoft Platform SDK\Lib\odbccp32.lib" "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib\msvcrt.lib"
BSLOADLIBS =
-LD_RUN_PATH=c:/instant10.1/lib:c:/instant10.1/rdbms/lib
+
# --- MakeMaker const_cccmd section:
-CCCMD = $(CC) -c $(INC) $(CCFLAGS) $(OPTIMIZE) \
+CCCMD = $(CC) -c $(PASTHRU_INC) $(INC) \
+ $(CCFLAGS) $(OPTIMIZE) \
$(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
$(XS_DEFINE_VERSION)
@@ -310,122 +343,153 @@
# --- MakeMaker pasthru section:
PASTHRU = -nologo
+# --- MakeMaker special_targets section:
+.SUFFIXES : .xs .c .C .cpp .i .s .cxx .cc $(OBJ_EXT)
+
+.PHONY: all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir
+
+
+
# --- MakeMaker c_o section:
+.c.i:
+ cl -nologo -E -c $(PASTHRU_INC) $(INC) \
+ $(CCFLAGS) $(OPTIMIZE) \
+ $(PERLTYPE) $(MPOLLUTE) $(DEFINE_VERSION) \
+ $(XS_DEFINE_VERSION) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c > $*.i
+
+.c.s:
+ $(CCCMD) -S $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
+
.c$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.c
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.c
.cpp$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.cpp
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cpp
.cxx$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.cxx
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cxx
.cc$(OBJ_EXT):
- $(CCCMD) $(CCCDLFLAGS) -I$(PERL_INC) $(DEFINE) $*.cc
+ $(CCCMD) $(CCCDLFLAGS) "-I$(PERL_INC)" $(PASTHRU_DEFINE) $(DEFINE) $*.cc
# --- MakeMaker xs_c section:
.xs.c:
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(XSUBPP) $(XSPROTOARG) $(XSUBPPARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
+ $(XSUBPPRUN) $(XSPROTOARG) $(XSUBPPARGS) $(XSUBPP_EXTRA_ARGS) $*.xs > $*.xsc && $(MV) $*.xsc $*.c
# --- MakeMaker xs_o section:
# --- MakeMaker top_targets section:
+all :: pure_all htmlifypods
+ $(NOECHO) $(NOOP)
-#all :: config $(INST_PM) subdirs linkext manifypods
-
-all :: pure_all htmlifypods manifypods
- @$(NOOP)
pure_all :: config pm_to_blib subdirs linkext
- @$(NOOP)
+ $(NOECHO) $(NOOP)
subdirs :: $(MYEXTLIB)
- @$(NOOP)
-
-config :: Makefile $(INST_LIBDIR)\.exists
- @$(NOOP)
-
-config :: $(INST_ARCHAUTODIR)\.exists
- @$(NOOP)
-
-config :: $(INST_AUTODIR)\.exists
- @$(NOOP)
-
-$(INST_AUTODIR)\.exists :: C:\Perl\lib\CORE\perl.h
- @$(MKPATH) $(INST_AUTODIR)
- @$(EQUALIZE_TIMESTAMP) C:\Perl\lib\CORE\perl.h $(INST_AUTODIR)\.exists
+ $(NOECHO) $(NOOP)
- -@$(CHMOD) $(PERM_RWX) $(INST_AUTODIR)
-
-$(INST_LIBDIR)\.exists :: C:\Perl\lib\CORE\perl.h
- @$(MKPATH) $(INST_LIBDIR)
- @$(EQUALIZE_TIMESTAMP) C:\Perl\lib\CORE\perl.h $(INST_LIBDIR)\.exists
-
- -@$(CHMOD) $(PERM_RWX) $(INST_LIBDIR)
-
-$(INST_ARCHAUTODIR)\.exists :: C:\Perl\lib\CORE\perl.h
- @$(MKPATH) $(INST_ARCHAUTODIR)
- @$(EQUALIZE_TIMESTAMP) C:\Perl\lib\CORE\perl.h $(INST_ARCHAUTODIR)\.exists
-
- -@$(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR)
+config :: $(FIRST_MAKEFILE) blibdirs
+ $(NOECHO) $(NOOP)
$(O_FILES): $(H_FILES)
-help:
+help :
perldoc ExtUtils::MakeMaker
-Version_check:
- @$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \
- -MExtUtils::MakeMaker=Version_check \
- -e "Version_check('$(MM_VERSION)')"
+
+# --- MakeMaker blibdirs section:
+blibdirs : $(INST_LIBDIR)$(DFSEP).exists $(INST_ARCHLIB)$(DFSEP).exists $(INST_AUTODIR)$(DFSEP).exists $(INST_ARCHAUTODIR)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists $(INST_SCRIPT)$(DFSEP).exists $(INST_MAN1DIR)$(DFSEP).exists $(INST_MAN3DIR)$(DFSEP).exists
+ $(NOECHO) $(NOOP)
+
+# Backwards compat with 6.18 through 6.25
+blibdirs.ts : blibdirs
+ $(NOECHO) $(NOOP)
+
+$(INST_LIBDIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_LIBDIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_LIBDIR)
+ $(NOECHO) $(TOUCH) $(INST_LIBDIR)$(DFSEP).exists
+
+$(INST_ARCHLIB)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_ARCHLIB)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHLIB)
+ $(NOECHO) $(TOUCH) $(INST_ARCHLIB)$(DFSEP).exists
+
+$(INST_AUTODIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_AUTODIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_AUTODIR)
+ $(NOECHO) $(TOUCH) $(INST_AUTODIR)$(DFSEP).exists
+
+$(INST_ARCHAUTODIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_ARCHAUTODIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_ARCHAUTODIR)
+ $(NOECHO) $(TOUCH) $(INST_ARCHAUTODIR)$(DFSEP).exists
+
+$(INST_BIN)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_BIN)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_BIN)
+ $(NOECHO) $(TOUCH) $(INST_BIN)$(DFSEP).exists
+
+$(INST_SCRIPT)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_SCRIPT)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_SCRIPT)
+ $(NOECHO) $(TOUCH) $(INST_SCRIPT)$(DFSEP).exists
+
+$(INST_MAN1DIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_MAN1DIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN1DIR)
+ $(NOECHO) $(TOUCH) $(INST_MAN1DIR)$(DFSEP).exists
+
+$(INST_MAN3DIR)$(DFSEP).exists :: Makefile.PL
+ $(NOECHO) $(MKPATH) $(INST_MAN3DIR)
+ $(NOECHO) $(CHMOD) $(PERM_DIR) $(INST_MAN3DIR)
+ $(NOECHO) $(TOUCH) $(INST_MAN3DIR)$(DFSEP).exists
+
# --- MakeMaker linkext section:
linkext :: $(LINKTYPE)
- @$(NOOP)
+ $(NOECHO) $(NOOP)
# --- MakeMaker dlsyms section:
-Oracle.def: Makefile.PL
- $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Mksymlists \
- -e "Mksymlists('NAME' => 'DBD::Oracle', 'DLBASE' => '$(BASEEXT)', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
+Oracle_8.def: Makefile.PL
+ $(PERLRUN) -MExtUtils::Mksymlists \
+ -e "Mksymlists('NAME'=>\"DBD::Oracle_8\", 'DLBASE' => '$(BASEEXT)', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
# --- MakeMaker dynamic section:
-## $(INST_PM) has been moved to the all: target.
-## It remains here for awhile to allow for old usage: "make dynamic"
-#dynamic :: Makefile $(INST_DYNAMIC) $(INST_BOOT) $(INST_PM)
-dynamic :: Makefile $(INST_DYNAMIC) $(INST_BOOT)
- @$(NOOP)
+dynamic :: $(FIRST_MAKEFILE) $(INST_DYNAMIC) $(INST_BOOT)
+ $(NOECHO) $(NOOP)
# --- MakeMaker dynamic_bs section:
-
-BOOTSTRAP = Oracle.bs
+BOOTSTRAP = $(BASEEXT).bs
# As Mkbootstrap might not write a file (if none is required)
# we use touch to prevent make continually trying to remake it.
# The DynaLoader only reads a non-empty file.
-$(BOOTSTRAP): Makefile $(INST_ARCHAUTODIR)\.exists
- @echo "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))"
- @$(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" \
- -MExtUtils::Mkbootstrap \
+$(BOOTSTRAP) : $(FIRST_MAKEFILE) $(BOOTDEP) $(INST_ARCHAUTODIR)$(DFSEP).exists
+ $(NOECHO) $(ECHO) "Running Mkbootstrap for $(NAME) ($(BSLOADLIBS))"
+ $(NOECHO) $(PERLRUN) \
+ "-MExtUtils::Mkbootstrap" \
-e "Mkbootstrap('$(BASEEXT)','$(BSLOADLIBS)');"
- @$(TOUCH) $(BOOTSTRAP)
- $(CHMOD) 644 $@
+ $(NOECHO) $(TOUCH) $@
+ $(CHMOD) $(PERM_RW) $@
-$(INST_BOOT): $(BOOTSTRAP) $(INST_ARCHAUTODIR)\.exists
- @$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_rf $(INST_BOOT)
- -$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e cp $(BOOTSTRAP) $(INST_BOOT)
- $(CHMOD) 644 $@
+$(INST_BOOT) : $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists
+ $(NOECHO) $(RM_RF) $@
+ - $(CP) $(BOOTSTRAP) $@
+ $(CHMOD) $(PERM_RW) $@
# --- MakeMaker dynamic_lib section:
@@ -435,133 +499,208 @@
OTHERLDFLAGS =
INST_DYNAMIC_DEP =
-$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)\.exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
+$(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $(BOOTSTRAP) $(INST_ARCHAUTODIR)$(DFSEP).exists $(EXPORT_LIST) $(PERL_ARCHIVE) $(INST_DYNAMIC_DEP)
$(LD) -out:$@ $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) -def:$(EXPORT_LIST)
- $(CHMOD) 755 $@
+ if exist [email protected] mt -nologo -manifest [email protected] -outputresource:$@;2
+ if exist [email protected] del [email protected]
+ $(CHMOD) $(PERM_RWX) $@
# --- MakeMaker static section:
## $(INST_PM) has been moved to the all: target.
## It remains here for awhile to allow for old usage: "make static"
-#static :: Makefile $(INST_STATIC) $(INST_PM)
-static :: Makefile $(INST_STATIC)
- @$(NOOP)
+static :: $(FIRST_MAKEFILE) $(INST_STATIC)
+ $(NOECHO) $(NOOP)
# --- MakeMaker static_lib section:
-
-$(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)\.exists
+$(INST_STATIC): $(OBJECT) $(MYEXTLIB) $(INST_ARCHAUTODIR)$(DFSEP).exists
$(RM_RF) $@
$(AR) -out:$@ $(OBJECT)
- @echo "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld
- $(CHMOD) 755 $@
+ $(CHMOD) $(PERM_RWX) $@
+ $(NOECHO) $(ECHO) "$(EXTRALIBS)" > $(INST_ARCHAUTODIR)\extralibs.ld
+
+
+# --- MakeMaker manifypods section:
+
+POD2MAN_EXE = $(PERLRUN) "-MExtUtils::Command::MM" -e pod2man "--"
+POD2MAN = $(POD2MAN_EXE)
+
+
+manifypods : pure_all \
+ ora_explain \
+ Oraperl_8.pm \
+ Oracle_8.pm
+ $(NOECHO) $(POD2MAN) --section=1 --perm_rw=$(PERM_RW) \
+ ora_explain $(INST_MAN1DIR)\ora_explain.$(MAN1EXT)
+ $(NOECHO) $(POD2MAN) --section=3 --perm_rw=$(PERM_RW) \
+ Oraperl_8.pm $(INST_MAN3DIR)\DBD\Oraperl_8.$(MAN3EXT) \
+ Oracle_8.pm $(INST_MAN3DIR)\DBD\Oracle_8.$(MAN3EXT)
+
+
# --- MakeMaker htmlifypods section:
-htmlifypods : pure_all
- @$(NOOP)
+POD2HTML_EXE = $(PERLRUN) "-MActivePerl::DocTools" -e "UpdateHTML_blib(installdirs => "$(INSTALLDIRS)")"
+POD2HTML = $(POD2HTML_EXE)
-# --- MakeMaker manifypods section:
+htmlifypods : \
+ ora_explain \
+ Oraperl_8.pm \
+ Oracle_8.pm
+ $(NOECHO) $(POD2HTML)
-manifypods :
- @$(NOOP)
# --- MakeMaker processPL section:
all :: ora_explain
- @$(NOOP)
+ $(NOECHO) $(NOOP)
-ora_explain :: ora_explain.PL
- $(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) ora_explain.PL ora_explain
+ora_explain :: ora_explain.PL pm_to_blib
+ $(PERLRUNINST) ora_explain.PL ora_explain
# --- MakeMaker installbin section:
-$(INST_SCRIPT)\.exists :: C:\Perl\lib\CORE\perl.h
- @$(MKPATH) $(INST_SCRIPT)
- @$(EQUALIZE_TIMESTAMP) C:\Perl\lib\CORE\perl.h $(INST_SCRIPT)\.exists
-
- -@$(CHMOD) $(PERM_RWX) $(INST_SCRIPT)
-
EXE_FILES = ora_explain
-FIXIN = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \
- -e "system qq[pl2bat.bat ].shift"
-
pure_all :: $(INST_SCRIPT)\ora_explain
- @$(NOOP)
+ $(NOECHO) $(NOOP)
realclean ::
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f $(INST_SCRIPT)\ora_explain
+ $(RM_F) \
+ $(INST_SCRIPT)\ora_explain
-$(INST_SCRIPT)\ora_explain: ora_explain Makefile $(INST_SCRIPT)\.exists
- @$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f $(INST_SCRIPT)\ora_explain
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e cp ora_explain $(INST_SCRIPT)\ora_explain
+$(INST_SCRIPT)\ora_explain : ora_explain $(FIRST_MAKEFILE) $(INST_SCRIPT)$(DFSEP).exists $(INST_BIN)$(DFSEP).exists
+ $(NOECHO) $(RM_F) $(INST_SCRIPT)\ora_explain
+ $(CP) ora_explain $(INST_SCRIPT)\ora_explain
$(FIXIN) $(INST_SCRIPT)\ora_explain
- -@$(CHMOD) $(PERM_RWX) $(INST_SCRIPT)\ora_explain
+ -$(NOECHO) $(CHMOD) $(PERM_RWX) $(INST_SCRIPT)\ora_explain
+
# --- MakeMaker subdirs section:
# none
+# --- MakeMaker clean_subdirs section:
+clean_subdirs :
+ $(NOECHO) $(NOOP)
+
+
# --- MakeMaker clean section:
# Delete temporary files but do not touch installed files. We don't delete
# the Makefile here so a later make realclean still has a makefile to use.
-clean ::
- -$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_rf Oracle.c xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.* ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all perlmain.c mon.out core core.*perl.*.? *perl.core so_locations pm_to_blib *$(OBJ_EXT) *$(LIB_EXT) perl.exe $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def $(BASEEXT).exp
- -$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mv Makefile Makefile.old $(DEV_NULL)
+clean :: clean_subdirs
+ - $(RM_F) \
+ *$(LIB_EXT) core \
+ core.[0-9] core.[0-9][0-9] \
+ $(BASEEXT).bso $(INST_ARCHAUTODIR)\extralibs.ld \
+ pm_to_blib.ts core.[0-9][0-9][0-9][0-9] \
+ $(BASEEXT).x $(BOOTSTRAP) \
+ perl$(EXE_EXT) tmon.out \
+ $(INST_ARCHAUTODIR)\extralibs.all *$(OBJ_EXT) \
+ pm_to_blib blibdirs.ts \
+ core.[0-9][0-9][0-9][0-9][0-9] *perl.core \
+ core.*perl.*.? Oracle_8.c \
+ $(MAKE_APERL_FILE) perl \
+ $(BASEEXT).def core.[0-9][0-9][0-9] \
+ mon.out lib$(BASEEXT).def \
+ perlmain.c perl.exe \
+ so_locations $(BASEEXT).exp
+ - $(RM_RF) \
+ *.pdb Oracle_8.xsi \
+ ora_explain dll.base \
+ DBD_ORA_OBJ.* dll.exp \
+ libOracle.def sqlnet.log \
+ blib mk.pm \
+ xstmp.c
+ - $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD) $(DEV_NULL)
+
+
+# --- MakeMaker realclean_subdirs section:
+realclean_subdirs :
+ $(NOECHO) $(NOOP)
# --- MakeMaker realclean section:
-
-# Delete temporary files (via clean) and also delete installed files
-realclean purge :: clean
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_rf $(INST_AUTODIR) $(INST_ARCHAUTODIR)
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f $(INST_DYNAMIC) $(INST_BOOT)
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f $(INST_STATIC)
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f $(INST_LIB)\DBD\Oracle\GetInfo.pm $(INST_LIBDIR)\Oracle.pm
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f $(INST_ARCHAUTODIR)/dbdimp.h $(INST_ARCHAUTODIR)/mk.pm
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f $(INST_ARCHAUTODIR)/ocitrace.h $(INST_ARCHAUTODIR)/Oracle.h
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f $(INST_LIB)/oraperl.ph $(INST_LIB)/Oraperl.pm
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_rf Makefile Makefile.old
+# Delete temporary files (via clean) and also delete dist files
+realclean purge :: clean realclean_subdirs
+ - $(RM_F) \
+ $(OBJECT) $(MAKEFILE_OLD) \
+ $(FIRST_MAKEFILE)
+ - $(RM_RF) \
+ $(DISTVNAME)
+
+
+# --- MakeMaker metafile section:
+metafile : create_distdir
+ $(NOECHO) $(ECHO) Generating META.yml
+ $(NOECHO) $(ECHO) "--- #YAML:1.0" > META_new.yml
+ $(NOECHO) $(ECHO) "name: DBD-Oracle_8" >> META_new.yml
+ $(NOECHO) $(ECHO) "version: 0.01" >> META_new.yml
+ $(NOECHO) $(ECHO) "abstract: ~" >> META_new.yml
+ $(NOECHO) $(ECHO) "author:" >> META_new.yml
+ $(NOECHO) $(ECHO) " - Tim Bunce ([email protected])" >> META_new.yml
+ $(NOECHO) $(ECHO) "license: unknown" >> META_new.yml
+ $(NOECHO) $(ECHO) "distribution_type: module" >> META_new.yml
+ $(NOECHO) $(ECHO) "configure_requires:" >> META_new.yml
+ $(NOECHO) $(ECHO) " ExtUtils::MakeMaker: 0" >> META_new.yml
+ $(NOECHO) $(ECHO) "build_requires:" >> META_new.yml
+ $(NOECHO) $(ECHO) " ExtUtils::MakeMaker: 0" >> META_new.yml
+ $(NOECHO) $(ECHO) "requires:" >> META_new.yml
+ $(NOECHO) $(ECHO) " DBI: 0" >> META_new.yml
+ $(NOECHO) $(ECHO) "no_index:" >> META_new.yml
+ $(NOECHO) $(ECHO) " directory:" >> META_new.yml
+ $(NOECHO) $(ECHO) " - t" >> META_new.yml
+ $(NOECHO) $(ECHO) " - inc" >> META_new.yml
+ $(NOECHO) $(ECHO) "generated_by: ExtUtils::MakeMaker version 6.55_02" >> META_new.yml
+ $(NOECHO) $(ECHO) "meta-spec:" >> META_new.yml
+ $(NOECHO) $(ECHO) " url: http://module-build.sourceforge.net/META-spec-v1.4.html" >> META_new.yml
+ $(NOECHO) $(ECHO) " version: 1.4" >> META_new.yml
+ -$(NOECHO) $(MV) META_new.yml $(DISTVNAME)/META.yml
+
+
+# --- MakeMaker signature section:
+signature :
+ cpansign -s
# --- MakeMaker dist_basics section:
-
distclean :: realclean distcheck
+ $(NOECHO) $(NOOP)
distcheck :
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=fullcheck \
- -e fullcheck
+ $(PERLRUN) "-MExtUtils::Manifest=fullcheck" -e fullcheck
skipcheck :
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=skipcheck \
- -e skipcheck
+ $(PERLRUN) "-MExtUtils::Manifest=skipcheck" -e skipcheck
manifest :
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=mkmanifest \
- -e mkmanifest
+ $(PERLRUN) "-MExtUtils::Manifest=mkmanifest" -e mkmanifest
veryclean : realclean
- $(RM_F) *~ *.orig */*~ */*.orig
+ $(RM_F) *~ */*~ *.orig */*.orig *.bak */*.bak *.old */*.old
+
# --- MakeMaker dist_core section:
-dist : $(DIST_DEFAULT)
- @$(PERL) -le "print \"Warning: Makefile possibly out of date with $$vf\" if " \
- -e "-e ($$vf=\"$(VERSION_FROM)\") and -M $$vf < -M \"Makefile\";"
+dist : $(DIST_DEFAULT) $(FIRST_MAKEFILE)
+ $(NOECHO) $(ABSPERLRUN) -l -e "print 'Warning: Makefile possibly out of date with $(VERSION_FROM)'\
+ if -e '$(VERSION_FROM)' and -M '$(VERSION_FROM)' < -M '$(FIRST_MAKEFILE)';" --
tardist : $(DISTVNAME).tar$(SUFFIX)
+ $(NOECHO) $(NOOP)
-zipdist : $(DISTVNAME).zip
+uutardist : $(DISTVNAME).tar$(SUFFIX)
+ uuencode $(DISTVNAME).tar$(SUFFIX) $(DISTVNAME).tar$(SUFFIX) > $(DISTVNAME).tar$(SUFFIX)_uu
$(DISTVNAME).tar$(SUFFIX) : distdir
$(PREOP)
@@ -571,17 +710,15 @@
$(COMPRESS) $(DISTVNAME).tar
$(POSTOP)
+zipdist : $(DISTVNAME).zip
+ $(NOECHO) $(NOOP)
+
$(DISTVNAME).zip : distdir
$(PREOP)
$(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME)
$(RM_RF) $(DISTVNAME)
$(POSTOP)
-uutardist : $(DISTVNAME).tar$(SUFFIX)
- uuencode $(DISTVNAME).tar$(SUFFIX) \
- $(DISTVNAME).tar$(SUFFIX) > \
- $(DISTVNAME).tar$(SUFFIX)_uu
-
shdist : distdir
$(PREOP)
$(SHAR) $(DISTVNAME) > $(DISTVNAME).shar
@@ -589,118 +726,181 @@
$(POSTOP)
-# --- MakeMaker dist_dir section:
-
-distdir :
+# --- MakeMaker distdir section:
+create_distdir :
$(RM_RF) $(DISTVNAME)
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=manicopy,maniread \
+ $(PERLRUN) "-MExtUtils::Manifest=manicopy,maniread" \
-e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');"
+distdir : create_distdir distmeta
+ $(NOECHO) $(NOOP)
+
-# --- MakeMaker dist_test section:
+# --- MakeMaker dist_test section:
disttest : distdir
- cd $(DISTVNAME) && $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) Makefile.PL
- cd $(DISTVNAME) && $(MAKE)
- cd $(DISTVNAME) && $(MAKE) test
+ cd $(DISTVNAME)
+ $(ABSPERLRUN) Makefile.PL
+ $(MAKE) $(PASTHRU)
+ $(MAKE) test $(PASTHRU)
+ cd ..
+
# --- MakeMaker dist_ci section:
ci :
- $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=maniread \
- -e "@all = keys %{ maniread() };" \
- -e "print(\"Executing $(CI) @all\n\"); system(\"$(CI) @all\");" \
- -e "print(\"Executing $(RCS_LABEL) ...\n\"); system(\"$(RCS_LABEL) @all\");"
+ $(PERLRUN) "-MExtUtils::Manifest=maniread" \
+ -e "@all = keys %{ maniread() };" \
+ -e "print(qq{Executing $(CI) @all\n}); system(qq{$(CI) @all});" \
+ -e "print(qq{Executing $(RCS_LABEL) ...\n}); system(qq{$(RCS_LABEL) @all});"
+
+
+# --- MakeMaker distmeta section:
+distmeta : create_distdir metafile
+ $(NOECHO) cd $(DISTVNAME)
+ $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e "eval { maniadd({q{META.yml} => q{Module meta-data (added by MakeMaker)}}) } \
+ or print \"Could not add META.yml to MANIFEST: $${'@'}\n\"" --
+ cd ..
+
+
+
+# --- MakeMaker distsignature section:
+distsignature : create_distdir
+ $(NOECHO) cd $(DISTVNAME)
+ $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e "eval { maniadd({q{SIGNATURE} => q{Public-key signature (added by MakeMaker)}}) } \
+ or print \"Could not add SIGNATURE to MANIFEST: $${'@'}\n\"" --
+ cd ..
+ $(NOECHO) cd $(DISTVNAME)
+ $(TOUCH) SIGNATURE
+ cd ..
+ cd $(DISTVNAME)
+ cpansign -s
+ cd ..
+
# --- MakeMaker install section:
-install :: all pure_install doc_install
+install :: pure_install doc_install doc_update
+ $(NOECHO) $(NOOP)
-install_perl :: all pure_perl_install doc_perl_install
+install_perl :: pure_perl_install doc_perl_install
+ $(NOECHO) $(NOOP)
-install_site :: all pure_site_install doc_site_install
+install_site :: pure_site_install doc_site_install
+ $(NOECHO) $(NOOP)
-install_ :: install_site
- @echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+install_vendor :: pure_vendor_install doc_vendor_install
+ $(NOECHO) $(NOOP)
pure_install :: pure_$(INSTALLDIRS)_install
+ $(NOECHO) $(NOOP)
doc_install :: doc_$(INSTALLDIRS)_install
- @echo Appending installation info to $(INSTALLARCHLIB)/perllocal.pod
+ $(NOECHO) $(NOOP)
+
+doc_update ::
+ $(NOECHO) $(PERLRUN) "-MActivePerl::DocTools" -e ActivePerl::DocTools::WriteTOC
pure__install : pure_site_install
- @echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
doc__install : doc_site_install
- @echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
+ $(NOECHO) $(ECHO) INSTALLDIRS not defined, defaulting to INSTALLDIRS=site
-pure_perl_install ::
- @$(MOD_INSTALL) \
+pure_perl_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
read $(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist \
- write $(INSTALLARCHLIB)\auto\$(FULLEXT)\.packlist \
- $(INST_LIB) $(INSTALLPRIVLIB) \
- $(INST_ARCHLIB) $(INSTALLARCHLIB) \
- $(INST_BIN) $(INSTALLBIN) \
- $(INST_SCRIPT) $(INSTALLSCRIPT) \
- $(INST_HTMLLIBDIR) $(INSTALLHTMLPRIVLIBDIR) \
- $(INST_HTMLSCRIPTDIR) $(INSTALLHTMLSCRIPTDIR) \
- $(INST_MAN1DIR) $(INSTALLMAN1DIR) \
- $(INST_MAN3DIR) $(INSTALLMAN3DIR)
- @$(WARN_IF_OLD_PACKLIST) \
+ write $(DESTINSTALLARCHLIB)\auto\$(FULLEXT)\.packlist \
+ $(INST_LIB) $(DESTINSTALLPRIVLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLARCHLIB) \
+ $(INST_BIN) $(DESTINSTALLBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLSCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLMAN3DIR) \
+ $(INST_HTMLDIR) $(DESTINSTALLHTMLDIR)
+ $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
$(SITEARCHEXP)\auto\$(FULLEXT)
-pure_site_install ::
- @$(MOD_INSTALL) \
+pure_site_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
read $(SITEARCHEXP)\auto\$(FULLEXT)\.packlist \
- write $(INSTALLSITEARCH)\auto\$(FULLEXT)\.packlist \
- $(INST_LIB) $(INSTALLSITELIB) \
- $(INST_ARCHLIB) $(INSTALLSITEARCH) \
- $(INST_BIN) $(INSTALLBIN) \
- $(INST_SCRIPT) $(INSTALLSCRIPT) \
- $(INST_HTMLLIBDIR) $(INSTALLHTMLSITELIBDIR) \
- $(INST_HTMLSCRIPTDIR) $(INSTALLHTMLSCRIPTDIR) \
- $(INST_MAN1DIR) $(INSTALLMAN1DIR) \
- $(INST_MAN3DIR) $(INSTALLMAN3DIR)
- @$(WARN_IF_OLD_PACKLIST) \
+ write $(DESTINSTALLSITEARCH)\auto\$(FULLEXT)\.packlist \
+ $(INST_LIB) $(DESTINSTALLSITELIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLSITEARCH) \
+ $(INST_BIN) $(DESTINSTALLSITEBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLSITESCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLSITEMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLSITEMAN3DIR) \
+ $(INST_HTMLDIR) $(DESTINSTALLSITEHTMLDIR)
+ $(NOECHO) $(WARN_IF_OLD_PACKLIST) \
$(PERL_ARCHLIB)\auto\$(FULLEXT)
-doc_perl_install ::
- -@$(MKPATH) $(INSTALLARCHLIB)
- -@$(DOC_INSTALL) \
+pure_vendor_install :: all
+ $(NOECHO) $(MOD_INSTALL) \
+ read $(VENDORARCHEXP)\auto\$(FULLEXT)\.packlist \
+ write $(DESTINSTALLVENDORARCH)\auto\$(FULLEXT)\.packlist \
+ $(INST_LIB) $(DESTINSTALLVENDORLIB) \
+ $(INST_ARCHLIB) $(DESTINSTALLVENDORARCH) \
+ $(INST_BIN) $(DESTINSTALLVENDORBIN) \
+ $(INST_SCRIPT) $(DESTINSTALLVENDORSCRIPT) \
+ $(INST_MAN1DIR) $(DESTINSTALLVENDORMAN1DIR) \
+ $(INST_MAN3DIR) $(DESTINSTALLVENDORMAN3DIR) \
+ $(INST_HTMLDIR) $(DESTINSTALLVENDORHTMLDIR)
+
+doc_perl_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
"Module" "$(NAME)" \
"installed into" "$(INSTALLPRIVLIB)" \
LINKTYPE "$(LINKTYPE)" \
VERSION "$(VERSION)" \
EXE_FILES "$(EXE_FILES)" \
- >> $(INSTALLARCHLIB)\perllocal.pod
+ >> $(DESTINSTALLARCHLIB)\perllocal.pod
-doc_site_install ::
- -@$(MKPATH) $(INSTALLARCHLIB)
- -@$(DOC_INSTALL) \
+doc_site_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
"Module" "$(NAME)" \
"installed into" "$(INSTALLSITELIB)" \
LINKTYPE "$(LINKTYPE)" \
VERSION "$(VERSION)" \
EXE_FILES "$(EXE_FILES)" \
- >> $(INSTALLARCHLIB)\perllocal.pod
+ >> $(DESTINSTALLARCHLIB)\perllocal.pod
+doc_vendor_install :: all
+ $(NOECHO) $(ECHO) Appending installation info to $(DESTINSTALLARCHLIB)/perllocal.pod
+ -$(NOECHO) $(MKPATH) $(DESTINSTALLARCHLIB)
+ -$(NOECHO) $(DOC_INSTALL) \
+ "Module" "$(NAME)" \
+ "installed into" "$(INSTALLVENDORLIB)" \
+ LINKTYPE "$(LINKTYPE)" \
+ VERSION "$(VERSION)" \
+ EXE_FILES "$(EXE_FILES)" \
+ >> $(DESTINSTALLARCHLIB)\perllocal.pod
-uninstall :: uninstall_from_$(INSTALLDIRS)dirs
+
+uninstall :: uninstall_from_$(INSTALLDIRS)dirs doc_update
+ $(NOECHO) $(NOOP)
uninstall_from_perldirs ::
- @$(UNINSTALL) $(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist
+ $(NOECHO) $(UNINSTALL) $(PERL_ARCHLIB)\auto\$(FULLEXT)\.packlist
uninstall_from_sitedirs ::
- @$(UNINSTALL) $(SITEARCHEXP)\auto\$(FULLEXT)\.packlist
+ $(NOECHO) $(UNINSTALL) $(SITEARCHEXP)\auto\$(FULLEXT)\.packlist
+
+uninstall_from_vendordirs ::
+ $(NOECHO) $(UNINSTALL) $(VENDORARCHEXP)\auto\$(FULLEXT)\.packlist
# --- MakeMaker force section:
# Phony target to force checking subdirectories.
-FORCE:
- @$(NOOP)
+FORCE :
+ $(NOECHO) $(NOOP)
# --- MakeMaker perldepend section:
@@ -727,13 +927,10 @@
$(PERL_INC)/keywords.h \
$(PERL_INC)/mg.h \
$(PERL_INC)/nostdio.h \
- $(PERL_INC)/objXSUB.h \
$(PERL_INC)/op.h \
$(PERL_INC)/opcode.h \
- $(PERL_INC)/opnames.h \
$(PERL_INC)/patchlevel.h \
$(PERL_INC)/perl.h \
- $(PERL_INC)/perlapi.h \
$(PERL_INC)/perlio.h \
$(PERL_INC)/perlsdio.h \
$(PERL_INC)/perlsfio.h \
@@ -747,53 +944,46 @@
$(PERL_INC)/regnodes.h \
$(PERL_INC)/scope.h \
$(PERL_INC)/sv.h \
- $(PERL_INC)/thrdvar.h \
$(PERL_INC)/thread.h \
$(PERL_INC)/unixish.h \
- $(PERL_INC)/utf8.h \
- $(PERL_INC)/util.h \
- $(PERL_INC)/warnings.h
+ $(PERL_INC)/util.h
$(OBJECT) : $(PERL_HDRS)
-Oracle.c : $(XSUBPPDEPS)
+Oracle_8.c : $(XSUBPPDEPS)
# --- MakeMaker makefile section:
$(OBJECT) : $(FIRST_MAKEFILE)
-# We take a very conservative approach here, but it\'s worth it.
+# We take a very conservative approach here, but it's worth it.
# We move Makefile to Makefile.old here to avoid gnu make looping.
-Makefile : Makefile.PL $(CONFIGDEP)
- @echo "Makefile out-of-date with respect to $?"
- @echo "Cleaning current config before rebuilding Makefile..."
- -@$(RM_F) Makefile.old
- -@$(MV) Makefile Makefile.old
- -$(MAKE) -f Makefile.old clean $(DEV_NULL) || $(NOOP)
- $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL
- @echo "==> Your Makefile has been rebuilt. <=="
- @echo "==> Please rerun the make command. <=="
- false
-
-# To change behavior to :: would be nice, but would break Tk b9.02
-# so you find such a warning below the dist target.
-#Makefile :: $(VERSION_FROM)
-# @echo "Warning: Makefile possibly out of date with $(VERSION_FROM)"
+$(FIRST_MAKEFILE) : Makefile.PL $(CONFIGDEP)
+ $(NOECHO) $(ECHO) "Makefile out-of-date with respect to $?"
+ $(NOECHO) $(ECHO) "Cleaning current config before rebuilding Makefile..."
+ -$(NOECHO) $(RM_F) $(MAKEFILE_OLD)
+ -$(NOECHO) $(MV) $(FIRST_MAKEFILE) $(MAKEFILE_OLD)
+ - $(MAKE) $(USEMAKEFILE) $(MAKEFILE_OLD) clean $(DEV_NULL)
+ $(PERLRUN) Makefile.PL
+ $(NOECHO) $(ECHO) "==> Your Makefile has been rebuilt. <=="
+ $(NOECHO) $(ECHO) "==> Please rerun the $(MAKE) command. <=="
+ $(FALSE)
+
# --- MakeMaker staticmake section:
# --- MakeMaker makeaperl section ---
MAP_TARGET = perl
-FULLPERL = C:\Perl\bin\perl.exe
+FULLPERL = C:\Perl10\bin\perl.exe
$(MAP_TARGET) :: static $(MAKE_APERL_FILE)
- $(MAKE) -f $(MAKE_APERL_FILE) $@
+ $(MAKE) $(USEMAKEFILE) $(MAKE_APERL_FILE) $@
-$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE)
- @echo Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
- @$(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \
+$(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) pm_to_blib
+ $(NOECHO) $(ECHO) Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET)
+ $(NOECHO) $(PERLRUNINST) \
Makefile.PL DIR= \
MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \
MAKEAPERL=1 NORECURS=1 CCCDLFLAGS=
@@ -804,46 +994,62 @@
TEST_VERBOSE=0
TEST_TYPE=test_$(LINKTYPE)
TEST_FILE = test.pl
-TEST_FILES = t\01base.t t\10general.t t\15nls.t t\20select.t t\21nchar.t t\22nchar_al32utf8.t t\22nchar_utf8.t t\23wide_db.t t\23wide_db_8bit.t t\23wide_db_al32utf8.t t\24implicit_utf8.t t\25plsql.t t\30long.t t\31lob.t t\40ph_type.t t\50cursor.t t\55nested.t t\60reauth.t t\70meta.t
+TEST_FILES = t/*.t
TESTDB_SW = -d
testdb :: testdb_$(LINKTYPE)
-test :: $(TEST_TYPE)
+test :: $(TEST_TYPE) subdirs-test
+
+subdirs-test ::
+ $(NOECHO) $(NOOP)
+
test_dynamic :: pure_all
- $(FULLPERL) -Mblib -I$(PERL_ARCHLIB) -I$(PERL_LIB) -e "use Test::Harness qw(&runtests $$verbose); $$verbose=$(TEST_VERBOSE); runtests @ARGV;" $(TEST_FILES)
- $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE)
+ $(FULLPERLRUN) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+ $(FULLPERLRUN) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
testdb_dynamic :: pure_all
- $(FULLPERL) $(TESTDB_SW) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE)
+ $(FULLPERLRUN) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
test_ : test_dynamic
test_static :: pure_all $(MAP_TARGET)
- ./$(MAP_TARGET) -Mblib -I$(PERL_ARCHLIB) -I$(PERL_LIB) -e "use Test::Harness qw(&runtests $$verbose); $$verbose=$(TEST_VERBOSE); runtests @ARGV;" $(TEST_FILES)
- ./$(MAP_TARGET) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE)
+ ./$(MAP_TARGET) "-MExtUtils::Command::MM" "-e" "test_harness($(TEST_VERBOSE), '$(INST_LIB)', '$(INST_ARCHLIB)')" $(TEST_FILES)
+ ./$(MAP_TARGET) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
testdb_static :: pure_all $(MAP_TARGET)
- ./$(MAP_TARGET) $(TESTDB_SW) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE)
+ ./$(MAP_TARGET) $(TESTDB_SW) "-I$(INST_LIB)" "-I$(INST_ARCHLIB)" $(TEST_FILE)
# --- MakeMaker ppd section:
# Creates a PPD (Perl Package Description) for a binary distribution.
-ppd:
- @$(PERL) -e "print qq{<SOFTPKG NAME=\"DBD-Oracle\" VERSION=\"1,17,0,0\">\n}. qq{\t<TITLE>DBD-Oracle</TITLE>\n}. qq{\t<ABSTRACT>Oracle database driver for the DBI module</ABSTRACT>\n}. qq{\t<AUTHOR>Tim Bunce (dbi-users\@perl.org)</AUTHOR>\n}. qq{\t<IMPLEMENTATION>\n}. qq{\t\t<DEPENDENCY NAME=\"DBI\" VERSION=\"0,0,0,0\" />\n}. qq{\t\t<OS NAME=\"$(OSNAME)\" />\n}. qq{\t\t<ARCHITECTURE NAME=\"MSWin32-x86-multi-thread\" />\n}. qq{\t\t<CODEBASE HREF=\"\" />\n}. qq{\t</IMPLEMENTATION>\n}. qq{</SOFTPKG>\n}" > DBD-Oracle.ppd
+ppd :
+ $(NOECHO) $(ECHO) "<SOFTPKG NAME=\"$(DISTNAME)\" VERSION=\"0.01\">" > $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) " <ABSTRACT></ABSTRACT>" >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) " <AUTHOR>Tim Bunce ([email protected])</AUTHOR>" >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) " <IMPLEMENTATION>" >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) " <REQUIRE NAME=\"DBI::\" />" >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) " <ARCHITECTURE NAME=\"MSWin32-x86-multi-thread-5.10\" />" >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) " <CODEBASE HREF=\"\" />" >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) " </IMPLEMENTATION>" >> $(DISTNAME).ppd
+ $(NOECHO) $(ECHO) "</SOFTPKG>" >> $(DISTNAME).ppd
+
# --- MakeMaker pm_to_blib section:
-pm_to_blib: $(TO_INST_PM)
- @$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \
- "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \
- -e "pm_to_blib(qw[ <<pmfiles.dat ],'$(INST_LIB)\auto','$(PM_FILTER)')"
-
-$(PM_TO_BLIB)
-<<
- @$(TOUCH) $@
+pm_to_blib : $(FIRST_MAKEFILE) $(TO_INST_PM)
+ $(NOECHO) $(ABSPERLRUN) -MExtUtils::Install -e "pm_to_blib({@ARGV}, '$(INST_LIB)\auto', q[$(PM_FILTER)], '$(PERM_DIR)')" -- \
+ Oraperl_8.pm $(INST_LIB)/Oraperl_8.pm \
+ Oracle_8.h $(INST_ARCHAUTODIR)/Oracle_8.h \
+ Oracle_8.pm $(INST_LIB)\DBD\Oracle_8.pm \
+ dbdimp.h $(INST_ARCHAUTODIR)/dbdimp.h \
+ ocitrace.h $(INST_ARCHAUTODIR)/ocitrace.h \
+ oraperl_8.ph $(INST_LIB)/oraperl_8.ph \
+ lib/DBD/Oracle/GetInfo.pm blib\lib\DBD\Oracle\GetInfo.pm \
+ mk.pm $(INST_ARCHAUTODIR)/mk.pm
+ $(NOECHO) $(TOUCH) pm_to_blib
# --- MakeMaker selfdocument section:
@@ -852,7 +1058,7 @@
# --- MakeMaker postamble section:
# --- This section was generated by DBI::DBD::dbd_postamble()
-DBI_INSTARCH_DIR=C:/Perl/site/lib/auto/DBI/
+DBI_INSTARCH_DIR=C:/Perl10/site/lib/auto/DBI/
DBI_DRIVER_XST=$(DBI_INSTARCH_DIR)/Driver.xst
# The main dependancy (technically correct but probably not used)
Modified: dbd-oracle/branches/DBD-Oracle8/Makefile.PL
==============================================================================
--- dbd-oracle/branches/DBD-Oracle8/Makefile.PL (original)
+++ dbd-oracle/branches/DBD-Oracle8/Makefile.PL Mon Dec 21 10:25:03 2009
@@ -1,4 +1,4 @@
-## Makefile.PL for DBD::Oracle - see README file for more information.
+## Makefile.PL for DBD::Oracle_8 - see README file for more information.
# vim: ts=8:sw=4
@@ -42,14 +42,14 @@
$| = 1;
my %opts = (
- NAME => 'DBD::Oracle',
- VERSION_FROM => 'Oracle.pm',
+ NAME => 'DBD::Oracle_8',
+ VERSION_FROM => 'Oracle_8.pm',
PREREQ_PM => { "Test::Simple" => 0.40 }, # actually Test::More pkg in T::S dist
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_8.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*' },
dist => {
DIST_DEFAULT => 'clean distcheck disttest tardist',
PREOP => '$(MAKE) -f Makefile.old distdir',
@@ -58,7 +58,7 @@
);
if ($ExtUtils::MakeMaker::VERSION >= 5.43) {
$opts{AUTHOR} = 'Tim Bunce ([email protected])';
- $opts{ABSTRACT_FROM} = 'Oracle.pm';
+ $opts{ABSTRACT_FROM} = 'Oracle_8.pm';
$opts{PREREQ_PM} = { DBI => 0 };
$opts{CAPI} = 'TRUE' if $Config{archname} =~ /-object\b/i;
}
@@ -159,7 +159,7 @@
# $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"
+die "DBD::Oracle_8 no longer supports Oracle versions before 8.\n"
if $client_version < 8;
@@ -1592,11 +1592,11 @@
sub post_initialize {
my $self = shift;
- if (-f "$Config{installprivlib}/DBD/Oraperl.pm"){ # very old now
+ if (-f "$Config{installprivlib}/DBD/Oraperl_8.pm"){ # very old now
print "
Please note: the Oraperl.pm installation location has changed.
-It was: $Config{installprivlib}/DBD/Oraperl.pm
-Is now: $Config{installprivlib}/Oraperl.pm
+It was: $Config{installprivlib}/DBD/Oraperl_8.pm
+Is now: $Config{installprivlib}/Oraperl_8.pm
You have an old copy which you should delete when installing this one.\n";
}
@@ -1605,8 +1605,8 @@
if $need_ldlp_env && ($ENV{$need_ldlp_env}||'') !~ m:\Q$OH/lib\b:;
# Ensure Oraperl.pm and oraperl.ph are installed into top lib dir
- $self->{PM}->{'Oraperl.pm'} = '$(INST_LIB)/Oraperl.pm';
- $self->{PM}->{'oraperl.ph'} = '$(INST_LIB)/oraperl.ph';
+ $self->{PM}->{'Oraperl_8.pm'} = '$(INST_LIB)/Oraperl_8.pm';
+ $self->{PM}->{'oraperl_8.ph'} = '$(INST_LIB)/oraperl_8.ph';
eval { # This chunk is for Oracle::OCI
require Data::Dumper;
@@ -1619,7 +1619,7 @@
}
close main::MK_PM or die "Error closing mk.pm: $!\n";
- foreach (qw(mk.pm Oracle.h dbdimp.h ocitrace.h)) {
+ foreach (qw(mk.pm Oracle_8.h dbdimp.h ocitrace.h)) {
$self->{PM}->{$_} = '$(INST_ARCHAUTODIR)/'.$_;
}
Modified: dbd-oracle/branches/DBD-Oracle8/Oracle.def
==============================================================================
--- dbd-oracle/branches/DBD-Oracle8/Oracle.def (original)
+++ dbd-oracle/branches/DBD-Oracle8/Oracle.def Mon Dec 21 10:25:03 2009
@@ -1,5 +1,5 @@
-LIBRARY "Oracle"
+LIBRARY "Oracle_8"
EXPORTS
- boot_DBD__Oracle
- _boot_DBD__Oracle = boot_DBD__Oracle
+ boot_DBD__Oracle_8
+ _boot_DBD__Oracle_8 = boot_DBD__Oracle_8
Added: dbd-oracle/branches/DBD-Oracle8/Oracle_8.bs
==============================================================================
Added: dbd-oracle/branches/DBD-Oracle8/Oracle_8.c
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle8/Oracle_8.c Mon Dec 21 10:25:03 2009
@@ -0,0 +1,1980 @@
+/*
+ * This file was generated automatically by ExtUtils::ParseXS version 2.2002 from the
+ * contents of Oracle_8.xs. Do not edit this file, edit Oracle_8.xs instead.
+ *
+ * ANY CHANGES MADE HERE WILL BE LOST!
+ *
+ */
+
+#line 1 "Oracle_8.xs"
+#include "Oracle_8.h"
+
+DBISTATE_DECLARE;
+
+#line 15 "Oracle_8.c"
+#ifndef PERL_UNUSED_VAR
+# define PERL_UNUSED_VAR(var) if (0) var = var
+#endif
+
+#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
+#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)
+
+/* prototype to pass -Wmissing-prototypes */
+STATIC void
+S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params);
+
+STATIC void
+S_croak_xs_usage(pTHX_ const CV *const cv, const char *const params)
+{
+ const GV *const gv = CvGV(cv);
+
+ PERL_ARGS_ASSERT_CROAK_XS_USAGE;
+
+ if (gv) {
+ const char *const gvname = GvNAME(gv);
+ const HV *const stash = GvSTASH(gv);
+ const char *const hvname = stash ? HvNAME(stash) : NULL;
+
+ if (hvname)
+ Perl_croak(aTHX_ "Usage: %s::%s(%s)", hvname, gvname, params);
+ else
+ Perl_croak(aTHX_ "Usage: %s(%s)", gvname, params);
+ } else {
+ /* Pants. I don't think that it should be possible to get here. */
+ Perl_croak(aTHX_ "Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
+ }
+}
+#undef PERL_ARGS_ASSERT_CROAK_XS_USAGE
+
+#ifdef PERL_IMPLICIT_CONTEXT
+#define croak_xs_usage(a,b) S_croak_xs_usage(aTHX_ a,b)
+#else
+#define croak_xs_usage S_croak_xs_usage
+#endif
+
+#endif
+
+#line 58 "Oracle_8.c"
+
+XS(XS_DBD__Oracle_constant); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_constant)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ dXSI32;
+ if (items < 0 || items > 1)
+ croak_xs_usage(cv, "name=Nullch");
+ {
+ char * name;
+ I32 RETVAL;
+ dXSTARG;
+
+ if (items < 1)
+ name = Nullch;
+ else {
+ name = (char *)SvPV_nolen(ST(0));
+ }
+#line 31 "Oracle_8.xs"
+ if (!ix) {
+ if (!name) name = GvNAME(CvGV(cv));
+ croak("Unknown DBD::Oracle_8 constant '%s'", name);
+ }
+ else RETVAL = ix;
+#line 87 "Oracle_8.c"
+ XSprePUSH; PUSHi((IV)RETVAL);
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_ORA_OCI); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_ORA_OCI)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 0)
+ croak_xs_usage(cv, "");
+ {
+#line 42 "Oracle_8.xs"
+ SV *sv = sv_newmortal();
+ sv_setnv(sv, atof(ORA_OCI_VERSION)); /* 9.1! see docs */
+ sv_setpv(sv, ORA_OCI_VERSION); /* 9.10.11.12 */
+ SvNOK_on(sv); /* dualvar hack */
+ ST(0) = sv;
+#line 111 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_ora_env_var); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_ora_env_var)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "name");
+ {
+ char * name = (char *)SvPV_nolen(ST(0));
+#line 52 "Oracle_8.xs"
+ char buf[1024];
+ char *p = ora_env_var(name, buf, sizeof(buf)-1);
+ SV *sv = sv_newmortal();
+ if (p)
+ sv_setpv(sv, p);
+ ST(0) = sv;
+#line 136 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#ifdef __CYGWIN32__
+#define XSubPPtmpAAAA 1
+
+
+XS(XS_DBD__Oracle_ora_cygwin_set_env); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_ora_cygwin_set_env)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 2)
+ croak_xs_usage(cv, "name, value");
+ {
+ char * name = (char *)SvPV_nolen(ST(0));
+ char * value = (char *)SvPV_nolen(ST(1));
+#line 65 "Oracle_8.xs"
+ ora_cygwin_set_env(name, value);
+#line 160 "Oracle_8.c"
+ }
+ XSRETURN_EMPTY;
+}
+
+#endif /* __CYGWIN32__ */
+
+/* INCLUDE: Including 'Oracle_8.xsi' from 'Oracle_8.xs' */
+
+#include "Driver_xst.h"
+#ifdef dbd_discon_all
+#define XSubPPtmpAAAB 1
+
+
+XS(XS_DBD__Oracle_8__dr_discon_all_); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__dr_discon_all_)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ dXSI32;
+ if (items != 1)
+ croak_xs_usage(cv, "drh");
+ {
+ SV * drh = ST(0);
+#line 42 "Oracle_8.xsi"
+ D_imp_drh(drh);
+ if (0) ix = ix; /* avoid unused variable warning */
+ ST(0) = dbd_discon_all(drh, imp_drh) ? &sv_yes : &sv_no;
+#line 191 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#endif /* dbd_discon_all */
+#ifdef dbd_dr_data_sources
+#define XSubPPtmpAAAC 1
+
+
+XS(XS_DBD__Oracle_8__dr_data_sources); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__dr_data_sources)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 1 || items > 2)
+ croak_xs_usage(cv, "drh, attr = Nullsv");
+ PERL_UNUSED_VAR(ax); /* -Wall */
+ SP -= items;
+ {
+ SV * drh = ST(0);
+ SV * attr;
+
+ if (items < 2)
+ attr = Nullsv;
+ else {
+ attr = ST(1);
+ }
+#line 56 "Oracle_8.xsi"
+ {
+ D_imp_drh(drh);
+ AV *av = dbd_dr_data_sources(drh, imp_drh, attr);
+ if (av) {
+ int i;
+ int n = AvFILL(av)+1;
+ EXTEND(sp, n);
+ for (i = 0; i < n; ++i) {
+ PUSHs(AvARRAY(av)[i]);
+ }
+ }
+ }
+#line 235 "Oracle_8.c"
+ PUTBACK;
+ return;
+ }
+}
+
+#endif
+
+XS(XS_DBD__Oracle_8__db__login); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db__login)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 4 || items > 5)
+ croak_xs_usage(cv, "dbh, dbname, username, password, attribs=Nullsv");
+ {
+ SV * dbh = ST(0);
+ char * dbname = (char *)SvPV_nolen(ST(1));
+ SV * username = ST(2);
+ SV * password = ST(3);
+ SV * attribs;
+
+ if (items < 5)
+ attribs = Nullsv;
+ else {
+ attribs = ST(4);
+ }
+#line 86 "Oracle_8.xsi"
+ {
+ STRLEN lna;
+ D_imp_dbh(dbh);
+ char *u = (SvOK(username)) ? SvPV(username,lna) : "";
+ char *p = (SvOK(password)) ? SvPV(password,lna) : "";
+#ifdef dbd_db_login6
+ ST(0) = dbd_db_login6(dbh, imp_dbh, dbname, u, p, attribs) ? &sv_yes : &sv_no;
+#else
+ ST(0) = dbd_db_login( dbh, imp_dbh, dbname, u, p) ? &sv_yes : &sv_no;
+#endif
+ }
+#line 277 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_selectall_arrayref); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_selectall_arrayref)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ PERL_UNUSED_VAR(cv); /* -W */
+ {
+#line 102 "Oracle_8.xsi"
+ SV *sth;
+ SV **maxrows_svp;
+ SV **tmp_svp;
+ SV *attr = &PL_sv_undef;
+ imp_sth_t *imp_sth;
+#line 299 "Oracle_8.c"
+#line 108 "Oracle_8.xsi"
+ if (items > 2) {
+ attr = ST(2);
+ if (SvROK(attr) &&
+ (DBD_ATTRIB_TRUE(attr,"Slice",5,tmp_svp) || DBD_ATTRIB_TRUE(attr,"Columns",7,tmp_svp))
+ ) {
+ /* fallback to perl implementation */
+ ST(0) = dbixst_bounce_method("DBD::Oracle_8::db::SUPER::selectall_arrayref", items);
+ XSRETURN(1);
+ }
+ }
+ /* --- prepare --- */
+ if (SvROK(ST(1))) {
+ sth = ST(1);
+ }
+ else {
+ sth = dbixst_bounce_method("prepare", 3);
+ if (!SvROK(sth))
+ XSRETURN_UNDEF;
+ }
+ imp_sth = (imp_sth_t*)(DBIh_COM(sth));
+ /* --- bind_param --- */
+ if (items > 3) { /* need to bind params before execute */
+ if (!dbdxst_bind_params(sth, imp_sth, items-2, ax+2) ) {
+ XSRETURN_UNDEF;
+ }
+ }
+ /* --- execute --- */
+ DBIc_ROW_COUNT(imp_sth) = 0;
+ if ( dbd_st_execute(sth, imp_sth) <= -2 ) { /* -2 == error */
+ XSRETURN_UNDEF;
+ }
+ /* --- fetchall --- */
+ maxrows_svp = DBD_ATTRIB_GET_SVP(attr, "MaxRows", 7);
+ ST(0) = dbdxst_fetchall_arrayref(sth, &PL_sv_undef, (maxrows_svp) ? *maxrows_svp : &PL_sv_undef);
+#line 335 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_selectrow_arrayref); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_selectrow_arrayref)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ dXSI32;
+ PERL_UNUSED_VAR(cv); /* -W */
+ PERL_UNUSED_VAR(ax); /* -Wall */
+ SP -= items;
+ {
+#line 149 "Oracle_8.xsi"
+ imp_sth_t *imp_sth;
+ SV *sth;
+ AV *row_av;
+#line 358 "Oracle_8.c"
+#line 153 "Oracle_8.xsi"
+ if (SvROK(ST(1))) {
+ sth = ST(1);
+ }
+ else {
+ /* --- prepare --- */
+ sth = dbixst_bounce_method("prepare", 3);
+ if (!SvROK(sth))
+ XSRETURN_UNDEF;
+ }
+ imp_sth = (imp_sth_t*)(DBIh_COM(sth));
+ /* --- bind_param --- */
+ if (items > 3) { /* need to bind params before execute */
+ if (!dbdxst_bind_params(sth, imp_sth, items-2, ax+2) ) {
+ XSRETURN_UNDEF;
+ }
+ }
+ /* --- execute --- */
+ DBIc_ROW_COUNT(imp_sth) = 0;
+ if ( dbd_st_execute(sth, imp_sth) <= -2 ) { /* -2 == error */
+ XSRETURN_UNDEF;
+ }
+ /* --- fetchrow_arrayref --- */
+ row_av = dbd_st_fetch(sth, imp_sth);
+ if (!row_av) {
+ if (GIMME == G_SCALAR)
+ PUSHs(&PL_sv_undef);
+ }
+ else if (ix == 1) { /* selectrow_array */
+ int i;
+ int num_fields = AvFILL(row_av)+1;
+ if (GIMME == G_SCALAR)
+ num_fields = 1; /* return just first field */
+ EXTEND(sp, num_fields);
+ for(i=0; i < num_fields; ++i) {
+ PUSHs(AvARRAY(row_av)[i]);
+ }
+ }
+ else {
+ PUSHs( sv_2mortal(newRV((SV *)row_av)) );
+ }
+ /* --- finish --- */
+#ifdef dbd_st_finish3
+ dbd_st_finish3(sth, imp_sth, 0);
+#else
+ dbd_st_finish(sth, imp_sth);
+#endif
+#line 406 "Oracle_8.c"
+ PUTBACK;
+ return;
+ }
+}
+
+#ifdef dbd_db_do4 /* deebeedee-deebee-doo, deebee-doobee-dah? */
+#define XSubPPtmpAAAD 1
+
+
+XS(XS_DBD__Oracle_8__db_do); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_do)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 2 || items > 3)
+ croak_xs_usage(cv, "dbh, statement, params = Nullsv");
+ {
+ SV * dbh = ST(0);
+ char * statement = (char *)SvPV_nolen(ST(1));
+ SV * params;
+
+ if (items < 3)
+ params = Nullsv;
+ else {
+ params = ST(2);
+ }
+#line 209 "Oracle_8.xsi"
+ {
+ D_imp_dbh(dbh);
+ IV retval;
+ retval = dbd_db_do4(dbh, imp_dbh, statement, params);
+ /* remember that dbd_db_do4 must return <= -2 for error */
+ if (retval == 0) /* ok with no rows affected */
+ XST_mPV(0, "0E0"); /* (true but zero) */
+ else if (retval < -1) /* -1 == unknown number of rows */
+ XST_mUNDEF(0); /* <= -2 means error */
+ else
+ XST_mIV(0, retval); /* typically 1, rowcount or -1 */
+ }
+#line 449 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#endif
+#ifdef dbd_db_last_insert_id
+#define XSubPPtmpAAAE 1
+
+
+XS(XS_DBD__Oracle_8__db_last_insert_id); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_last_insert_id)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 5 || items > 6)
+ croak_xs_usage(cv, "dbh, catalog, schema, table, field, attr=Nullsv");
+ {
+ SV * dbh = ST(0);
+ SV * catalog = ST(1);
+ SV * schema = ST(2);
+ SV * table = ST(3);
+ SV * field = ST(4);
+ SV * attr;
+
+ if (items < 6)
+ attr = Nullsv;
+ else {
+ attr = ST(5);
+ }
+#line 236 "Oracle_8.xsi"
+ {
+ D_imp_dbh(dbh);
+ ST(0) = dbd_db_last_insert_id(dbh, imp_dbh, catalog, schema, table, field, attr);
+ }
+#line 487 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#endif
+
+XS(XS_DBD__Oracle_8__db_commit); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_commit)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "dbh");
+ {
+ SV * dbh = ST(0);
+#line 248 "Oracle_8.xsi"
+ D_imp_dbh(dbh);
+ if (DBIc_has(imp_dbh,DBIcf_AutoCommit) && DBIc_WARN(imp_dbh))
+ warn("commit ineffective with AutoCommit enabled");
+ ST(0) = dbd_db_commit(dbh, imp_dbh) ? &sv_yes : &sv_no;
+#line 511 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_rollback); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_rollback)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "dbh");
+ {
+ SV * dbh = ST(0);
+#line 258 "Oracle_8.xsi"
+ D_imp_dbh(dbh);
+ if (DBIc_has(imp_dbh,DBIcf_AutoCommit) && DBIc_WARN(imp_dbh))
+ warn("rollback ineffective with AutoCommit enabled");
+ ST(0) = dbd_db_rollback(dbh, imp_dbh) ? &sv_yes : &sv_no;
+#line 534 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_disconnect); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_disconnect)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "dbh");
+ {
+ SV * dbh = ST(0);
+#line 268 "Oracle_8.xsi"
+ D_imp_dbh(dbh);
+ if ( !DBIc_ACTIVE(imp_dbh) ) {
+ XSRETURN_YES;
+ }
+ /* pre-disconnect checks and tidy-ups */
+ if (DBIc_CACHED_KIDS(imp_dbh)) {
+ SvREFCNT_dec(DBIc_CACHED_KIDS(imp_dbh)); /* cast them to the winds */
+ DBIc_CACHED_KIDS(imp_dbh) = Nullhv;
+ }
+ /* Check for disconnect() being called whilst refs to cursors */
+ /* still exists. This possibly needs some more thought. */
+ if (DBIc_ACTIVE_KIDS(imp_dbh) && DBIc_WARN(imp_dbh) && !dirty) {
+ STRLEN lna;
+ char *plural = (DBIc_ACTIVE_KIDS(imp_dbh)==1) ? "" : "s";
+ warn("%s->disconnect invalidates %d active statement handle%s %s",
+ SvPV(dbh,lna), (int)DBIc_ACTIVE_KIDS(imp_dbh), plural,
+ "(either destroy statement handles or call finish on them before disconnecting)");
+ }
+ ST(0) = dbd_db_disconnect(dbh, imp_dbh) ? &sv_yes : &sv_no;
+ DBIc_ACTIVE_off(imp_dbh); /* ensure it's off, regardless */
+#line 573 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_STORE); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_STORE)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 3)
+ croak_xs_usage(cv, "dbh, keysv, valuesv");
+ {
+ SV * dbh = ST(0);
+ SV * keysv = ST(1);
+ SV * valuesv = ST(2);
+#line 296 "Oracle_8.xsi"
+ D_imp_dbh(dbh);
+ if (SvGMAGICAL(valuesv))
+ mg_get(valuesv);
+ ST(0) = &sv_yes;
+ if (!dbd_db_STORE_attrib(dbh, imp_dbh, keysv, valuesv))
+ if (!DBIc_DBISTATE(imp_dbh)->set_attr(dbh, keysv, valuesv))
+ ST(0) = &sv_no;
+#line 601 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_FETCH); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_FETCH)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 2)
+ croak_xs_usage(cv, "dbh, keysv");
+ {
+ SV * dbh = ST(0);
+ SV * keysv = ST(1);
+#line 310 "Oracle_8.xsi"
+ D_imp_dbh(dbh);
+ SV *valuesv = dbd_db_FETCH_attrib(dbh, imp_dbh, keysv);
+ if (!valuesv)
+ valuesv = DBIc_DBISTATE(imp_dbh)->get_attr(dbh, keysv);
+ ST(0) = valuesv; /* dbd_db_FETCH_attrib did sv_2mortal */
+#line 626 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_DESTROY); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_DESTROY)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "dbh");
+ PERL_UNUSED_VAR(ax); /* -Wall */
+ SP -= items;
+ {
+ SV * dbh = ST(0);
+#line 321 "Oracle_8.xsi"
+ D_imp_dbh(dbh);
+ ST(0) = &sv_yes;
+ if (!DBIc_IMPSET(imp_dbh)) { /* was never fully set up */
+ STRLEN lna;
+ if (DBIc_WARN(imp_dbh) && !dirty && DBIc_DBISTATE(imp_dbh)->debug >= 2)
+ PerlIO_printf(DBIc_LOGPIO(imp_dbh),
+ " DESTROY for %s ignored - handle not initialised\n",
+ SvPV(dbh,lna));
+ }
+ else {
+ /* pre-disconnect checks and tidy-ups */
+ if (DBIc_CACHED_KIDS(imp_dbh)) {
+ SvREFCNT_dec(DBIc_CACHED_KIDS(imp_dbh)); /* cast them to the winds */
+ DBIc_CACHED_KIDS(imp_dbh) = Nullhv;
+ }
+ if (DBIc_IADESTROY(imp_dbh)) { /* want's ineffective destroy */
+ DBIc_ACTIVE_off(imp_dbh);
+ }
+ if (DBIc_ACTIVE(imp_dbh)) {
+ /* The application has not explicitly disconnected. That's bad. */
+ /* To ensure integrity we *must* issue a rollback. This will be */
+ /* harmless if the application has issued a commit. If it hasn't */
+ /* then it'll ensure integrity. Consider a Ctrl-C killing perl */
+ /* between two statements that must be executed as a transaction. */
+ /* Perl will call DESTROY on the dbh and, if we don't rollback, */
+ /* the server may automatically commit! Bham! Corrupt database! */
+ if (!DBIc_has(imp_dbh,DBIcf_AutoCommit)) {
+ if (DBIc_WARN(imp_dbh)
+ && DBIc_is(imp_dbh, DBIcf_Executed)
+ && (!dirty || DBIc_DBISTATE(imp_dbh)->debug >= 3)
+ )
+ warn("Issuing rollback() for database handle being DESTROY'd without explicit disconnect()");
+ dbd_db_rollback(dbh, imp_dbh); /* ROLLBACK! */
+ }
+ dbd_db_disconnect(dbh, imp_dbh);
+ DBIc_ACTIVE_off(imp_dbh); /* ensure it's off, regardless */
+ }
+ dbd_db_destroy(dbh, imp_dbh);
+ }
+#line 686 "Oracle_8.c"
+ PUTBACK;
+ return;
+ }
+}
+
+#ifdef dbd_take_imp_data
+#define XSubPPtmpAAAF 1
+
+
+XS(XS_DBD__Oracle_8__db_take_imp_data); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_take_imp_data)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "h");
+ {
+ SV * h = ST(0);
+#line 368 "Oracle_8.xsi"
+ D_imp_xxh(h);
+ ST(0) = (dbd_take_imp_data(h, imp_xxh, NULL))
+ ? dbixst_bounce_method("DBD::Oracle_8::db::SUPER::take_imp_data", items)
+ : &sv_undef;
+#line 713 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#endif
+#ifdef dbd_db_data_sources
+#define XSubPPtmpAAAG 1
+
+
+XS(XS_DBD__Oracle_8__db_data_sources); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_data_sources)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 1 || items > 2)
+ croak_xs_usage(cv, "dbh, attr = Nullsv");
+ PERL_UNUSED_VAR(ax); /* -Wall */
+ SP -= items;
+ {
+ SV * dbh = ST(0);
+ SV * attr;
+
+ if (items < 2)
+ attr = Nullsv;
+ else {
+ attr = ST(1);
+ }
+#line 382 "Oracle_8.xsi"
+ {
+ D_imp_dbh(dbh);
+ AV *av = dbd_db_data_sources(dbh, imp_dbh, attr);
+ if (av) {
+ int i;
+ int n = AvFILL(av)+1;
+ EXTEND(sp, n);
+ for (i = 0; i < n; ++i) {
+ PUSHs(AvARRAY(av)[i]);
+ }
+ }
+ }
+#line 757 "Oracle_8.c"
+ PUTBACK;
+ return;
+ }
+}
+
+#endif
+
+XS(XS_DBD__Oracle_8__st__prepare); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st__prepare)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 2 || items > 3)
+ croak_xs_usage(cv, "sth, statement, attribs=Nullsv");
+ {
+ SV * sth = ST(0);
+ char * statement = (char *)SvPV_nolen(ST(1));
+ SV * attribs;
+
+ if (items < 3)
+ attribs = Nullsv;
+ else {
+ attribs = ST(2);
+ }
+#line 411 "Oracle_8.xsi"
+ {
+ D_imp_sth(sth);
+ DBD_ATTRIBS_CHECK("_prepare", sth, attribs);
+ ST(0) = dbd_st_prepare(sth, imp_sth, statement, attribs) ? &sv_yes : &sv_no;
+ }
+#line 791 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#ifdef dbd_st_rows
+#define XSubPPtmpAAAH 1
+
+
+XS(XS_DBD__Oracle_8__st_rows); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_rows)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "sth");
+ {
+ SV * sth = ST(0);
+#line 424 "Oracle_8.xsi"
+ D_imp_sth(sth);
+ XST_mIV(0, dbd_st_rows(sth, imp_sth));
+#line 815 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#endif /* dbd_st_rows */
+#ifdef dbd_st_bind_col
+#define XSubPPtmpAAAI 1
+
+
+XS(XS_DBD__Oracle_8__st_bind_col); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_bind_col)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 3 || items > 4)
+ croak_xs_usage(cv, "sth, col, ref, attribs=Nullsv");
+ {
+ SV * sth = ST(0);
+ SV * col = ST(1);
+ SV * ref = ST(2);
+ SV * attribs;
+
+ if (items < 4)
+ attribs = Nullsv;
+ else {
+ attribs = ST(3);
+ }
+#line 439 "Oracle_8.xsi"
+ {
+ IV sql_type = 0;
+ D_imp_sth(sth);
+ if (SvGMAGICAL(ref))
+ mg_get(ref);
+ if (attribs) {
+ if (SvNIOK(attribs)) {
+ sql_type = SvIV(attribs);
+ attribs = Nullsv;
+ }
+ else {
+ SV **svp;
+ DBD_ATTRIBS_CHECK("bind_col", sth, attribs);
+ /* XXX we should perhaps complain if TYPE is not SvNIOK */
+ DBD_ATTRIB_GET_IV(attribs, "TYPE",4, svp, sql_type);
+ }
+ }
+ switch(dbd_st_bind_col(sth, imp_sth, col, ref, sql_type, attribs)) {
+ case 2: ST(0) = &sv_yes; /* job done completely */
+ break;
+ case 1: /* fallback to DBI default */
+ ST(0) = (DBIc_DBISTATE(imp_sth)->bind_col(sth, col, ref, attribs))
+ ? &sv_yes : &sv_no;
+ break;
+ default: ST(0) = &sv_no; /* dbd_st_bind_col has called set_err */
+ break;
+ }
+ }
+#line 875 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#endif /* dbd_st_bind_col */
+
+XS(XS_DBD__Oracle_8__st_bind_param); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_bind_param)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 3 || items > 4)
+ croak_xs_usage(cv, "sth, param, value, attribs=Nullsv");
+ {
+ SV * sth = ST(0);
+ SV * param = ST(1);
+ SV * value = ST(2);
+ SV * attribs;
+
+ if (items < 4)
+ attribs = Nullsv;
+ else {
+ attribs = ST(3);
+ }
+#line 477 "Oracle_8.xsi"
+ {
+ IV sql_type = 0;
+ D_imp_sth(sth);
+ if (SvGMAGICAL(value))
+ mg_get(value);
+ if (attribs) {
+ if (SvNIOK(attribs)) {
+ sql_type = SvIV(attribs);
+ attribs = Nullsv;
+ }
+ else {
+ SV **svp;
+ DBD_ATTRIBS_CHECK("bind_param", sth, attribs);
+ /* XXX we should perhaps complain if TYPE is not SvNIOK */
+ DBD_ATTRIB_GET_IV(attribs, "TYPE",4, svp, sql_type);
+ }
+ }
+ ST(0) = dbd_bind_ph(sth, imp_sth, param, value, sql_type, attribs, FALSE, 0)
+ ? &sv_yes : &sv_no;
+ }
+#line 924 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__st_bind_param_inout); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_bind_param_inout)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 4 || items > 5)
+ croak_xs_usage(cv, "sth, param, value_ref, maxlen, attribs=Nullsv");
+ {
+ SV * sth = ST(0);
+ SV * param = ST(1);
+ SV * value_ref = ST(2);
+ IV maxlen = (IV)SvIV(ST(3));
+ SV * attribs;
+
+ if (items < 5)
+ attribs = Nullsv;
+ else {
+ attribs = ST(4);
+ }
+#line 507 "Oracle_8.xsi"
+ {
+ IV sql_type = 0;
+ D_imp_sth(sth);
+ SV *value;
+ if (!SvROK(value_ref) || SvTYPE(SvRV(value_ref)) > SVt_PVMG)
+ croak("bind_param_inout needs a reference to a scalar value");
+ value = SvRV(value_ref);
+ if (SvREADONLY(value))
+ croak("Modification of a read-only value attempted");
+ if (SvGMAGICAL(value))
+ mg_get(value);
+ if (attribs) {
+ if (SvNIOK(attribs)) {
+ sql_type = SvIV(attribs);
+ attribs = Nullsv;
+ }
+ else {
+ SV **svp;
+ DBD_ATTRIBS_CHECK("bind_param", sth, attribs);
+ DBD_ATTRIB_GET_IV(attribs, "TYPE",4, svp, sql_type);
+ }
+ }
+ ST(0) = dbd_bind_ph(sth, imp_sth, param, value, sql_type, attribs, TRUE, maxlen)
+ ? &sv_yes : &sv_no;
+ }
+#line 978 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__st_execute); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_execute)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 1)
+ croak_xs_usage(cv, "sth, ...");
+ {
+ SV * sth = ST(0);
+#line 538 "Oracle_8.xsi"
+ D_imp_sth(sth);
+ int retval;
+ if (items > 1) { /* need to bind params */
+ if (!dbdxst_bind_params(sth, imp_sth, items, ax) ) {
+ XSRETURN_UNDEF;
+ }
+ }
+ /* XXX this code is duplicated in selectrow_arrayref above */
+ if (DBIc_ROW_COUNT(imp_sth) > 0) /* reset for re-execute */
+ DBIc_ROW_COUNT(imp_sth) = 0;
+ retval = dbd_st_execute(sth, imp_sth);
+ /* remember that dbd_st_execute must return <= -2 for error */
+ if (retval == 0) /* ok with no rows affected */
+ XST_mPV(0, "0E0"); /* (true but zero) */
+ else if (retval < -1) /* -1 == unknown number of rows */
+ XST_mUNDEF(0); /* <= -2 means error */
+ else
+ XST_mIV(0, retval); /* typically 1, rowcount or -1 */
+#line 1015 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#ifdef dbd_st_execute_for_fetch
+#define XSubPPtmpAAAJ 1
+
+
+XS(XS_DBD__Oracle_8__st_execute_for_fetch); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_execute_for_fetch)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 2 || items > 3)
+ croak_xs_usage(cv, "sth, fetch_tuple_sub, tuple_status = Nullsv");
+ {
+ SV * sth = ST(0);
+ SV * fetch_tuple_sub = ST(1);
+ SV * tuple_status;
+
+ if (items < 3)
+ tuple_status = Nullsv;
+ else {
+ tuple_status = ST(2);
+ }
+#line 566 "Oracle_8.xsi"
+ {
+ D_imp_sth(sth);
+ ST(0) = dbd_st_execute_for_fetch(sth, imp_sth, fetch_tuple_sub, tuple_status);
+ }
+#line 1049 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+#endif
+
+XS(XS_DBD__Oracle_8__st_fetchrow_arrayref); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_fetchrow_arrayref)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ dXSI32;
+ if (items != 1)
+ croak_xs_usage(cv, "sth");
+ {
+ SV * sth = ST(0);
+#line 581 "Oracle_8.xsi"
+ D_imp_sth(sth);
+ AV *av;
+ if (0) ix = ix; /* avoid unused variable warning */
+ av = dbd_st_fetch(sth, imp_sth);
+ ST(0) = (av) ? sv_2mortal(newRV((SV *)av)) : &PL_sv_undef;
+#line 1075 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__st_fetchrow_array); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_fetchrow_array)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ dXSI32;
+ if (items != 1)
+ croak_xs_usage(cv, "sth");
+ PERL_UNUSED_VAR(ax); /* -Wall */
+ SP -= items;
+ {
+ SV * sth = ST(0);
+#line 594 "Oracle_8.xsi"
+ D_imp_sth(sth);
+ AV *av;
+ av = dbd_st_fetch(sth, imp_sth);
+ if (av) {
+ int i;
+ int num_fields = AvFILL(av)+1;
+ EXTEND(sp, num_fields);
+ for(i=0; i < num_fields; ++i) {
+ PUSHs(AvARRAY(av)[i]);
+ }
+ if (0) ix = ix; /* avoid unused variable warning */
+ }
+#line 1109 "Oracle_8.c"
+ PUTBACK;
+ return;
+ }
+}
+
+
+XS(XS_DBD__Oracle_8__st_fetchall_arrayref); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_fetchall_arrayref)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 1 || items > 3)
+ croak_xs_usage(cv, "sth, slice=&PL_sv_undef, batch_row_count=&PL_sv_undef");
+ {
+ SV * sth = ST(0);
+ SV * slice;
+ SV * batch_row_count;
+
+ if (items < 2)
+ slice = &PL_sv_undef;
+ else {
+ slice = ST(1);
+ }
+
+ if (items < 3)
+ batch_row_count = &PL_sv_undef;
+ else {
+ batch_row_count = ST(2);
+ }
+#line 614 "Oracle_8.xsi"
+ if (SvOK(slice)) { /* fallback to perl implementation */
+ ST(0) = dbixst_bounce_method("DBD::Oracle_8::st::SUPER::fetchall_arrayref", 3);
+ }
+ else {
+ ST(0) = dbdxst_fetchall_arrayref(sth, slice, batch_row_count);
+ }
+#line 1149 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__st_finish); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_finish)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "sth");
+ {
+ SV * sth = ST(0);
+#line 626 "Oracle_8.xsi"
+ D_imp_sth(sth);
+ D_imp_dbh_from_sth;
+ if (!DBIc_ACTIVE(imp_sth)) {
+ /* No active statement to finish */
+ XSRETURN_YES;
+ }
+ if (!DBIc_ACTIVE(imp_dbh)) {
+ /* Either an explicit disconnect() or global destruction */
+ /* has disconnected us from the database. Finish is meaningless */
+ DBIc_ACTIVE_off(imp_sth);
+ XSRETURN_YES;
+ }
+#ifdef dbd_st_finish3
+ ST(0) = dbd_st_finish3(sth, imp_sth, 0) ? &sv_yes : &sv_no;
+#else
+ ST(0) = dbd_st_finish(sth, imp_sth) ? &sv_yes : &sv_no;
+#endif
+#line 1185 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__st_blob_read); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_blob_read)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items < 4 || items > 6)
+ croak_xs_usage(cv, "sth, field, offset, len, destrv=Nullsv, destoffset=0");
+ {
+ SV * sth = ST(0);
+ int field = (int)SvIV(ST(1));
+ long offset = (long)SvIV(ST(2));
+ long len = (long)SvIV(ST(3));
+ SV * destrv;
+ long destoffset;
+
+ if (items < 5)
+ destrv = Nullsv;
+ else {
+ destrv = ST(4);
+ }
+
+ if (items < 6)
+ destoffset = 0;
+ else {
+ destoffset = (long)SvIV(ST(5));
+ }
+#line 654 "Oracle_8.xsi"
+ {
+ D_imp_sth(sth);
+ if (!destrv)
+ destrv = sv_2mortal(newRV(sv_2mortal(newSV(0))));
+ if (dbd_st_blob_read(sth, imp_sth, field, offset, len, destrv, destoffset))
+ ST(0) = SvRV(destrv);
+ else ST(0) = &PL_sv_undef;
+ }
+#line 1229 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__st_STORE); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_STORE)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 3)
+ croak_xs_usage(cv, "sth, keysv, valuesv");
+ {
+ SV * sth = ST(0);
+ SV * keysv = ST(1);
+ SV * valuesv = ST(2);
+#line 670 "Oracle_8.xsi"
+ D_imp_sth(sth);
+ if (SvGMAGICAL(valuesv))
+ mg_get(valuesv);
+ ST(0) = &sv_yes;
+ if (!dbd_st_STORE_attrib(sth, imp_sth, keysv, valuesv))
+ if (!DBIc_DBISTATE(imp_sth)->set_attr(sth, keysv, valuesv))
+ ST(0) = &sv_no;
+#line 1257 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__st_FETCH_attrib); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_FETCH_attrib)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ dXSI32;
+ if (items != 2)
+ croak_xs_usage(cv, "sth, keysv");
+ {
+ SV * sth = ST(0);
+ SV * keysv = ST(1);
+#line 687 "Oracle_8.xsi"
+ D_imp_sth(sth);
+ SV *valuesv;
+ if (0) ix = ix; /* avoid unused variable warning */
+ valuesv = dbd_st_FETCH_attrib(sth, imp_sth, keysv);
+ if (!valuesv)
+ valuesv = DBIc_DBISTATE(imp_sth)->get_attr(sth, keysv);
+ ST(0) = valuesv; /* dbd_st_FETCH_attrib did sv_2mortal */
+#line 1285 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__st_DESTROY); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_DESTROY)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "sth");
+ PERL_UNUSED_VAR(ax); /* -Wall */
+ SP -= items;
+ {
+ SV * sth = ST(0);
+#line 700 "Oracle_8.xsi"
+ D_imp_sth(sth);
+ ST(0) = &sv_yes;
+ if (!DBIc_IMPSET(imp_sth)) { /* was never fully set up */
+ STRLEN lna;
+ if (DBIc_WARN(imp_sth) && !dirty && DBIc_DBISTATE(imp_sth)->debug >= 2)
+ PerlIO_printf(DBIc_LOGPIO(imp_sth),
+ " DESTROY for %s ignored - handle not initialised\n",
+ SvPV(sth,lna));
+ }
+ else {
+ if (DBIc_IADESTROY(imp_sth)) { /* want's ineffective destroy */
+ DBIc_ACTIVE_off(imp_sth);
+ }
+ if (DBIc_ACTIVE(imp_sth)) {
+ D_imp_dbh_from_sth;
+ if (!dirty && DBIc_ACTIVE(imp_dbh)) {
+#ifdef dbd_st_finish3
+ dbd_st_finish3(sth, imp_sth, 1);
+#else
+ dbd_st_finish(sth, imp_sth);
+#endif
+ }
+ else {
+ DBIc_ACTIVE_off(imp_sth);
+ }
+ }
+ dbd_st_destroy(sth, imp_sth);
+ }
+#line 1334 "Oracle_8.c"
+ PUTBACK;
+ return;
+ }
+}
+
+
+/* INCLUDE: Returning to 'Oracle_8.xs' from 'Oracle_8.xsi' */
+
+
+XS(XS_DBD__Oracle_8__st_ora_fetch); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_ora_fetch)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "sth");
+ PERL_UNUSED_VAR(ax); /* -Wall */
+ SP -= items;
+ {
+ SV * sth = ST(0);
+#line 78 "Oracle_8.xs"
+ /* fetchrow: but with scalar fetch returning NUM_FIELDS for Oraperl */
+ /* This code is called _directly_ by Oraperl.pm bypassing the DBI. */
+ /* as a result we have to do some things ourselves (like calling */
+ /* CLEAR_ERROR) and we loose the tracing that the DBI offers :-( */
+ D_imp_sth(sth);
+ AV *av;
+ int debug = DBIc_DEBUGIV(imp_sth);
+ if (DBIS->debug > debug)
+ debug = DBIS->debug;
+ DBIh_CLEAR_ERROR(imp_sth);
+ if (GIMME == G_SCALAR) { /* XXX Oraperl */
+ /* This non-standard behaviour added only to increase the */
+ /* performance of the oraperl emulation layer (Oraperl.pm) */
+ if (!imp_sth->done_desc && !dbd_describe(sth, imp_sth))
+ XSRETURN_UNDEF;
+ XSRETURN_IV(DBIc_NUM_FIELDS(imp_sth));
+ }
+ if (debug >= 2)
+ PerlIO_printf(DBILOGFP, " -> ora_fetch\n");
+ av = dbd_st_fetch(sth, imp_sth);
+ if (av) {
+ int num_fields = AvFILL(av)+1;
+ int i;
+ EXTEND(sp, num_fields);
+ for(i=0; i < num_fields; ++i) {
+ PUSHs(AvARRAY(av)[i]);
+ }
+ if (debug >= 2)
+ PerlIO_printf(DBILOGFP, " <- (...) [%d items]\n", num_fields);
+ }
+ else {
+ if (debug >= 2)
+ PerlIO_printf(DBILOGFP, " <- () [0 items]\n");
+ }
+ if (debug >= 2 && SvTRUE(DBIc_ERR(imp_sth)))
+ PerlIO_printf(DBILOGFP, " !! ERROR: %s %s",
+ neatsvpv(DBIc_ERR(imp_sth),0), neatsvpv(DBIc_ERRSTR(imp_sth),0));
+#line 1396 "Oracle_8.c"
+ PUTBACK;
+ return;
+ }
+}
+
+
+XS(XS_DBD__Oracle_8__st_cancel); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__st_cancel)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "sth");
+ {
+ SV * sth = ST(0);
+#line 121 "Oracle_8.xs"
+ D_imp_sth(sth);
+ ST(0) = dbd_st_cancel(sth, imp_sth) ? &sv_yes : &sv_no;
+#line 1418 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_reauthenticate); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_reauthenticate)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 3)
+ croak_xs_usage(cv, "dbh, uid, pwd");
+ {
+ SV * dbh = ST(0);
+ char * uid = (char *)SvPV_nolen(ST(1));
+ char * pwd = (char *)SvPV_nolen(ST(2));
+#line 133 "Oracle_8.xs"
+ D_imp_dbh(dbh);
+ ST(0) = ora_db_reauthenticate(dbh, imp_dbh, uid, pwd) ? &sv_yes : &sv_no;
+#line 1441 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_ora_lob_write); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_ora_lob_write)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 4)
+ croak_xs_usage(cv, "dbh, locator, offset, data");
+ {
+ SV * dbh = ST(0);
+ OCILobLocator * locator;
+ UV offset = (UV)SvUV(ST(2));
+ SV * data = ST(3);
+#line 143 "Oracle_8.xs"
+ D_imp_dbh(dbh);
+ ub4 amtp;
+ STRLEN data_len; /* bytes not chars */
+ dvoid *bufp;
+ sword status;
+ ub2 csid;
+ ub1 csform;
+#line 1470 "Oracle_8.c"
+
+ if (sv_derived_from(ST(1), "OCILobLocatorPtr")) {
+ IV tmp = SvIV((SV*)SvRV(ST(1)));
+ locator = INT2PTR(OCILobLocator *,tmp);
+ }
+ else
+ Perl_croak(aTHX_ "%s: %s is not of type %s",
+ "DBD::Oracle_8::db::ora_lob_write",
+ "locator", "OCILobLocatorPtr");
+#line 151 "Oracle_8.xs"
+ csid = 0;
+ csform = SQLCS_IMPLICIT;
+ bufp = SvPV(data, data_len);
+ amtp = data_len;
+ /* if locator is CLOB and data is UTF8 and not in bytes pragma */
+ /* if (0 && SvUTF8(data) && !IN_BYTES) { amtp = sv_len_utf8(data); } */
+ /* added by lab: */
+ /* LAB do something about length here? see above comment */
+ OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
+ ST(0) = &sv_undef;
+ return;
+ }
+#ifdef OCI_ATTR_CHARSET_ID
+ /* Effectively only used so AL32UTF8 works properly */
+ OCILobCharSetId_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csid, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetId");
+ ST(0) = &sv_undef;
+ return;
+ }
+#endif /* OCI_ATTR_CHARSET_ID */
+ /* if data is utf8 but charset isn't then switch to utf8 csid */
+ csid = (SvUTF8(data) && !CS_IS_UTF8(csid)) ? utf8_csid : CSFORM_IMPLIED_CSID(csform);
+
+ OCILobWrite_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
+ &amtp, (ub4)offset,
+ bufp, (ub4)data_len, OCI_ONE_PIECE,
+ NULL, NULL,
+ (ub2)0, csform , status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobWrite");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = &sv_yes;
+ }
+#line 1519 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_ora_lob_append); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_ora_lob_append)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 3)
+ croak_xs_usage(cv, "dbh, locator, data");
+ {
+ SV * dbh = ST(0);
+ OCILobLocator * locator;
+ SV * data = ST(2);
+#line 196 "Oracle_8.xs"
+ D_imp_dbh(dbh);
+ ub4 amtp;
+ STRLEN data_len; /* bytes not chars */
+ dvoid *bufp;
+ sword status;
+ ub4 startp;
+ ub1 csform;
+ ub2 csid;
+#line 1548 "Oracle_8.c"
+
+ if (sv_derived_from(ST(1), "OCILobLocatorPtr")) {
+ IV tmp = SvIV((SV*)SvRV(ST(1)));
+ locator = INT2PTR(OCILobLocator *,tmp);
+ }
+ else
+ Perl_croak(aTHX_ "%s: %s is not of type %s",
+ "DBD::Oracle_8::db::ora_lob_append",
+ "locator", "OCILobLocatorPtr");
+#line 205 "Oracle_8.xs"
+ csid = 0;
+ csform = SQLCS_IMPLICIT;
+ bufp = SvPV(data, data_len);
+ amtp = data_len;
+ /* if locator is CLOB and data is UTF8 and not in bytes pragma */
+ /* if (1 && SvUTF8(data) && !IN_BYTES) */
+ /* added by lab: */
+ /* LAB do something about length here? see above comment */
+ OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
+ ST(0) = &sv_undef;
+ return;
+ }
+#ifdef OCI_ATTR_CHARSET_ID
+ /* Effectively only used so AL32UTF8 works properly */
+ OCILobCharSetId_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csid, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetId");
+ ST(0) = &sv_undef;
+ return;
+ }
+#endif /* OCI_ATTR_CHARSET_ID */
+ /* if data is utf8 but charset isn't then switch to utf8 csid */
+ csid = (SvUTF8(data) && !CS_IS_UTF8(csid)) ? utf8_csid : CSFORM_IMPLIED_CSID(csform);
+#if !defined(ORA_OCI_8) && defined(OCI_HTYPE_DIRPATH_FN_CTX) /* Oracle is >= 9.0 */
+ OCILobWriteAppend_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
+ &amtp, bufp, (ub4)data_len, OCI_ONE_PIECE,
+ NULL, NULL,
+ csid, csform, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobWriteAppend");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = &sv_yes;
+ }
+#else
+ OCILobGetLength_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, &startp, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobGetLength");
+ ST(0) = &sv_undef;
+ } else {
+ /* start one after the end -- the first position in the LOB is 1 */
+ startp++;
+ if (DBIS->debug >= 2 )
+ PerlIO_printf(DBILOGFP, " Calling OCILobWrite with csid=%d csform=%d\n",csid, csform );
+ OCILobWrite_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
+ &amtp, startp,
+ bufp, (ub4)data_len, OCI_ONE_PIECE,
+ NULL, NULL,
+ csid, csform , status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobWrite");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = &sv_yes;
+ }
+ }
+#endif
+#line 1620 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_ora_lob_read); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_ora_lob_read)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 4)
+ croak_xs_usage(cv, "dbh, locator, offset, length");
+ {
+ SV * dbh = ST(0);
+ OCILobLocator * locator;
+ UV offset = (UV)SvUV(ST(2));
+ UV length = (UV)SvUV(ST(3));
+#line 275 "Oracle_8.xs"
+ D_imp_dbh(dbh);
+ ub4 amtp;
+ STRLEN bufp_len;
+ SV *dest_sv;
+ dvoid *bufp;
+ sword status;
+ ub1 csform;
+#line 1649 "Oracle_8.c"
+
+ if (sv_derived_from(ST(1), "OCILobLocatorPtr")) {
+ IV tmp = SvIV((SV*)SvRV(ST(1)));
+ locator = INT2PTR(OCILobLocator *,tmp);
+ }
+ else
+ Perl_croak(aTHX_ "%s: %s is not of type %s",
+ "DBD::Oracle_8::db::ora_lob_read",
+ "locator", "OCILobLocatorPtr");
+#line 283 "Oracle_8.xs"
+ csform = SQLCS_IMPLICIT;
+ dest_sv = sv_2mortal(newSV(length*4)); /*LAB: crude hack that works... tim did it else where XXX */
+ SvPOK_on(dest_sv);
+ bufp_len = SvLEN(dest_sv); /* XXX bytes not chars? (lab: yes) */
+ bufp = SvPVX(dest_sv);
+ amtp = length; /* if utf8 and clob/nclob: in: chars, out: bytes */
+ /* http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96584/oci16m40.htm#427818 */
+ /* if locator is CLOB and data is UTF8 and not in bytes pragma */
+ /* if (0 && SvUTF8(dest_sv) && !IN_BYTES) { amtp = sv_len_utf8(dest_sv); } */
+ /* added by lab: */
+ OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
+ dest_sv = &sv_undef;
+ return;
+ }
+ OCILobRead_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
+ &amtp, (ub4)offset, /* offset starts at 1 */
+ bufp, (ub4)bufp_len,
+ 0, 0, (ub2)0, csform, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobRead");
+ dest_sv = &sv_undef;
+ }
+ else {
+ SvCUR(dest_sv) = amtp; /* always bytes here */
+ *SvEND(dest_sv) = '\0';
+ if (CSFORM_IMPLIES_UTF8(csform))
+ SvUTF8_on(dest_sv);
+
+ }
+ ST(0) = dest_sv;
+#line 1692 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_ora_lob_trim); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_ora_lob_trim)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 3)
+ croak_xs_usage(cv, "dbh, locator, length");
+ {
+ SV * dbh = ST(0);
+ OCILobLocator * locator;
+ UV length = (UV)SvUV(ST(2));
+#line 322 "Oracle_8.xs"
+ D_imp_dbh(dbh);
+ sword status;
+#line 1715 "Oracle_8.c"
+
+ if (sv_derived_from(ST(1), "OCILobLocatorPtr")) {
+ IV tmp = SvIV((SV*)SvRV(ST(1)));
+ locator = INT2PTR(OCILobLocator *,tmp);
+ }
+ else
+ Perl_croak(aTHX_ "%s: %s is not of type %s",
+ "DBD::Oracle_8::db::ora_lob_trim",
+ "locator", "OCILobLocatorPtr");
+#line 325 "Oracle_8.xs"
+ OCILobTrim_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, length, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobTrim");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = &sv_yes;
+ }
+#line 1734 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__db_ora_lob_length); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__db_ora_lob_length)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 2)
+ croak_xs_usage(cv, "dbh, locator");
+ {
+ SV * dbh = ST(0);
+ OCILobLocator * locator;
+#line 339 "Oracle_8.xs"
+ D_imp_dbh(dbh);
+ sword status;
+ ub4 len = 0;
+#line 1757 "Oracle_8.c"
+
+ if (sv_derived_from(ST(1), "OCILobLocatorPtr")) {
+ IV tmp = SvIV((SV*)SvRV(ST(1)));
+ locator = INT2PTR(OCILobLocator *,tmp);
+ }
+ else
+ Perl_croak(aTHX_ "%s: %s is not of type %s",
+ "DBD::Oracle_8::db::ora_lob_length",
+ "locator", "OCILobLocatorPtr");
+#line 343 "Oracle_8.xs"
+ OCILobGetLength_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, &len, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobTrim");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = sv_2mortal(newSVuv(len));
+ }
+#line 1776 "Oracle_8.c"
+ }
+ XSRETURN(1);
+}
+
+
+XS(XS_DBD__Oracle_8__dr_init_oci); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBD__Oracle_8__dr_init_oci)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ if (items != 1)
+ croak_xs_usage(cv, "drh");
+ {
+ SV * drh = ST(0);
+#line 360 "Oracle_8.xs"
+ D_imp_drh(drh);
+ dbd_init_oci(DBIS) ;
+ dbd_init_oci_drh(imp_drh) ;
+#line 1798 "Oracle_8.c"
+ }
+ XSRETURN_EMPTY;
+}
+
+#ifdef __cplusplus
+extern "C"
+#endif
+XS(boot_DBD__Oracle_8); /* prototype to pass -Wmissing-prototypes */
+XS(boot_DBD__Oracle_8)
+{
+#ifdef dVAR
+ dVAR; dXSARGS;
+#else
+ dXSARGS;
+#endif
+ const char* file = __FILE__;
+
+ PERL_UNUSED_VAR(cv); /* -W */
+ PERL_UNUSED_VAR(items); /* -W */
+ XS_VERSION_BOOTCHECK ;
+
+ {
+ CV * cv ;
+
+ cv = newXS("DBD::Oracle::ORA_CHAR", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 96 ;
+ cv = newXS("DBD::Oracle::ORA_ROWID", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 11 ;
+ cv = newXS("DBD::Oracle::ORA_MLSLABEL", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 105 ;
+ cv = newXS("DBD::Oracle::ORA_CLOB", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 112 ;
+ cv = newXS("DBD::Oracle::ORA_RAW", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 23 ;
+ cv = newXS("DBD::Oracle::SQLCS_IMPLICIT", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = SQLCS_IMPLICIT ;
+ cv = newXS("DBD::Oracle::ORA_SYSDBA", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 0x0002 ;
+ cv = newXS("DBD::Oracle::ORA_BLOB", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 113 ;
+ cv = newXS("DBD::Oracle::ORA_STRING", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 5 ;
+ cv = newXS("DBD::Oracle::ORA_VARCHAR2", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 1 ;
+ cv = newXS("DBD::Oracle::ORA_RSET", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 116 ;
+ cv = newXS("DBD::Oracle::SQLCS_NCHAR", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = SQLCS_NCHAR ;
+ cv = newXS("DBD::Oracle::ORA_LONGRAW", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 24 ;
+ cv = newXS("DBD::Oracle::constant", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 0 ;
+ cv = newXS("DBD::Oracle::ORA_NUMBER", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 2 ;
+ cv = newXS("DBD::Oracle::ORA_NTY", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 108 ;
+ cv = newXS("DBD::Oracle::ORA_LONG", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 8 ;
+ cv = newXS("DBD::Oracle::ORA_CHARZ", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 97 ;
+ cv = newXS("DBD::Oracle::ORA_SYSOPER", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 0x0004 ;
+ cv = newXS("DBD::Oracle::ORA_DATE", XS_DBD__Oracle_constant, file);
+ XSANY.any_i32 = 12 ;
+ newXS("DBD::Oracle::ORA_OCI", XS_DBD__Oracle_ORA_OCI, file);
+ newXS("DBD::Oracle::ora_env_var", XS_DBD__Oracle_ora_env_var, file);
+#if XSubPPtmpAAAA
+ newXS("DBD::Oracle::ora_cygwin_set_env", XS_DBD__Oracle_ora_cygwin_set_env, file);
+#endif
+#if XSubPPtmpAAAB
+ cv = newXS("DBD::Oracle_8::dr::discon_all_", XS_DBD__Oracle_8__dr_discon_all_, file);
+ XSANY.any_i32 = 0 ;
+ cv = newXS("DBD::Oracle_8::dr::disconnect_all", XS_DBD__Oracle_8__dr_discon_all_, file);
+ XSANY.any_i32 = 1 ;
+#endif
+#if XSubPPtmpAAAC
+ newXS("DBD::Oracle_8::dr::data_sources", XS_DBD__Oracle_8__dr_data_sources, file);
+#endif
+ newXS("DBD::Oracle_8::db::_login", XS_DBD__Oracle_8__db__login, file);
+ newXS("DBD::Oracle_8::db::selectall_arrayref", XS_DBD__Oracle_8__db_selectall_arrayref, file);
+ cv = newXS("DBD::Oracle_8::db::selectrow_arrayref", XS_DBD__Oracle_8__db_selectrow_arrayref, file);
+ XSANY.any_i32 = 0 ;
+ cv = newXS("DBD::Oracle_8::db::selectrow_array", XS_DBD__Oracle_8__db_selectrow_arrayref, file);
+ XSANY.any_i32 = 1 ;
+#if XSubPPtmpAAAD
+ newXS("DBD::Oracle_8::db::do", XS_DBD__Oracle_8__db_do, file);
+#endif
+#if XSubPPtmpAAAE
+ newXS("DBD::Oracle_8::db::last_insert_id", XS_DBD__Oracle_8__db_last_insert_id, file);
+#endif
+ newXS("DBD::Oracle_8::db::commit", XS_DBD__Oracle_8__db_commit, file);
+ newXS("DBD::Oracle_8::db::rollback", XS_DBD__Oracle_8__db_rollback, file);
+ newXS("DBD::Oracle_8::db::disconnect", XS_DBD__Oracle_8__db_disconnect, file);
+ newXS("DBD::Oracle_8::db::STORE", XS_DBD__Oracle_8__db_STORE, file);
+ newXS("DBD::Oracle_8::db::FETCH", XS_DBD__Oracle_8__db_FETCH, file);
+ newXS("DBD::Oracle_8::db::DESTROY", XS_DBD__Oracle_8__db_DESTROY, file);
+#if XSubPPtmpAAAF
+ newXS("DBD::Oracle_8::db::take_imp_data", XS_DBD__Oracle_8__db_take_imp_data, file);
+#endif
+#if XSubPPtmpAAAG
+ newXS("DBD::Oracle_8::db::data_sources", XS_DBD__Oracle_8__db_data_sources, file);
+#endif
+ newXS("DBD::Oracle_8::st::_prepare", XS_DBD__Oracle_8__st__prepare, file);
+#if XSubPPtmpAAAH
+ newXS("DBD::Oracle_8::st::rows", XS_DBD__Oracle_8__st_rows, file);
+#endif
+#if XSubPPtmpAAAI
+ newXS("DBD::Oracle_8::st::bind_col", XS_DBD__Oracle_8__st_bind_col, file);
+#endif
+ newXS("DBD::Oracle_8::st::bind_param", XS_DBD__Oracle_8__st_bind_param, file);
+ newXS("DBD::Oracle_8::st::bind_param_inout", XS_DBD__Oracle_8__st_bind_param_inout, file);
+ newXS("DBD::Oracle_8::st::execute", XS_DBD__Oracle_8__st_execute, file);
+#if XSubPPtmpAAAJ
+ newXS("DBD::Oracle_8::st::execute_for_fetch", XS_DBD__Oracle_8__st_execute_for_fetch, file);
+#endif
+ cv = newXS("DBD::Oracle_8::st::fetch", XS_DBD__Oracle_8__st_fetchrow_arrayref, file);
+ XSANY.any_i32 = 1 ;
+ cv = newXS("DBD::Oracle_8::st::fetchrow_arrayref", XS_DBD__Oracle_8__st_fetchrow_arrayref, file);
+ XSANY.any_i32 = 0 ;
+ cv = newXS("DBD::Oracle_8::st::fetchrow", XS_DBD__Oracle_8__st_fetchrow_array, file);
+ XSANY.any_i32 = 1 ;
+ cv = newXS("DBD::Oracle_8::st::fetchrow_array", XS_DBD__Oracle_8__st_fetchrow_array, file);
+ XSANY.any_i32 = 0 ;
+ newXS("DBD::Oracle_8::st::fetchall_arrayref", XS_DBD__Oracle_8__st_fetchall_arrayref, file);
+ newXS("DBD::Oracle_8::st::finish", XS_DBD__Oracle_8__st_finish, file);
+ newXS("DBD::Oracle_8::st::blob_read", XS_DBD__Oracle_8__st_blob_read, file);
+ newXS("DBD::Oracle_8::st::STORE", XS_DBD__Oracle_8__st_STORE, file);
+ cv = newXS("DBD::Oracle_8::st::FETCH_attrib", XS_DBD__Oracle_8__st_FETCH_attrib, file);
+ XSANY.any_i32 = 0 ;
+ cv = newXS("DBD::Oracle_8::st::FETCH", XS_DBD__Oracle_8__st_FETCH_attrib, file);
+ XSANY.any_i32 = 1 ;
+ newXS("DBD::Oracle_8::st::DESTROY", XS_DBD__Oracle_8__st_DESTROY, file);
+ newXS("DBD::Oracle_8::st::ora_fetch", XS_DBD__Oracle_8__st_ora_fetch, file);
+ newXS("DBD::Oracle_8::st::cancel", XS_DBD__Oracle_8__st_cancel, file);
+ newXS("DBD::Oracle_8::db::reauthenticate", XS_DBD__Oracle_8__db_reauthenticate, file);
+ newXS("DBD::Oracle_8::db::ora_lob_write", XS_DBD__Oracle_8__db_ora_lob_write, file);
+ newXS("DBD::Oracle_8::db::ora_lob_append", XS_DBD__Oracle_8__db_ora_lob_append, file);
+ newXS("DBD::Oracle_8::db::ora_lob_read", XS_DBD__Oracle_8__db_ora_lob_read, file);
+ newXS("DBD::Oracle_8::db::ora_lob_trim", XS_DBD__Oracle_8__db_ora_lob_trim, file);
+ newXS("DBD::Oracle_8::db::ora_lob_length", XS_DBD__Oracle_8__db_ora_lob_length, file);
+ newXS("DBD::Oracle_8::dr::init_oci", XS_DBD__Oracle_8__dr_init_oci, file);
+ }
+
+ /* Initialisation Section */
+
+#if XSubPPtmpAAAA
+#endif
+#line 18 "Oracle_8.xsi"
+ items = 0; /* avoid 'unused variable' warning */
+ DBISTATE_INIT;
+ /* XXX this interface will change: */
+ DBI_IMP_SIZE("DBD::Oracle_8::dr::imp_data_size", sizeof(imp_drh_t));
+ DBI_IMP_SIZE("DBD::Oracle_8::db::imp_data_size", sizeof(imp_dbh_t));
+ DBI_IMP_SIZE("DBD::Oracle_8::st::imp_data_size", sizeof(imp_sth_t));
+ dbd_init(DBIS);
+
+#if XSubPPtmpAAAB
+#endif
+#if XSubPPtmpAAAC
+#endif
+#if XSubPPtmpAAAD
+#endif
+#if XSubPPtmpAAAE
+#endif
+#if XSubPPtmpAAAF
+#endif
+#if XSubPPtmpAAAG
+#endif
+#if XSubPPtmpAAAH
+#endif
+#if XSubPPtmpAAAI
+#endif
+#if XSubPPtmpAAAJ
+#endif
+#line 1973 "Oracle_8.c"
+
+ /* End of Initialisation Section */
+
+ if (PL_unitcheckav)
+ call_list(PL_scopestack_ix, PL_unitcheckav);
+ XSRETURN_YES;
+}
+
Added: dbd-oracle/branches/DBD-Oracle8/Oracle_8.def
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle8/Oracle_8.def Mon Dec 21 10:25:03 2009
@@ -0,0 +1,5 @@
+LIBRARY "Oracle_8"
+EXPORTS
+ boot_DBD__Oracle_8
+ _boot_DBD__Oracle_8 = boot_DBD__Oracle_8
+
Added: dbd-oracle/branches/DBD-Oracle8/Oracle_8.h
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle8/Oracle_8.h Mon Dec 21 10:25:03 2009
@@ -0,0 +1,59 @@
+/*
+ Copyright (c) 1994-2006 Tim Bunce
+
+ See the COPYRIGHT section in the Oracle.pm file for terms.
+
+*/
+
+
+#define NEED_DBIXS_VERSION 93
+
+#define PERL_POLLUTE
+
+#include <DBIXS.h> /* installed by the DBI module */
+
+#include "dbdimp.h"
+
+#include "dbivport.h"
+
+#include <dbd_xsh.h> /* installed by the DBI module */
+
+/* These prototypes are for dbdimp.c funcs used in the XS file */
+/* These names are #defined to driver specific names in dbdimp.h */
+
+void dbd_init _((dbistate_t *dbistate));
+void dbd_init_oci_drh _((imp_drh_t * imp_drh));
+
+int dbd_db_login _((SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *user, char *pwd));
+int dbd_db_do _((SV *sv, char *statement));
+int dbd_db_commit _((SV *dbh, imp_dbh_t *imp_dbh));
+int dbd_db_rollback _((SV *dbh, imp_dbh_t *imp_dbh));
+int dbd_db_disconnect _((SV *dbh, imp_dbh_t *imp_dbh));
+void dbd_db_destroy _((SV *dbh, imp_dbh_t *imp_dbh));
+int dbd_db_STORE_attrib _((SV *dbh, imp_dbh_t *imp_dbh, SV *keysv, SV *valuesv));
+SV *dbd_db_FETCH_attrib _((SV *dbh, imp_dbh_t *imp_dbh, SV *keysv));
+
+int dbd_st_prepare _((SV *sth, imp_sth_t *imp_sth,
+ char *statement, SV *attribs));
+int dbd_st_rows _((SV *sth, imp_sth_t *imp_sth));
+int dbd_st_execute _((SV *sth, imp_sth_t *imp_sth));
+int dbd_st_cancel _((SV *sth, imp_sth_t *imp_sth));
+AV *dbd_st_fetch _((SV *sth, imp_sth_t *imp_sth));
+
+int dbd_st_finish _((SV *sth, imp_sth_t *imp_sth));
+void dbd_st_destroy _((SV *sth, imp_sth_t *imp_sth));
+int dbd_st_blob_read _((SV *sth, imp_sth_t *imp_sth,
+ int field, long offset, long len, SV *destrv, long destoffset));
+int dbd_st_STORE_attrib _((SV *sth, imp_sth_t *imp_sth, SV *keysv, SV *valuesv));
+SV *dbd_st_FETCH_attrib _((SV *sth, imp_sth_t *imp_sth, SV *keysv));
+int dbd_bind_ph _((SV *sth, imp_sth_t *imp_sth,
+ SV *param, SV *value, IV sql_type, SV *attribs, int is_inout, IV maxlen));
+
+int dbd_db_login6 _((SV *dbh, imp_dbh_t *imp_dbh, char *dbname, char *user, char *pwd, SV *attr));
+int dbd_describe _((SV *sth, imp_sth_t *imp_sth));
+ub4 ora_blob_read_piece _((SV *sth, imp_sth_t *imp_sth, imp_fbh_t *fbh, SV *dest_sv,
+ long offset, UV len, long destoffset));
+ub4 ora_blob_read_mb_piece _((SV *sth, imp_sth_t *imp_sth, imp_fbh_t *fbh, SV *dest_sv,
+ long offset, UV len, long destoffset));
+
+/* end of Oracle.h */
Added: dbd-oracle/branches/DBD-Oracle8/Oracle_8.obj
==============================================================================
Binary file. No diff available.
Added: dbd-oracle/branches/DBD-Oracle8/Oracle_8.pm
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle8/Oracle_8.pm Mon Dec 21 10:25:03 2009
@@ -0,0 +1,2866 @@
+# Oracle.pm
+#
+# Copyright (c) 1994-2005 Tim Bunce, Ireland
+#
+# See COPYRIGHT section in the documentation below
+
+require 5.003;
+
+$DBD::Oracle_8::VERSION = '0.01';
+
+my $ORACLE_ENV = ($^O eq 'VMS') ? 'ORA_8_ROOT' : 'ORACLE_8_HOME';
+
+{
+ package DBD::Oracle_8;
+
+ use DBI ();
+ use DynaLoader ();
+ use Exporter ();
+ @ISA = qw(DynaLoader Exporter);
+ %EXPORT_TAGS = (
+ ora_types => [ qw(
+ ORA_VARCHAR2 ORA_STRING ORA_NUMBER ORA_LONG ORA_ROWID ORA_DATE
+ ORA_RAW ORA_LONGRAW ORA_CHAR ORA_CHARZ ORA_MLSLABEL ORA_NTY
+ ORA_CLOB ORA_BLOB ORA_RSET
+ ) ],
+ ora_session_modes => [ qw( ORA_SYSDBA ORA_SYSOPER ) ],
+ );
+ @EXPORT_OK = qw(ORA_OCI SQLCS_IMPLICIT SQLCS_NCHAR ora_env_var ora_cygwin_set_env);
+ #unshift @EXPORT_OK, 'ora_cygwin_set_env' if $^O eq 'cygwin';
+ Exporter::export_ok_tags(qw(ora_types ora_session_modes));
+
+ my $Revision = substr(q$Revision: 1.103 $, 10);
+
+ require_version DBI 1.28;
+
+ bootstrap DBD::Oracle_8 $VERSION;
+
+ $drh = undef; # holds driver handle once initialised
+
+ sub CLONE {
+ $drh = undef ;
+ }
+
+ sub driver{
+ return $drh if $drh;
+ my($class, $attr) = @_;
+ my $oci = DBD::Oracle_8::ORA_OCI();
+
+ $class .= "::dr";
+
+ # not a 'my' since we use it above to prevent multiple drivers
+
+ $drh = DBI::_new_drh($class, {
+ 'Name' => 'Oracle_8',
+ 'Version' => $VERSION,
+ 'Err' => \my $err,
+ 'Errstr' => \my $errstr,
+ 'Attribution' => "DBD::Oracle_8 $VERSION using OCI$oci by John Scoles",
+ });
+ DBD::Oracle_8::dr::init_oci($drh) ;
+ $drh->STORE('ShowErrorStatement', 1);
+
+ if ($DBI::VERSION >= 1.37) {
+ DBD::Oracle_8::db->install_method("ora_lob_read");
+ DBD::Oracle_8::db->install_method("ora_lob_write");
+ DBD::Oracle_8::db->install_method("ora_lob_append");
+ DBD::Oracle_8::db->install_method("ora_lob_trim");
+ DBD::Oracle_8::db->install_method("ora_lob_length");
+ DBD::Oracle_8::db->install_method("ora_nls_parameters");
+ DBD::Oracle_8::db->install_method("ora_can_unicode");
+ }
+
+ $drh;
+ }
+
+
+ END {
+ # Used to silence 'Bad free() ...' warnings caused by bugs in Oracle's code
+ # being detected by Perl's malloc.
+ $ENV{PERL_BADFREE} = 0;
+ #undef $Win32::TieRegistry::Registry if $Win32::TieRegistry::Registry;
+ }
+
+ sub AUTOLOAD {
+ (my $constname = $AUTOLOAD) =~ s/.*:://;
+ my $val = constant($constname);
+ *$AUTOLOAD = sub { $val };
+ goto &$AUTOLOAD;
+ }
+
+}
+
+
+{ package DBD::Oracle_8::dr; # ====== DRIVER ======
+ use strict;
+
+ my %dbnames = (); # holds list of known databases (oratab + tnsnames)
+
+ sub load_dbnames {
+ my ($drh) = @_;
+ my $debug = $drh->debug;
+ my $oracle_home = DBD::Oracle_8::ora_env_var($ORACLE_ENV);
+ local *FH;
+ my $d;
+
+ if (($^O eq 'MSWin32') or ($^O =~ /cygwin/i)) {
+ # XXX experimental, will probably change
+ $drh->trace_msg("Trying to fetch ORACLE_8_HOME and ORACLE_8_SID from the registry.\n")
+ if $debug;
+ my $sid = DBD::Oracle_8::ora_env_var("ORACLE_8_SID");
+ $dbnames{$sid} = $oracle_home if $sid and $oracle_home;
+ $drh->trace_msg("Found $sid \@ $oracle_home.\n") if $debug && $sid;
+ }
+
+ # get list of 'local' database SIDs from oratab
+ foreach $d (qw(/etc /var/opt/oracle), DBD::Oracle_8::ora_env_var("TNS_8_ADMIN")) {
+ next unless defined $d;
+ next unless open(FH, "<$d/oratab");
+ $drh->trace_msg("Loading $d/oratab\n") if $debug;
+ my $ot;
+ while (defined($ot = <FH>)) {
+ next unless $ot =~ m/^\s*(\w+)\s*:\s*(.*?)\s*:/;
+ $dbnames{$1} = $2; # store ORACLE_HOME value
+ $drh->trace_msg("Found $1 \@ $2.\n") if $debug;
+ }
+ close FH;
+ last;
+ }
+
+ # get list of 'remote' database connection identifiers
+ my @tns_admin;
+ push @tns_admin, (
+ "$oracle_home/network/admin", # OCI 7 and 8.1
+ "$oracle_home/net80/admin", # OCI 8.0
+ ) if $oracle_home;
+ push @tns_admin, "/var/opt/oracle";
+ foreach $d ( DBD::Oracle_8::ora_env_var("TNS_8_ADMIN"), ".", @tns_admin ) {
+ next unless $d && open(FH, "<$d/tnsnames.ora");
+ $drh->trace_msg("Loading $d/tnsnames.ora\n") if $debug;
+ local *_;
+ while (<FH>) {
+ next unless m/^\s*([-\w\.]+)\s*=/;
+ my $name = $1;
+ $drh->trace_msg("Found $name. ".($dbnames{$name} ? "(oratab entry overridden)" : "")."\n")
+ if $debug;
+ $dbnames{$name} = 0; # exists but false (to distinguish from oratab)
+ }
+ close FH;
+ last;
+ }
+
+ $dbnames{0} = 1; # mark as loaded (even if empty)
+ }
+
+ sub data_sources {
+ my $drh = shift;
+ load_dbnames($drh) unless %dbnames;
+ my @names = sort keys %dbnames;
+ my @sources = map { $_ ? ("dbi:Oracle_8:$_") : () } @names;
+ return @sources;
+ }
+
+
+ sub connect {
+ my ($drh, $dbname, $user, $auth, $attr)= @_;
+
+ if ($dbname =~ /;/) {
+ my ($n,$v);
+ $dbname =~ s/^\s+//;
+ $dbname =~ s/\s+$//;
+ my @dbname = map {
+ ($n,$v) = split /\s*=\s*/, $_, -1;
+ Carp::carp("DSN component '$_' is not in 'name=value' format")
+ unless defined $v && defined $n;
+ (uc($n), $v)
+ } split /\s*;\s*/, $dbname;
+ my %dbname = ( PROTOCOL => 'tcp', @dbname );
+
+ # extract main attributes for connect_data portion
+ my @connect_data_attr = qw(SID INSTANCE_NAME SERVER SERVICE_NAME);
+ my %connect_data = map { ($_ => delete $dbname{$_}) }
+ grep { exists $dbname{$_} } @connect_data_attr;
+ my $connect_data = join "", map { "($_=$connect_data{$_})" } keys %connect_data;
+
+ return $drh->DBI::set_err(-1,
+ "Can't connect using this syntax without specifying a HOST and one of @connect_data_attr")
+ unless $dbname{HOST} and %connect_data;
+
+ my @addrs = map { "($_=$dbname{$_})" } keys %dbname;
+ my $addrs = join "", @addrs;
+ if ($dbname{PORT}) {
+ $addrs = "(ADDRESS=$addrs)";
+ }
+ else {
+ $addrs = "(ADDRESS_LIST=(ADDRESS=$addrs(PORT=1526))"
+ . "(ADDRESS=$addrs(PORT=1521)))";
+ }
+ $dbname = "(DESCRIPTION=$addrs(CONNECT_DATA=$connect_data))";
+ $drh->trace_msg("connect using '$dbname'");
+ }
+
+ # If the application is asking for specific database
+ # then we may have to mung the dbname
+
+ $dbname = $1 if !$dbname && $user && $user =~ s/\@(.*)//s;
+
+ $drh->trace_msg("$ORACLE_ENV environment variable not set\n")
+ if !$ENV{$ORACLE_ENV} and $^O ne "MSWin32";
+
+ # create a 'blank' dbh
+
+ $user = '' if not defined $user;
+ (my $user_only = $user) =~ s:/.*::;
+ my ($dbh, $dbh_inner) = DBI::_new_dbh($drh, {
+ 'Name' => $dbname,
+ # these two are just for backwards compatibility
+ 'USER' => uc $user_only, 'CURRENT_USER' => uc $user_only,
+ });
+
+ # Call Oracle OCI logon func in Oracle.xs file
+ # and populate internal handle data.
+ DBD::Oracle::db::_login($dbh, $dbname, $user, $auth, $attr)
+ or return undef;
+
+ if ($attr && $attr->{ora_module_name}) {
+ eval {
+ $dbh->do(q{BEGIN DBMS_APPLICATION_INFO.SET_MODULE(:1,NULL); END;},
+ undef, $attr->{ora_module_name});
+ };
+ }
+ unless (length $user_only) {
+ $user_only = $dbh->selectrow_array(q{
+ SELECT SYS_CONTEXT('userenv','session_user') FROM DUAL
+ });
+ $dbh_inner->{Username} = $user_only;
+ # these two are just for backwards compatibility
+ $dbh_inner->{USER} = $dbh_inner->{CURRENT_USER} = uc $user_only;
+ }
+
+ $dbh;
+ }
+
+}
+
+
+{ package DBD::Oracle_8::db; # ====== DATABASE ======
+ use strict;
+ use DBI qw(:sql_types);
+
+ sub prepare {
+ my($dbh, $statement, @attribs)= @_;
+
+ # create a 'blank' sth
+
+ my $sth = DBI::_new_sth($dbh, {
+ 'Statement' => $statement,
+ });
+
+ # Call Oracle OCI parse func in Oracle.xs file.
+ # and populate internal handle data.
+
+ DBD::Oracle_8::st::_prepare($sth, $statement, @attribs)
+ or return undef;
+
+ $sth;
+ }
+
+
+ sub ping {
+ my($dbh) = @_;
+ my $ok = 0;
+ eval {
+ local $SIG{__DIE__};
+ local $SIG{__WARN__};
+ # we know that Oracle 7 prepare does a describe so this will
+ # actually talk to the server and is this a valid and cheap test.
+ my $sth = $dbh->prepare("select SYSDATE from DUAL /* ping */");
+ # But Oracle 8+ doesn't talk to server unless we describe the query
+ $ok = $sth && $sth->FETCH('NUM_OF_FIELDS');
+ };
+ return ($@) ? 0 : $ok;
+ }
+
+
+ sub get_info {
+ my($dbh, $info_type) = @_;
+ require DBD::Oracle_8::GetInfo;
+ my $v = $DBD::Oracle_8::GetInfo::info{int($info_type)};
+ $v = $v->($dbh) if ref $v eq 'CODE';
+ return $v;
+ }
+
+
+ sub table_info {
+ my($dbh, $CatVal, $SchVal, $TblVal, $TypVal) = @_;
+ # XXX add knowledge of temp tables, etc
+ # SQL/CLI (ISO/IEC JTC 1/SC 32 N 0595), 6.63 Tables
+ if (ref $CatVal eq 'HASH') {
+ ($CatVal, $SchVal, $TblVal, $TypVal) =
+ @$CatVal{'TABLE_CAT','TABLE_SCHEM','TABLE_NAME','TABLE_TYPE'};
+ }
+ my @Where = ();
+ my $Sql;
+ if ( defined $CatVal && $CatVal eq '%' && (!defined $SchVal || $SchVal eq '') && (!defined $TblVal || $TblVal eq '')) { # Rule 19a
+ $Sql = <<'SQL';
+SELECT NULL TABLE_CAT
+ , NULL TABLE_SCHEM
+ , NULL TABLE_NAME
+ , NULL TABLE_TYPE
+ , NULL REMARKS
+ FROM DUAL
+SQL
+ }
+ elsif ( defined $SchVal && $SchVal eq '%' && (!defined $CatVal || $CatVal eq '') && (!defined $TblVal || $TblVal eq '')) { # Rule 19b
+ $Sql = <<'SQL';
+SELECT NULL TABLE_CAT
+ , s TABLE_SCHEM
+ , NULL TABLE_NAME
+ , NULL TABLE_TYPE
+ , NULL REMARKS
+ FROM
+(
+ SELECT USERNAME s FROM ALL_USERS
+ UNION
+ SELECT 'PUBLIC' s FROM DUAL
+)
+ ORDER BY TABLE_SCHEM
+SQL
+ }
+ elsif ( defined $TypVal && $TypVal eq '%' && (!defined $CatVal || $CatVal eq '') && (!defined $SchVal || $SchVal eq '') && (!defined $TblVal || $TblVal eq '')) { # Rule 19c
+ $Sql = <<'SQL';
+SELECT NULL TABLE_CAT
+ , NULL TABLE_SCHEM
+ , NULL TABLE_NAME
+ , t.tt TABLE_TYPE
+ , NULL REMARKS
+ FROM
+(
+ SELECT 'TABLE' tt FROM DUAL
+ UNION
+ SELECT 'VIEW' tt FROM DUAL
+ UNION
+ SELECT 'SYNONYM' tt FROM DUAL
+ UNION
+ SELECT 'SEQUENCE' tt FROM DUAL
+) t
+ ORDER BY TABLE_TYPE
+SQL
+ }
+ else {
+ $Sql = <<'SQL';
+SELECT *
+ FROM
+(
+ SELECT /*+ RULE*/
+ NULL TABLE_CAT
+ , t.OWNER TABLE_SCHEM
+ , t.TABLE_NAME TABLE_NAME
+ , decode(t.OWNER
+ , 'SYS' , 'SYSTEM '
+ , 'SYSTEM' , 'SYSTEM '
+ , '' ) || t.TABLE_TYPE TABLE_TYPE
+ , c.COMMENTS REMARKS
+ FROM ALL_TAB_COMMENTS c
+ , ALL_CATALOG t
+ WHERE c.OWNER (+) = t.OWNER
+ AND c.TABLE_NAME (+) = t.TABLE_NAME
+ AND c.TABLE_TYPE (+) = t.TABLE_TYPE
+)
+SQL
+ if ( defined $SchVal ) {
+ push @Where, "TABLE_SCHEM LIKE '$SchVal' ESCAPE '\\'";
+ }
+ if ( defined $TblVal ) {
+ push @Where, "TABLE_NAME LIKE '$TblVal' ESCAPE '\\'";
+ }
+ if ( defined $TypVal ) {
+ my $table_type_list;
+ $TypVal =~ s/^\s+//;
+ $TypVal =~ s/\s+$//;
+ my @ttype_list = split (/\s*,\s*/, $TypVal);
+ foreach my $table_type (@ttype_list) {
+ if ($table_type !~ /^'.*'$/) {
+ $table_type = "'" . $table_type . "'";
+ }
+ $table_type_list = join(", ", @ttype_list);
+ }
+ push @Where, "TABLE_TYPE IN ($table_type_list)";
+ }
+ $Sql .= ' WHERE ' . join("\n AND ", @Where ) . "\n" if @Where;
+ $Sql .= " ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME\n";
+ }
+ my $sth = $dbh->prepare($Sql) or return undef;
+ $sth->execute or return undef;
+ $sth;
+}
+
+
+ sub primary_key_info {
+ my($dbh, $catalog, $schema, $table) = @_;
+ if (ref $catalog eq 'HASH') {
+ ($schema, $table) = @$catalog{'TABLE_SCHEM','TABLE_NAME'};
+ $catalog = undef;
+ }
+ my $Sql = <<'SQL';
+SELECT *
+ FROM
+(
+ SELECT /*+ RULE*/
+ NULL TABLE_CAT
+ , c.OWNER TABLE_SCHEM
+ , c.TABLE_NAME TABLE_NAME
+ , c.COLUMN_NAME COLUMN_NAME
+ , c.POSITION KEY_SEQ
+ , c.CONSTRAINT_NAME PK_NAME
+ FROM ALL_CONSTRAINTS p
+ , ALL_CONS_COLUMNS c
+ WHERE p.OWNER = c.OWNER
+ AND p.TABLE_NAME = c.TABLE_NAME
+ AND p.CONSTRAINT_NAME = c.CONSTRAINT_NAME
+ AND p.CONSTRAINT_TYPE = 'P'
+)
+ WHERE TABLE_SCHEM = ?
+ AND TABLE_NAME = ?
+ ORDER BY TABLE_SCHEM, TABLE_NAME, KEY_SEQ
+SQL
+#warn "@_\n$Sql ($schema, $table)";
+ my $sth = $dbh->prepare($Sql) or return undef;
+ $sth->execute($schema, $table) or return undef;
+ $sth;
+}
+
+ sub foreign_key_info {
+ my $dbh = shift;
+ my $attr = ( ref $_[0] eq 'HASH') ? $_[0] : {
+ 'UK_TABLE_SCHEM' => $_[1],'UK_TABLE_NAME ' => $_[2]
+ ,'FK_TABLE_SCHEM' => $_[4],'FK_TABLE_NAME ' => $_[5] };
+ my $Sql = <<'SQL'; # XXX: DEFERABILITY
+SELECT *
+ FROM
+(
+ SELECT /*+ RULE*/
+ to_char( NULL ) UK_TABLE_CAT
+ , uk.OWNER UK_TABLE_SCHEM
+ , uk.TABLE_NAME UK_TABLE_NAME
+ , uc.COLUMN_NAME UK_COLUMN_NAME
+ , to_char( NULL ) FK_TABLE_CAT
+ , fk.OWNER FK_TABLE_SCHEM
+ , fk.TABLE_NAME FK_TABLE_NAME
+ , fc.COLUMN_NAME FK_COLUMN_NAME
+ , uc.POSITION ORDINAL_POSITION
+ , 3 UPDATE_RULE
+ , decode( fk.DELETE_RULE, 'CASCADE', 0, 'RESTRICT', 1, 'SET NULL', 2, 'NO ACTION', 3, 'SET DEFAULT', 4 )
+ DELETE_RULE
+ , fk.CONSTRAINT_NAME FK_NAME
+ , uk.CONSTRAINT_NAME UK_NAME
+ , to_char( NULL ) DEFERABILITY
+ , decode( uk.CONSTRAINT_TYPE, 'P', 'PRIMARY', 'U', 'UNIQUE')
+ UNIQUE_OR_PRIMARY
+ FROM ALL_CONSTRAINTS uk
+ , ALL_CONS_COLUMNS uc
+ , ALL_CONSTRAINTS fk
+ , ALL_CONS_COLUMNS fc
+ WHERE uk.OWNER = uc.OWNER
+ AND uk.CONSTRAINT_NAME = uc.CONSTRAINT_NAME
+ AND fk.OWNER = fc.OWNER
+ AND fk.CONSTRAINT_NAME = fc.CONSTRAINT_NAME
+ AND uk.CONSTRAINT_TYPE IN ('P','U')
+ AND fk.CONSTRAINT_TYPE = 'R'
+ AND uk.CONSTRAINT_NAME = fk.R_CONSTRAINT_NAME
+ AND uk.OWNER = fk.R_OWNER
+ AND uc.POSITION = fc.POSITION
+)
+ WHERE 1 = 1
+SQL
+ my @BindVals = ();
+ while ( my ( $k, $v ) = each %$attr ) {
+ if ( $v ) {
+ $Sql .= " AND $k = ?\n";
+ push @BindVals, $v;
+ }
+ }
+ $Sql .= " ORDER BY UK_TABLE_SCHEM, UK_TABLE_NAME, FK_TABLE_SCHEM, FK_TABLE_NAME, ORDINAL_POSITION\n";
+ my $sth = $dbh->prepare( $Sql ) or return undef;
+ $sth->execute( @BindVals ) or return undef;
+ $sth;
+ }
+
+
+ sub column_info {
+ my $dbh = shift;
+ my $attr = ( ref $_[0] eq 'HASH') ? $_[0] : {
+ 'TABLE_SCHEM' => $_[1],'TABLE_NAME' => $_[2],'COLUMN_NAME' => $_[3] };
+ my($typecase,$typecaseend) = ('','');
+ if (ora_server_version($dbh)->[0] >= 8) {
+ $typecase = <<'SQL';
+CASE WHEN tc.DATA_TYPE LIKE 'TIMESTAMP% WITH% TIME ZONE' THEN 95
+ WHEN tc.DATA_TYPE LIKE 'TIMESTAMP%' THEN 93
+ WHEN tc.DATA_TYPE LIKE 'INTERVAL DAY% TO SECOND%' THEN 110
+ WHEN tc.DATA_TYPE LIKE 'INTERVAL YEAR% TO MONTH' THEN 107
+ELSE
+SQL
+ $typecaseend = 'END';
+ }
+ my $Sql = <<"SQL";
+SELECT *
+ FROM
+(
+ SELECT /*+ RULE*/
+ to_char( NULL ) TABLE_CAT
+ , tc.OWNER TABLE_SCHEM
+ , tc.TABLE_NAME TABLE_NAME
+ , tc.COLUMN_NAME COLUMN_NAME
+ , $typecase decode( tc.DATA_TYPE
+ , 'MLSLABEL' , -9106
+ , 'ROWID' , -9104
+ , 'UROWID' , -9104
+ , 'BFILE' , -4 -- 31?
+ , 'LONG RAW' , -4
+ , 'RAW' , -3
+ , 'LONG' , -1
+ , 'UNDEFINED', 0
+ , 'CHAR' , 1
+ , 'NCHAR' , 1
+ , 'NUMBER' , decode( tc.DATA_SCALE, NULL, 8, 3 )
+ , 'FLOAT' , 8
+ , 'VARCHAR2' , 12
+ , 'NVARCHAR2', 12
+ , 'BLOB' , 30
+ , 'CLOB' , 40
+ , 'NCLOB' , 40
+ , 'DATE' , 93
+ , NULL
+ ) $typecaseend DATA_TYPE -- ...
+ , tc.DATA_TYPE TYPE_NAME -- std.?
+ , decode( tc.DATA_TYPE
+ , 'LONG RAW' , 2147483647
+ , 'LONG' , 2147483647
+ , 'CLOB' , 2147483647
+ , 'NCLOB' , 2147483647
+ , 'BLOB' , 2147483647
+ , 'BFILE' , 2147483647
+ , 'NUMBER' , decode( tc.DATA_SCALE
+ , NULL, 126
+ , nvl( tc.DATA_PRECISION, 38 )
+ )
+ , 'FLOAT' , tc.DATA_PRECISION
+ , 'DATE' , 19
+ , tc.DATA_LENGTH
+ ) COLUMN_SIZE
+ , decode( tc.DATA_TYPE
+ , 'LONG RAW' , 2147483647
+ , 'LONG' , 2147483647
+ , 'CLOB' , 2147483647
+ , 'NCLOB' , 2147483647
+ , 'BLOB' , 2147483647
+ , 'BFILE' , 2147483647
+ , 'NUMBER' , nvl( tc.DATA_PRECISION, 38 ) + 2
+ , 'FLOAT' , 8 -- ?
+ , 'DATE' , 16
+ , tc.DATA_LENGTH
+ ) BUFFER_LENGTH
+ , decode( tc.DATA_TYPE
+ , 'DATE' , 0
+ , tc.DATA_SCALE
+ ) DECIMAL_DIGITS -- ...
+ , decode( tc.DATA_TYPE
+ , 'FLOAT' , 2
+ , 'NUMBER' , decode( tc.DATA_SCALE, NULL, 2, 10 )
+ , NULL
+ ) NUM_PREC_RADIX
+ , decode( tc.NULLABLE
+ , 'Y' , 1
+ , 'N' , 0
+ , NULL
+ ) NULLABLE
+ , cc.COMMENTS REMARKS
+ , tc.DATA_DEFAULT COLUMN_DEF -- Column is LONG!
+ , decode( tc.DATA_TYPE
+ , 'MLSLABEL' , -9106
+ , 'ROWID' , -9104
+ , 'UROWID' , -9104
+ , 'BFILE' , -4 -- 31?
+ , 'LONG RAW' , -4
+ , 'RAW' , -3
+ , 'LONG' , -1
+ , 'UNDEFINED', 0
+ , 'CHAR' , 1
+ , 'NCHAR' , 1
+ , 'NUMBER' , decode( tc.DATA_SCALE, NULL, 8, 3 )
+ , 'FLOAT' , 8
+ , 'VARCHAR2' , 12
+ , 'NVARCHAR2', 12
+ , 'BLOB' , 30
+ , 'CLOB' , 40
+ , 'NCLOB' , 40
+ , 'DATE' , 9 -- not 93!
+ , NULL
+ ) SQL_DATA_TYPE -- ...
+ , decode( tc.DATA_TYPE
+ , 'DATE' , 3
+ , NULL
+ ) SQL_DATETIME_SUB -- ...
+ , to_number( NULL ) CHAR_OCTET_LENGTH -- TODO
+ , tc.COLUMN_ID ORDINAL_POSITION
+ , decode( tc.NULLABLE
+ , 'Y' , 'YES'
+ , 'N' , 'NO'
+ , NULL
+ ) IS_NULLABLE
+ FROM ALL_TAB_COLUMNS tc
+ , ALL_COL_COMMENTS cc
+ WHERE tc.OWNER = cc.OWNER
+ AND tc.TABLE_NAME = cc.TABLE_NAME
+ AND tc.COLUMN_NAME = cc.COLUMN_NAME
+)
+ WHERE 1 = 1
+SQL
+ my @BindVals = ();
+ while ( my ( $k, $v ) = each %$attr ) {
+ if ( $v ) {
+ $Sql .= " AND $k LIKE ? ESCAPE '\\'\n";
+ push @BindVals, $v;
+ }
+ }
+ $Sql .= " ORDER BY TABLE_SCHEM, TABLE_NAME, ORDINAL_POSITION\n";
+ my $sth = $dbh->prepare( $Sql ) or return undef;
+ $sth->execute( @BindVals ) or return undef;
+ $sth;
+ }
+
+ sub type_info_all {
+ my ($dbh) = @_;
+ my $version = ( ora_server_version($dbh)->[0] < DBD::Oracle_8::ORA_OCI() )
+ ? ora_server_version($dbh)->[0] : DBD::Oracle_8::ORA_OCI();
+ my $vc2len = ( $version < 8 ) ? "2000" : "4000";
+
+ my $type_info_all = [
+ {
+ TYPE_NAME => 0,
+ DATA_TYPE => 1,
+ COLUMN_SIZE => 2,
+ LITERAL_PREFIX => 3,
+ LITERAL_SUFFIX => 4,
+ CREATE_PARAMS => 5,
+ NULLABLE => 6,
+ CASE_SENSITIVE => 7,
+ SEARCHABLE => 8,
+ UNSIGNED_ATTRIBUTE => 9,
+ FIXED_PREC_SCALE => 10,
+ AUTO_UNIQUE_VALUE => 11,
+ LOCAL_TYPE_NAME => 12,
+ MINIMUM_SCALE => 13,
+ MAXIMUM_SCALE => 14,
+ SQL_DATA_TYPE => 15,
+ SQL_DATETIME_SUB => 16,
+ NUM_PREC_RADIX => 17,
+ INTERVAL_PRECISION => 18,
+ },
+ [ "LONG RAW", SQL_LONGVARBINARY, 2147483647,"'", "'",
+ undef, 1,0,0,undef,0,undef,
+ "LONG RAW", undef,undef,SQL_LONGVARBINARY,undef,undef,undef, ],
+ [ "RAW", SQL_VARBINARY, 2000, "'", "'",
+ "max length", 1,0,3,undef,0,undef,
+ "RAW", undef,undef,SQL_VARBINARY, undef,undef,undef, ],
+ [ "LONG", SQL_LONGVARCHAR, 2147483647,"'", "'",
+ undef, 1,1,0,undef,0,undef,
+ "LONG", undef,undef,SQL_LONGVARCHAR, undef,undef,undef, ],
+ [ "CHAR", SQL_CHAR, 2000, "'", "'",
+ "max length", 1,1,3,undef,0,0,
+ "CHAR", undef,undef,SQL_CHAR, undef,undef,undef, ],
+ [ "DECIMAL", SQL_DECIMAL, 38, undef,undef,
+ "precision,scale",1,0,3,0, 0,0,
+ "DECIMAL", 0, 38, SQL_DECIMAL, undef,10, undef, ],
+ [ "DOUBLE PRECISION",SQL_DOUBLE, 15, undef,undef,
+ undef, 1,0,3,0, 0,0,
+ "DOUBLE PRECISION",undef,undef,SQL_DOUBLE, undef,10, undef, ],
+ [ "DATE", SQL_TYPE_TIMESTAMP,19, "'", "'",
+ undef, 1,0,3,undef,0,0,
+ "DATE", 0, 0, SQL_DATE, 3, undef,undef, ],
+ [ "VARCHAR2", SQL_VARCHAR, $vc2len, "'", "'",
+ "max length", 1,1,3,undef,0,0,
+ "VARCHAR2", undef,undef,SQL_VARCHAR, undef,undef,undef, ],
+ ];
+ push @$type_info_all,
+ [ "BLOB", SQL_LONGVARBINARY, 2147483647,"'", "'",
+ undef, 1,1,0,undef,0,undef,
+ "BLOB", undef,undef,SQL_LONGVARBINARY,undef,undef,undef, ],
+ [ "BFILE", SQL_LONGVARBINARY, 2147483647,"'", "'",
+ undef, 1,1,0,undef,0,undef,
+ "BFILE", undef,undef,SQL_LONGVARBINARY,undef,undef,undef, ],
+ [ "CLOB", SQL_LONGVARCHAR, 2147483647,"'", "'",
+ undef, 1,1,0,undef,0,undef,
+ "CLOB", undef,undef,SQL_LONGVARCHAR, undef,undef,undef, ],
+ if $version >= 8;
+ return $type_info_all;
+ }
+
+ sub plsql_errstr {
+ # original version thanks to Bob Menteer
+ my $sth = shift->prepare_cached(q{
+ SELECT name, type, line, position, text
+ FROM user_errors ORDER BY name, type, sequence
+ }) or return undef;
+ $sth->execute or return undef;
+ my ( @msg, $oname, $otype, $name, $type, $line, $pos, $text );
+ $oname = $otype = 0;
+ while ( ( $name, $type, $line, $pos, $text ) = $sth->fetchrow_array ) {
+ if ( $oname ne $name || $otype ne $type ) {
+ push @msg, "Errors for $type $name:";
+ $oname = $name;
+ $otype = $type;
+ }
+ push @msg, "$line.$pos: $text";
+ }
+ return join( "\n", @msg );
+ }
+
+ #
+ # note, dbms_output must be enabled prior to usage
+ #
+ sub dbms_output_enable {
+ my ($dbh, $buffersize) = @_;
+ $buffersize ||= 20000; # use oracle 7.x default
+ $dbh->do("begin dbms_output.enable(:1); end;", undef, $buffersize);
+ }
+
+ sub dbms_output_get {
+ my $dbh = shift;
+ my $sth = $dbh->prepare_cached("begin dbms_output.get_line(:l, :s); end;")
+ or return;
+ my ($line, $status, @lines);
+ # line can be greater that 255 (e.g. 7 byte date is expanded on output)
+ $sth->bind_param_inout(':l', \$line, 400, { ora_type => 1 });
+ $sth->bind_param_inout(':s', \$status, 20, { ora_type => 1 });
+ if (!wantarray) {
+ $sth->execute or return undef;
+ return $line if $status eq '0';
+ return undef;
+ }
+ push @lines, $line while($sth->execute && $status eq '0');
+ return @lines;
+ }
+
+ sub dbms_output_put {
+ my $dbh = shift;
+ my $sth = $dbh->prepare_cached("begin dbms_output.put_line(:1); end;")
+ or return;
+ my $line;
+ foreach $line (@_) {
+ $sth->execute($line) or return;
+ }
+ return 1;
+ }
+
+
+ sub dbms_msgpipe_get {
+ my $dbh = shift;
+ my $sth = $dbh->prepare_cached(q{
+ begin dbms_msgpipe.get_request(:returnpipe, :proc, :param); end;
+ }) or return;
+ my $msg = ['','',''];
+ $sth->bind_param_inout(":returnpipe", \$msg->[0], 30);
+ $sth->bind_param_inout(":proc", \$msg->[1], 30);
+ $sth->bind_param_inout(":param", \$msg->[2], 4000);
+ $sth->execute or return undef;
+ return $msg;
+ }
+
+ sub dbms_msgpipe_ack {
+ my $dbh = shift;
+ my $msg = shift;
+ my $sth = $dbh->prepare_cached(q{
+ begin dbms_msgpipe.acknowledge(:returnpipe, :errormsg, :param); end;
+ }) or return;
+ $sth->bind_param_inout(":returnpipe", \$msg->[0], 30);
+ $sth->bind_param_inout(":proc", \$msg->[1], 30);
+ $sth->bind_param_inout(":param", \$msg->[2], 4000);
+ $sth->execute or return undef;
+ return 1;
+ }
+
+ sub ora_server_version {
+ my $dbh = shift;
+ return $dbh->{ora_server_version} if defined $dbh->{ora_server_version};
+ $dbh->{ora_server_version} =
+ [ split /\./, $dbh->selectrow_array(<<'SQL', undef, 'Oracle%', 'Personal Oracle%') .''];
+SELECT version
+ FROM product_component_version
+ WHERE product LIKE ? or product LIKE ?
+SQL
+ }
+
+ sub ora_nls_parameters {
+ my $dbh = shift;
+ my $refresh = shift;
+
+ if ($refresh || !$dbh->{ora_nls_parameters}) {
+ my $nls_parameters = $dbh->selectall_arrayref(q{
+ SELECT parameter, value FROM v$nls_parameters
+ }) or return;
+ $dbh->{ora_nls_parameters} = { map { $_->[0] => $_->[1] } @$nls_parameters };
+ }
+
+ # return copy of params to protect against accidental editing
+ my %nls = %{$dbh->{ora_nls_parameters}};
+ return \%nls;
+ }
+
+ sub ora_can_unicode {
+ my $dbh = shift;
+ my $refresh = shift;
+ # 0 = No Unicode support.
+ # 1 = National character set is Unicode-based.
+ # 2 = Database character set is Unicode-based.
+ # 3 = Both character sets are Unicode-based.
+
+ return $dbh->{ora_can_unicode}
+ if defined $dbh->{ora_can_unicode} && !$refresh;
+
+ my $nls = $dbh->ora_nls_parameters($refresh);
+
+ $dbh->{ora_can_unicode} = 0;
+ $dbh->{ora_can_unicode} += 1 if $nls->{NLS_NCHAR_CHARACTERSET} =~ /UTF/;
+ $dbh->{ora_can_unicode} += 2 if $nls->{NLS_CHARACTERSET} =~ /UTF/;
+
+ return $dbh->{ora_can_unicode};
+ }
+
+} # end of package DBD::Oracle::db
+
+
+{ package DBD::Oracle::st; # ====== STATEMENT ======
+
+ # all done in XS
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+DBD::Oracle - Oracle database driver for the DBI module
+
+=head1 SYNOPSIS
+
+ use DBI;
+
+ $dbh = DBI->connect("dbi:Oracle:$dbname", $user, $passwd);
+
+ $dbh = DBI->connect("dbi:Oracle:host=$host;sid=$sid", $user, $passwd);
+
+ # See the DBI module documentation for full details
+
+ # for some advanced uses you may need Oracle type values:
+ use DBD::Oracle qw(:ora_types);
+
+
+=head1 DESCRIPTION
+
+DBD::Oracle is a Perl module which works with the DBI module to provide
+access to Oracle databases.
+
+=head1 CONNECTING TO ORACLE
+
+This is a topic which often causes problems. Mainly due to Oracle's many
+and sometimes complex ways of specifying and connecting to databases.
+(James Taylor and Lane Sharman have contributed much of the text in
+this section.)
+
+=head2 Connecting without environment variables or tnsname.ora file
+
+If you use the C<host=$host;sid=$sid> style syntax, for example:
+
+ $dbh = DBI->connect("dbi:Oracle:host=myhost.com;sid=ORCL", $user, $passwd);
+
+then DBD::Oracle will construct a full connection descriptor string
+for you and Oracle will not need to consult the tnsname.ora file.
+
+If a C<port> number is not specified then the descriptor will try both
+1526 and 1521 in that order (e.g., new then old). You can check which
+port(s) are in use by typing "$ORACLE_HOME/bin/lsnrctl stat" on the server.
+
+
+=head2 Oracle Environment Variables
+
+Oracle typically uses two environment variables to specify default
+connections: ORACLE_SID and TWO_TASK.
+
+ORACLE_SID is really unnecessary to set since TWO_TASK provides the
+same functionality in addition to allowing remote connections.
+
+ % setenv TWO_TASK T:hostname:ORACLE_SID # for csh shell
+ $ TWO_TASK=T:hostname:ORACLE_SID export TWO_TASK # for sh shell
+
+ % sqlplus username/password
+
+Note that if you have *both* local and remote databases, and you
+have ORACLE_SID *and* TWO_TASK set, and you don't specify a fully
+qualified connect string on the command line, TWO_TASK takes precedence
+over ORACLE_SID (i.e. you get connected to remote system).
+
+ TWO_TASK=P:sid
+
+will use the pipe driver for local connections using SQL*Net v1.
+
+ TWO_TASK=T:machine:sid
+
+will use TCP/IP (or D for DECNET, etc.) for remote SQL*Net v1 connection.
+
+ TWO_TASK=dbname
+
+will use the info stored in the SQL*Net v2 F<tnsnames.ora>
+configuration file for local or remote connections.
+
+The ORACLE_HOME environment variable should be set correctly.
+In general, the value used should match the version of Oracle that
+was used to build DBD::Oracle. If using dynamic linking then
+ORACLE_HOME should match the version of Oracle that will be used
+to load in the Oracle client libraries (via LD_LIBRARY_PATH, ldconfig,
+or similar on Unix).
+
+ORACLE_HOME can be left unset if you aren't using any of Oracle's
+executables, but it is I<not> recommended and error messages may not display.
+It should be set to the ORACLE_HOME directory of the version of Oracle
+that DBD::Oracle was compiled with.
+
+Discouraging the use of ORACLE_SID makes it easier on the users to see
+what is going on. (It's unfortunate that TWO_TASK couldn't be renamed,
+since it makes no sense to the end user, and doesn't have the ORACLE prefix).
+
+=head2 Connection Examples Using DBD::Oracle
+
+First, how to connect to a local database I<without> using a Listener:
+
+ $dbh = DBI->connect('dbi:Oracle:SID','scott', 'tiger');
+
+you can also leave the SID empty:
+
+ $dbh = DBI->connect('dbi:Oracle:','scott', 'tiger');
+
+in which case Oracle client code will use the ORACLE_SID environment
+variable (if TWO_TASK env var isn't defined).
+
+Below are various ways of connecting to an oracle database using
+SQL*Net 1.x and SQL*Net 2.x. "Machine" is the computer the database is
+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+.
+
+ BEGIN {
+ $ENV{ORACLE_HOME} = '/home/oracle/product/7.x.x';
+ $ENV{TWO_TASK} = 'DB';
+ }
+ $dbh = DBI->connect('dbi:Oracle:','scott', 'tiger');
+ # - or -
+ $dbh = DBI->connect('dbi:Oracle:','scott/tiger');
+
+Refer to your Oracle documentatiion for valid values of TWO_TASK.
+
+Here are some variations (not setting TWO_TASK) in order of preference:
+
+ $dbh = DBI->connect('dbi:Oracle:DB','username','password')
+
+ $dbh = DBI->connect('dbi:Oracle:DB','username/password','')
+
+ $dbh = DBI->connect('dbi:Oracle:','username@DB','password')
+
+ $dbh = DBI->connect('dbi:Oracle:host=foobar;sid=ORCL;port=1521', 'scott/tiger', '')
+
+ $dbh = DBI->connect('dbi:Oracle:', q{scott/tiger@(DESCRIPTION=
+ (ADDRESS=(PROTOCOL=TCP)(HOST= foobar)(PORT=1521))
+ (CONNECT_DATA=(SID=ORCL)))}, "")
+
+If you are having problems with login taking a long time (>10 secs say)
+then you might have tripped up on an Oracle bug. You can try using one
+of the ...@DB variants as a workaround. E.g.,
+
+ $dbh = DBI->connect('','username/password@DB','');
+
+On the other hand, that may cause you to trip up on another Oracle bug
+that causes alternating connection attempts to fail! (In reality only
+a small proportion of people experience these problems.)
+
+
+To connect to a local database with a user which has been set-up to
+authenticate via the OS ("ALTER USER username IDENTIFIED EXTERNALLY"):
+
+ $dbh = DBI->connect('dbi:Oracle:','/','');
+
+Note the lack of a connection name (use the ORACLE_SID environment
+variable). If an explicit SID is used you'll probably get an ORA-01004 error.
+
+That only works for local databases. (Authentication to remote Oracle
+databases using your unix login name without a password and is possible
+but it's not secure and not recommended so not documented here. If you
+can't find the information elsewhere then you probably shouldn't be
+trying to do it.)
+
+
+=head2 Optimizing Oracle's listener
+
+[By Lane Sharman <[email protected]>] I spent a LOT of time optimizing
+listener.ora and I am including it here for anyone to benefit from. My
+connections over tnslistener on the same humble Netra 1 take an average
+of 10-20 milli seconds according to tnsping. If anyone knows how to
+make it better, please let me know!
+
+ LISTENER =
+ (ADDRESS_LIST =
+ (ADDRESS =
+ (PROTOCOL = TCP)
+ (Host = aa.bbb.cc.d)
+ (Port = 1521)
+ (QUEUESIZE=10)
+ )
+ )
+
+ STARTUP_WAIT_TIME_LISTENER = 0
+ CONNECT_TIMEOUT_LISTENER = 10
+ TRACE_LEVEL_LISTENER = OFF
+ SID_LIST_LISTENER =
+ (SID_LIST =
+ (SID_DESC =
+ (SID_NAME = xxxx)
+ (ORACLE_HOME = /xxx/local/oracle7-3)
+ (PRESPAWN_MAX = 40)
+ (PRESPAWN_LIST=
+ (PRESPAWN_DESC=(PROTOCOL=tcp) (POOL_SIZE=40) (TIMEOUT=120))
+ )
+ )
+ )
+
+1) When the application is co-located on the host AND there is no need for
+outside SQLNet connectivity, stop the listener. You do not need it. Get
+your application/cgi/whatever working using pipes and shared memory. I am
+convinced that this is one of the connection bugs (sockets over the same
+machine). Note the $ENV{ORAPIPES} env var. The essential code to do
+this at the end of this section.
+
+2) Be careful in how you implement the multi-threaded server. Currently I
+am not using it in the initxxxx.ora file but will be doing some more testing.
+
+3) Be sure to create user rollback segments and use them; do not use the
+system rollback segments; however, you must also create a small rollback
+space for the system as well.
+
+5) Use large tuning settings and get lots of RAM. Check out all the
+parameters you can set in v$parameters because there are quite a few not
+documented you may to set in your initxxx.ora file.
+
+6) Use svrmgrl to control oracle from the command line. Write lots of small
+SQL scripts to get at V$ info.
+
+ use DBI;
+ # Environmental variables used by Oracle
+ $ENV{ORACLE_SID} = "xxx";
+ $ENV{ORACLE_HOME} = "/opt/oracle7";
+ $ENV{EPC_DISABLED} = "TRUE";
+ $ENV{ORAPIPES} = "V2";
+ my $dbname = "xxx";
+ my $dbuser = "xxx";
+ my $dbpass = "xxx";
+ my $dbh = DBI->connect("dbi:Oracle:$dbname", $dbuser, $dbpass)
+ || die "Unale to connect to $dbname: $DBI::errstr\n";
+
+=head2 Oracle utilities
+
+If you are still having problems connecting then the Oracle adapters
+utility may offer some help. Run these two commands:
+
+ $ORACLE_HOME/bin/adapters
+ $ORACLE_HOME/bin/adapters $ORACLE_HOME/bin/sqlplus
+
+and check the output. The "Protocol Adapters" section should be the
+same. It should include at least "IPC Protocol Adapter" and "TCP/IP
+Protocol Adapter".
+
+If it generates any errors which look relevant then please talk to yor
+Oracle technical support (and not the dbi-users mailing list). Thanks.
+Thanks to Mark Dedlow for this information.
+
+
+=head2 Constants
+
+=item :ora_session_modes
+
+ ORA_SYSDBA ORA_SYSOPER
+
+=item :ora_types
+
+ ORA_VARCHAR2 ORA_STRING ORA_NUMBER ORA_LONG ORA_ROWID ORA_DATE
+ ORA_RAW ORA_LONGRAW ORA_CHAR ORA_CHARZ ORA_MLSLABEL ORA_NTY
+ ORA_CLOB ORA_BLOB ORA_RSET
+
+=item SQLCS_IMPLICIT
+
+=item SQLCS_NCHAR
+
+SQLCS_IMPLICIT and SQLCS_NCHAR are I<character set form> values.
+See notes about Unicode elsewhere in this document.
+
+=item ORA_OCI
+
+Oracle doesn't provide a formal API for determining the exact version
+number of the OCI client library used, so DBD::Oracle has to go digging
+(and sometimes has to more or less guess). The ORA_OCI constant
+holds the result of that process.
+
+In string context ORA_OCI returns the full "A.B.C.D" version string.
+
+In numeric context ORA_OCI returns the major.minor version number
+(8.1, 9.2, 10.0 etc). But note that version numbers are not actually
+floating point and so if Oracle ever makes a release that has a two
+digit minor version, such as C<9.10> it will have a lower numeric
+value than the preceeding C<9.9> release. So use with care.
+
+The contents and format of ORA_OCI are subject to change (it may,
+for example, become a I<version object> in later releases).
+I recommend that you avoid checking for exact values.
+
+
+=head2 Connect Attributes
+
+=over 4
+
+=item ora_session_mode
+
+The ora_session_mode attribute can be used to connect with SYSDBA
+authorization and SYSOPER authorization.
+The ORA_SYSDBA and ORA_SYSOPER constants can be imported using
+
+ use DBD::Oracle qw(:ora_session_modes);
+
+This is one case where setting ORACLE_SID may be useful since
+connecting as SYSDBA or SYSOPER via SQL*Net is frequently disabled
+for security reasons.
+
+Example:
+
+ $dsn = "dbi:Oracle:"; # no dbname here
+ $ENV{ORACLE_SID} = "orcl"; # set ORACLE_SID as needed
+ delete $ENV{TWO_TASK}; # make sure TWO_TASK isn't set
+
+ $dbh = DBI->connect($dsn, "", "", { ora_session_mode => ORA_SYSDBA });
+
+It has been reported that this only works if $dsn does not contain a SID
+so that Oracle then uses the value of the ORACLE_SID (not TWO_TASK)
+environment variable to connect to a local instance. Also the username
+and password should be empty, and the user executing the script needs
+to be part of the dba group or osdba group.
+
+=item ora_oratab_orahome
+
+Passing a true value for the ora_oratab_orahome attribute will make
+DBD::Oracle change $ENV{ORACLE_HOME} to make the Oracle home directory
+specified in the C</etc/oratab> file I<if> the database to connect to
+is specified as a SID that exists in the oratab file, and DBD::Oracle was
+built to use the Oracle 7 OCI API (not Oracle 8+).
+
+=item ora_module_name
+
+After connecting to the database the value of this attribute is passed
+to the SET_MODULE() function in the C<DBMS_APPLICATION_INFO> PL/SQL
+package. This can be used to identify the application to the DBA for
+monitoring and performance tuning purposes. For example:
+
+ DBI->connect($dsn, $user, $passwd, { ora_module_name => $0 });
+
+=item ora_dbh_share
+
+Needs at least Perl 5.8.0 compiled with ithreads. Allows to share database
+connections between threads. The first connect will make the connection,
+all following calls to connect with the same ora_dbh_share attribute
+will use the same database connection. The value must be a reference
+to a already shared scalar which is initialized to an empty string.
+
+ our $orashr : shared = '' ;
+
+ $dbh = DBI->connect ($dsn, $user, $passwd, {ora_dbh_share => \$orashr}) ;
+
+=item ora_use_proc_connection
+
+This attribute allows to create a DBI handle for an existing SQLLIB
+database connection. This can be used to share database connections
+between Oracle ProC code and DBI running in an embedded Perl interpreter.
+The SQLLIB connection id is appended after the "dbi:Oracle:" initial
+argument to DBI::connect.
+
+For example, if in ProC a connection is made like
+
+ EXEC SQL CONNECT 'user/pass@db' AT 'CONID';
+
+the connection may be used from DBI after running something like
+
+ my $dbh = DBI->connect("dbi:Oracle:CONID", "", "",
+ { ora_use_proc_connection => 1 });
+
+To disconnect, first call $dbh->disconnect(), then disconnect in ProC.
+
+This attribute requires DBD::Oracle to be built with the -ProC
+option to Makefile.PL. It is not available with OCI_V7. Not tested
+with Perl ithreads or with the ora_dbh_share connect attribute.
+
+=item ora_envhp
+
+The first time a connection is made a new OCI 'environment' is
+created by DBD::Oracle and stored in the driver handle.
+Subsequent connects reuse (share) that same OCI environment
+by default.
+
+The ora_envhp attribute can be used to disable the reuse of the OCI
+environment from a previous connect. If the value is C<0> then
+a new OCI environment is allocated and used for this connection.
+
+The OCI environment is what holds information about the client side
+context, such as the local NLS environment. So by altering %ENV and
+setting ora_envhp to 0 you can create connections with different
+NLS settings. This is most useful for testing.
+
+=back
+
+=head2 Database Handle Attributes
+
+=over 4
+
+=item C<ora_ph_type>
+
+The default placeholder data type for the database session.
+The C<TYPE> or L</ora_type> attributes to L<DBI/bind_param> and
+L<DBI/bind_param_inout> override the data type for individual placeholders.
+The most frequent reason for using this attribute is to permit trailing spaces
+in values passed by placeholders.
+
+Constants for the values allowed for this attribute can be imported using
+
+ use DBD::Oracle qw(:ora_types);
+
+Only the following values are permitted for this attribute.
+
+=over 4
+
+=item ORA_VARCHAR2
+
+Strip trailing spaces and allow embedded \0 bytes.
+This is the normal default placeholder type.
+
+=item ORA_STRING
+
+Don't strip trailing spaces and end the string at the first \0.
+
+=item ORA_CHAR
+
+Don't strip trailing spaces and allow embedded \0.
+Force 'blank-padded comparison semantics'.
+
+=back
+
+=item ora_parse_error_offset
+
+If the previous error was from a failed C<prepare> due to a syntax error,
+this attribute gives the offset into the C<Statement> attribute where the
+error was found.
+
+=back
+
+=head2 Prepare Attributes
+
+These attributes may be used in the C<\%attr> parameter of the
+L<DBI/prepare> database handle method.
+
+=over 4
+
+=item ora_placeholders
+
+Set to false to disable processing of placeholders. Used mainly for loading a
+PL/SQL package that has been I<wrapped> with Oracle's C<wrap> utility.
+
+=item ora_parse_lang
+
+Tells the connected database how to interpret the SQL statement.
+If 1 (default), the native SQL version for the database is used.
+Other recognized values are 0 (old V6, treated as V7 in OCI8),
+2 (old V7), 7 (V7), and 8 (V8).
+All other values have the same effect as 1.
+
+=item ora_auto_lob
+
+If true (the default), fetching retreives the contents of the CLOB or
+BLOB column in most circumstances. If false, fetching retreives the
+Oracle "LOB Locator" of the CLOB or BLOB value.
+
+See L</Handling LOBs> for more details.
+See also the LOB tests in 05dbi.t of Oracle::OCI for examples
+of how to use LOB Locators.
+
+=item ora_check_sql
+
+If 1 (default), force SELECT statements to be described in prepare().
+If 0, allow SELECT statements to defer describe until execute().
+
+See L</Prepare postponed till execute> for more information.
+
+=back
+
+=head2 Placeholder Binding Attributes
+
+These attributes may be used in the C<\%attr> parameter of the
+L<DBI/bind_param> or L<DBI/bind_param_inout> statement handle methods.
+
+=over 4
+
+=item ora_type
+
+Specify the placeholder's data type using an Oracle data type.
+A fatal error is raised if C<ora_type> and the DBI C<TYPE> attribute
+are used for the same placeholder.
+Some of these types are not supported by the current version of
+DBD::Oracle and will cause a fatal error if used.
+Constants for the Oracle datatypes may be imported using
+
+ use DBD::Oracle qw(:ora_types);
+
+Potentially useful values when DBD::Oracle was built using OCI 7 and later:
+
+ ORA_VARCHAR2, ORA_STRING, ORA_LONG, ORA_RAW, ORA_LONGRAW,
+ ORA_CHAR, ORA_MLSLABEL, ORA_RSET
+
+Additional values when DBD::Oracle was built using OCI 8 and later:
+
+ ORA_CLOB, ORA_BLOB, ORA_NTY
+
+See L</Binding Cursors> for the correct way to use ORA_RSET.
+
+See L</Handling LOBs> for how to use ORA_CLOB and ORA_BLOB.
+
+See L</Other Data Types> for more information.
+
+See also L<DBI/Placeholders and Bind Values>.
+
+=item ora_csform
+
+Specify the OCI_ATTR_CHARSET_FORM for the bind value. Valid values
+are SQLCS_IMPLICIT (1) and SQLCS_NCHAR (2). Both those constants can
+be imported from the DBD::Oracle module. Rarely needed.
+
+=item ora_csid
+
+Specify the I<integer> OCI_ATTR_CHARSET_ID for the bind value.
+Character set names can't be used currently.
+
+=item ora_maxdata_size
+
+Specify the integer OCI_ATTR_MAXDATA_SIZE for the bind value.
+May be needed if a character set conversion from client to server
+causes the data to use more space and so fail with a truncation error.
+
+=back
+
+=head2 Trailing Spaces
+
+The Oracle strips trailing spaces from VARCHAR placeholder
+values and uses Nonpadded Comparison Semantics with the result.
+This causes trouble if the spaces are needed for
+comparison with a CHAR value or to prevent the value from
+becoming '' which Oracle treats as NULL.
+Look for Blank-padded Comparison Semantics and Nonpadded
+Comparison Semantics in Oracle's SQL Reference or Server
+SQL Reference for more details.
+
+Please remember that using spaces as a value or at the end of
+a value makes visually distinguishing values with different
+numbers of spaces difficult and should be avoided.
+
+To preserve trailing spaces in placeholder values, either change
+the default placeholder type with L</ora_ph_type> or the placeholder
+type for a particular call to L<DBI/bind> or L<DBI/bind_param_inout>
+with L</ora_type> or C<TYPE>.
+Using L<ORA_CHAR> with L<ora_type> or C<SQL_CHAR> with C<TYPE>
+allows the placeholder to be used with Padded Comparison Semantics
+if the value it is being compared to is a CHAR, NCHAR, or literal.
+
+=head1 Metadata
+
+=head2 C<get_info()>
+
+DBD::Oracle supports C<get_info()>, but (currently) only a few info types.
+
+=head2 C<table_info()>
+
+DBD::Oracle supports attributes for C<table_info()>.
+
+In Oracle, the concept of I<user> and I<schema> is (currently) the
+same. Because database objects are owned by an user, the owner names
+in the data dictionary views correspond to schema names.
+Oracle does not support catalogs so TABLE_CAT is ignored as
+selection criterion.
+
+Search patterns are supported for TABLE_SCHEM and TABLE_NAME.
+
+TABLE_TYPE may contain a comma-separated list of table types.
+The following table types are supported:
+
+ TABLE
+ VIEW
+ SYNONYM
+ SEQUENCE
+
+The result set is ordered by TABLE_TYPE, TABLE_SCHEM, TABLE_NAME.
+
+The special enumerations of catalogs, schemas and table types are
+supported. However, TABLE_CAT is always NULL.
+
+An identifier is passed I<as is>, i.e. as the user provides or
+Oracle returns it.
+C<table_info()> performs a case-sensitive search. So, a selection
+criterion should respect upper and lower case.
+Normally, an identifier is case-insensitive. Oracle stores and
+returns it in upper case. Sometimes, database objects are created
+with quoted identifiers (for reserved words, mixed case, special
+characters, ...). Such an identifier is case-sensitive (if not all
+upper case). Oracle stores and returns it as given.
+C<table_info()> has no special quote handling, neither adds nor
+removes quotes.
+
+=head2 C<primary_key_info()>
+
+Oracle does not support catalogs so TABLE_CAT is ignored as
+selection criterion.
+The TABLE_CAT field of a fetched row is always NULL (undef).
+See L</table_info()> for more detailed information.
+
+If the primary key constraint was created without an identifier,
+PK_NAME contains a system generated name with the form SYS_Cn.
+
+The result set is ordered by TABLE_SCHEM, TABLE_NAME, KEY_SEQ.
+
+An identifier is passed I<as is>, i.e. as the user provides or
+Oracle returns it.
+See L</table_info()> for more detailed information.
+
+=head2 C<foreign_key_info()>
+
+This method (currently) supports the extended behavior of SQL/CLI, i.e. the
+result set contains foreign keys that refer to primary B<and> alternate keys.
+The field UNIQUE_OR_PRIMARY distinguishes these keys.
+
+Oracle does not support catalogs, so C<$pk_catalog> and C<$fk_catalog> are
+ignored as selection criteria (in the new style interface).
+The UK_TABLE_CAT and FK_TABLE_CAT fields of a fetched row are always
+NULL (undef).
+See L</table_info()> for more detailed information.
+
+If the primary or foreign key constraints were created without an identifier,
+UK_NAME or FK_NAME contains a system generated name with the form SYS_Cn.
+
+The UPDATE_RULE field is always 3 ('NO ACTION'), because Oracle (currently)
+does not support other actions.
+
+The DELETE_RULE field may contain wrong values. This is a known Bug (#1271663)
+in Oracle's data dictionary views. Currently (as of 8.1.7), 'RESTRICT' and
+'SET DEFAULT' are not supported, 'CASCADE' is mapped correctly and all other
+actions (incl. 'SET NULL') appear as 'NO ACTION'.
+
+The DEFERABILITY field is always NULL, because this columns is
+not present in the ALL_CONSTRAINTS view of older Oracle releases.
+
+The result set is ordered by UK_TABLE_SCHEM, UK_TABLE_NAME, FK_TABLE_SCHEM,
+FK_TABLE_NAME, ORDINAL_POSITION.
+
+An identifier is passed I<as is>, i.e. as the user provides or
+Oracle returns it.
+See L</table_info()> for more detailed information.
+
+=head2 C<column_info()>
+
+Oracle does not support catalogs so TABLE_CAT is ignored as
+selection criterion.
+The TABLE_CAT field of a fetched row is always NULL (undef).
+See L</table_info()> for more detailed information.
+
+The CHAR_OCTET_LENGTH field is (currently) always NULL (undef).
+
+Don't rely on the values of the BUFFER_LENGTH field!
+Especially the length of FLOATs may be wrong.
+
+Datatype codes for non-standard types are subject to change.
+
+Attention! The DATA_DEFAULT (COLUMN_DEF) column is of type LONG.
+
+The result set is ordered by TABLE_SCHEM, TABLE_NAME, ORDINAL_POSITION.
+
+An identifier is passed I<as is>, i.e. as the user provides or
+Oracle returns it.
+See L</table_info()> for more detailed information.
+
+
+=head1 Unicode
+
+DBD::Oracle now supports Unicode UTF-8. There are, however, a number
+of issues you should be aware of, so please read all this section
+carefully.
+
+In this section we'll discuss "Perl and Unicode", then "Oracle and
+Unicode", and finally "DBD::Oracle and Unicode".
+
+Information about Unicode in general can be found at:
+L<http://www.unicode.org/>. It is well worth reading because there are
+many misconceptions about Unicode and you may be holding some of them.
+
+=head2 Perl and Unicode
+
+Perl began implementing Unicode with version 5.6, but the implementaion
+did not mature until version 5.8 and later. If you plan to use Unicode
+you are I<strongly> urged to use perl 5.8.2 or later and to I<carefully> read
+the perl documention on Unicode:
+
+ perldoc perluniintro # in perl 5.8 or later
+ perldoc perlunicode
+
+And then read it again.
+
+Perl's internal unicode format is UTF-8
+which corresponds to the Oracle character set called AL32UTF8.
+
+=head2 Oracle and Unicode
+
+Oracle supports many characters sets, including several different forms
+of Unicode. These include:
+
+ AL16UTF16 => valid for NCHAR columns (CSID=2000)
+ UTF8 => valid for NCHAR columns (CSID=871), deprecated
+ AL32UTF8 => valid for NCHAR and CHAR columns (CSID=873)
+
+When you create an Oracle database, you must specify the DATABASE
+character set (used for DDL, DML and CHAR datatypes) and the NATIONAL
+character set (used for NCHAR and NCLOB types).
+The character sets used in your database can be found using:
+
+ $hash_ref = $dbh->ora_nls_parameters()
+ $database_charset = $hash_ref->{NLS_CHARACTERSET};
+ $national_charset = $hash_ref->{NLS_NCHAR_CHARACTERSET};
+
+The Oracle 9.2 and later default for the national character set is AL16UTF16.
+The default for the database character set is often US7ASCII.
+Although many experienced DBAs will consider an 8bit character set like
+WE8ISO8859P1 or WE8MSWIN1252. To use any character set with Oracle
+other than US7ASCII, requires that the NLS_LANG environment variable be set.
+See the L<"International NLS / 8-bit text issues"> section below.
+
+You are strongly urged to read the Oracle Internationalization documentation
+specifically with respect the choices and trade offs for creating
+a databases for use with international character sets.
+
+Oracle uses the NLS_LANG environment variable to indicate what
+character set is being used on the client. When fetching data Oracle
+will convert from whatever the database character set is to the client
+character set specified by NLS_LANG. Similarly, when sending data to
+the database Oracle will convert from the character set specified by
+NLS_LANG to the database character set.
+
+The NLS_NCHAR environment variable can be used to define a different
+character set for 'national' (NCHAR) character types.
+
+Both UTF8 and AL32UTF32 can be used in NLS_LANG and NLS_NCHAR.
+For example:
+
+ NLS_LANG=AMERICAN_AMERICA.UTF8
+ NLS_LANG=AMERICAN_AMERICA.AL32UTF8
+ 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,
+which it should for Oracle 9.2 or later. If you're using an old
+version of Oracle that doesn't support AL32UTF8 then you should
+avoid using any Unicode characters that require surrogates, in other
+words characters beyond the Unicode BMP (Basic Multilingual Plane).
+
+That's because the character set that Oracle calls "UTF8" doesn't
+conform to the UTF-8 standard in its handling of surrogate characters.
+Technically the encoding that Oracle calls "UTF8" is known as "CESU-8".
+Here are a couple of extracts from L<http://www.unicode.org/reports/tr26/>:
+
+ CESU-8 is useful in 8-bit processing environments where binary
+ collation with UTF-16 is required. It is designed and recommended
+ for use only within products requiring this UTF-16 binary collation
+ equivalence. It is not intended nor recommended for open interchange.
+
+ As a very small percentage of characters in a typical data stream
+ are expected to be supplementary characters, there is a strong
+ possibility that CESU-8 data may be misinterpreted as UTF-8.
+ Therefore, all use of CESU-8 outside closed implementations is
+ strongly discouraged, such as the emittance of CESU-8 in output
+ files, markup language or other open transmission forms.
+
+Oracle uses this internally because it collates (sorts) in the same order
+as UTF16, which is the basis of Oracle's internal collation definitions.
+
+Rather than change UTF8 for clients Oracle chose to define a new character
+set called "AL32UTF8" which does conform to the UTF-8 standard.
+(The AL32UTF8 character set can't be used on the server because it
+would break collation.)
+
+Because of that, for the rest of this document we'll use "AL32UTF8".
+If you're using an Oracle version below 9.2 you'll need to use "UTF8"
+until you upgrade.
+
+=head2 DBD::Oracle and Unicode
+
+DBD::Oracle Unicode support has been implemented for Oracle versions 9
+or greater, and perl version 5.6 or greater (though we I<strongly>
+suggest that you use perl 5.8.2 or later).
+
+You can check which Oracle version your DBD::Oracle was built with by
+importing the C<ORA_OCI> constant from DBD::Oracle.
+
+B<Fetching Data>
+
+Any data returned from Oracle to DBD::Oracle in the AL32UTF8
+character set will be marked as UTF-8 to ensure correct handling by perl.
+
+For Oracle to return data in the AL32UTF8 character set the
+NLS_LANG or NLS_NCHAR environment variable I<must> be set as described
+in the previous section.
+
+When fetching NCHAR, NVARCHAR, or NCLOB data from Oracle, DBD::Oracle
+will set the perl UTF-8 flag on the returned data if either NLS_NCHAR
+is AL32UTF8, or NLS_NCHAR is not set and NLS_LANG is AL32UTF8.
+
+When fetching other character data from Oracle, DBD::Oracle
+will set the perl UTF-8 flag on the returned data if NLS_LANG is AL32UTF8.
+
+B<Sending Data using Placeholders>
+
+Data bound to a placeholder is assumed to be in the default client
+character set (specified by NLS_LANG) except for a few special
+cases. These are listed here with the highest precedence first:
+
+If the C<ora_csid> attribute is given to bind_param() then that
+is passed to Oracle and takes precedence.
+
+If the value is a Perl Unicode string (UTF-8) then DBD::Oracle
+ensures that Oracle uses the Unicode character set, regardless of
+the NLS_LANG and NLS_NCHAR settings.
+
+If the placeholder is for inserting an NCLOB then the client NLS_NCHAR
+character set is used. (That's useful but inconsistent with the other behaviour
+so may change. Best to be explicit by using the C<ora_csform>
+attribute.)
+
+If the C<ora_csform> attribute is given to bind_param() then that
+determines if the value should be assumed to be in the default
+(NLS_LANG) or NCHAR (NLS_NCHAR) client character set.
+
+
+ use DBD::Oracle qw( SQLCS_IMPLICIT SQLCS_NCHAR );
+ ...
+ $sth->bind_param(1, $value, { ora_csform => SQLCS_NCHAR });
+
+or
+
+ $dbh->{ora_ph_csform} = SQLCS_NCHAR; # default for all future placeholders
+
+B<Sending Data using SQL>
+
+Oracle assumes the SQL statement is in the default client character
+set (as specified by NLS_LANG). So Unicode strings containing
+non-ASCII characters should not be used unless the default client
+character set is AL32UTF8.
+
+=head2 DBD::Oracle and Other Character Sets and Encodings
+
+The only multi-byte Oracle character set supported by DBD::Oracle is
+"AL32UTF8" (and "UTF8"). Single-byte character sets should work well.
+
+=head1 Other Data Types
+
+DBD::Oracle does not I<explicitly> support most Oracle data types.
+It simply asks Oracle to return them as strings and Oracle does so.
+Mostly. Similarly when binding placeholder values DBD::Oracle binds
+them as strings and Oracle converts them to the appropriate type,
+such as DATE, when used.
+
+Some of these automatic conversions to and from strings use NLS
+setings to control the formating for output and the parsing for
+input. The most common example is the DATE type. The default NLS
+format for DATE might be DD-MON-YYYY and so when a DATE type is
+fetched that's how Oracle will format the date. NLS settings also
+control the default parsing of strings into DATE values. An error
+will be generated if the contents of the string don't match the
+NLS format. If you're dealing in dates which don't match the default
+NLS format then you can either change the default NLS format or, more
+commonly, use TO_CHAR(field, "format") and TO_DATE(?, "format")
+to explicitly specify formats for converting to and from strings.
+
+A slightly more subtle problem can occur with NUMBER types. The
+default NLS settings might format numbers with a fullstop ("C<.>")
+to separate thousands and a comma ("C<,>") as the decimal point.
+Perl will generate warnings and use incorrect values when numbers,
+returned and formatted as strings in this way by Oracle, are used
+in a numeric context. You could explicitly convert each numeric
+value using the TO_CHAR(...) function but that gets tedious very
+quickly. The best fix is to change the NLS settings. That can be
+done for an individual connection by doing:
+
+ $dbh->do("ALTER SESSION SET NLS_NUMERIC_CHARACTERS = '.,'");
+
+There are some types, like BOOLEAN, that Oracle does not automatically
+convert to or from strings (pity). These need to be converted
+explicitly using SQL or PL/SQL functions.
+
+Examples:
+
+ # DATE values
+ my $sth0 = $dbh->prepare( <<SQL_END );
+ SELECT username, TO_CHAR( created, ? )
+ FROM all_users
+ WHERE created >= TO_DATE( ?, ? )
+ SQL_END
+ $sth0->execute( 'YYYY-MM-DD HH24:MI:SS', "2003", 'YYYY' );
+
+ # BOOLEAN values
+ my $sth2 = $dbh->prepare( <<PLSQL_END );
+ DECLARE
+ b0 BOOLEAN;
+ b1 BOOLEAN;
+ o0 VARCHAR2(32);
+ o1 VARCHAR2(32);
+
+ FUNCTION to_bool( i VARCHAR2 ) RETURN BOOLEAN IS
+ BEGIN
+ IF i IS NULL THEN RETURN NULL;
+ ELSIF i = 'F' OR i = '0' THEN RETURN FALSE;
+ ELSE RETURN TRUE;
+ END IF;
+ END;
+ FUNCTION from_bool( i BOOLEAN ) RETURN NUMBER IS
+ BEGIN
+ IF i IS NULL THEN RETURN NULL;
+ ELSIF i THEN RETURN 1;
+ ELSE RETURN 0;
+ END IF;
+ END;
+ BEGIN
+ -- Converting values to BOOLEAN
+ b0 := to_bool( :i0 );
+ b1 := to_bool( :i1 );
+
+ -- Converting values from BOOLEAN
+ :o0 := from_bool( b0 );
+ :o1 := from_bool( b1 );
+ END;
+ PLSQL_END
+ my ( $i0, $i1, $o0, $o1 ) = ( "", "Something else" );
+ $sth2->bind_param( ":i0", $i0 );
+ $sth2->bind_param( ":i1", $i1 );
+ $sth2->bind_param_inout( ":o0", \$o0, 32 );
+ $sth2->bind_param_inout( ":o1", \$o1, 32 );
+ $sth2->execute();
+ foreach ( $i0, $b0, $o0, $i1, $b1, $o1 ) {
+ $_ = "(undef)" if ! defined $_;
+ }
+ print "$i0 to $o0, $i1 to $o1\n";
+ # Result is : "'' to '(undef)', 'Something else' to '1'"
+
+
+=head1 PL/SQL Examples
+
+Most of these PL/SQL examples come from: Eric Bartley <[email protected]>.
+
+ /*
+ * PL/SQL to create package with stored procedures invoked by
+ * Perl examples. Execute using sqlplus.
+ *
+ * Use of "... OR REPLACE" prevents failure in the event that the
+ * package already exists.
+ */
+
+ CREATE OR REPLACE PACKAGE plsql_example
+ IS
+ PROCEDURE proc_np;
+
+ PROCEDURE proc_in (
+ err_code IN NUMBER
+ );
+
+ PROCEDURE proc_in_inout (
+ test_num IN NUMBER,
+ is_odd IN OUT NUMBER
+ );
+
+ FUNCTION func_np
+ RETURN VARCHAR2;
+
+ END plsql_example;
+ /
+
+ CREATE OR REPLACE PACKAGE BODY plsql_example
+ IS
+ PROCEDURE proc_np
+ IS
+ whoami VARCHAR2(20) := NULL;
+ BEGIN
+ SELECT USER INTO whoami FROM DUAL;
+ END;
+
+ PROCEDURE proc_in (
+ err_code IN NUMBER
+ )
+ IS
+ BEGIN
+ RAISE_APPLICATION_ERROR(err_code, 'This is a test.');
+ END;
+
+ PROCEDURE proc_in_inout (
+ test_num IN NUMBER,
+ is_odd IN OUT NUMBER
+ )
+ IS
+ BEGIN
+ is_odd := MOD(test_num, 2);
+ END;
+
+ FUNCTION func_np
+ RETURN VARCHAR2
+ IS
+ ret_val VARCHAR2(20);
+ BEGIN
+ SELECT USER INTO ret_val FROM DUAL;
+ RETURN ret_val;
+ END;
+
+ END plsql_example;
+ /
+ /* End PL/SQL for example package creation. */
+
+ use DBI;
+
+ my($db, $csr, $ret_val);
+
+ $db = DBI->connect('dbi:Oracle:database','user','password')
+ or die "Unable to connect: $DBI::errstr";
+
+ # So we don't have to check every DBI call we set RaiseError.
+ # See the DBI docs now if you're not familiar with RaiseError.
+ $db->{RaiseError} = 1;
+
+ # Example 1 Eric Bartley <[email protected]>
+ #
+ # Calling a PLSQL procedure that takes no parameters. This shows you the
+ # basic's of what you need to execute a PLSQL procedure. Just wrap your
+ # procedure call in a BEGIN END; block just like you'd do in SQL*Plus.
+ #
+ # p.s. If you've used SQL*Plus's exec command all it does is wrap the
+ # command in a BEGIN END; block for you.
+
+ $csr = $db->prepare(q{
+ BEGIN
+ PLSQL_EXAMPLE.PROC_NP;
+ END;
+ });
+ $csr->execute;
+
+
+ # Example 2 Eric Bartley <[email protected]>
+ #
+ # Now we call a procedure that has 1 IN parameter. Here we use bind_param
+ # to bind out parameter to the prepared statement just like you might
+ # do for an INSERT, UPDATE, DELETE, or SELECT statement.
+ #
+ # I could have used positional placeholders (e.g. :1, :2, etc.) or
+ # ODBC style placeholders (e.g. ?), but I prefer Oracle's named
+ # placeholders (but few DBI drivers support them so they're not portable).
+
+ my $err_code = -20001;
+
+ $csr = $db->prepare(q{
+ BEGIN
+ PLSQL_EXAMPLE.PROC_IN(:err_code);
+ END;
+ });
+
+ $csr->bind_param(":err_code", $err_code);
+
+ # PROC_IN will RAISE_APPLICATION_ERROR which will cause the execute to 'fail'.
+ # Because we set RaiseError, the DBI will croak (die) so we catch that with eval.
+ eval {
+ $csr->execute;
+ };
+ print 'After proc_in: $@=',"'$@', errstr=$DBI::errstr, ret_val=$ret_val\n";
+
+
+ # Example 3 Eric Bartley <[email protected]>
+ #
+ # Building on the last example, I've added 1 IN OUT parameter. We still
+ # use a placeholders in the call to prepare, the difference is that
+ # we now call bind_param_inout to bind the value to the place holder.
+ #
+ # Note that the third parameter to bind_param_inout is the maximum size
+ # of the variable. You normally make this slightly larger than necessary.
+ # But note that the perl variable will have that much memory assigned to
+ # it even if the actual value returned is shorter.
+
+ my $test_num = 5;
+ my $is_odd;
+
+ $csr = $db->prepare(q{
+ BEGIN
+ PLSQL_EXAMPLE.PROC_IN_INOUT(:test_num, :is_odd);
+ END;
+ });
+
+ # The value of $test_num is _copied_ here
+ $csr->bind_param(":test_num", $test_num);
+
+ $csr->bind_param_inout(":is_odd", \$is_odd, 1);
+
+ # The execute will automagically update the value of $is_odd
+ $csr->execute;
+
+ print "$test_num is ", ($is_odd) ? "odd - ok" : "even - error!", "\n";
+
+
+ # Example 4 Eric Bartley <[email protected]>
+ #
+ # What about the return value of a PLSQL function? Well treat it the same
+ # as you would a call to a function from SQL*Plus. We add a placeholder
+ # for the return value and bind it with a call to bind_param_inout so
+ # we can access it's value after execute.
+
+ my $whoami = "";
+
+ $csr = $db->prepare(q{
+ BEGIN
+ :whoami := PLSQL_EXAMPLE.FUNC_NP;
+ END;
+ });
+
+ $csr->bind_param_inout(":whoami", \$whoami, 20);
+ $csr->execute;
+ print "Your database user name is $whoami\n";
+
+ $db->disconnect;
+
+You can find more examples in the t/plsql.t file in the DBD::Oracle
+source directory.
+
+Oracle 9.2 appears to have a bug where a variable bound
+with bind_param_inout() that isn't assigned to by the executed
+PL/SQL block may contain garbage.
+See L<http://www.mail-archive.com/[email protected]/msg18835.html>
+
+=head1 Private database handle functions
+
+These functions are called through the method func()
+which is described in the DBI documentation.
+
+=head2 plsql_errstr
+
+This function returns a string which describes the errors
+from the most recent PL/SQL function, procedure, package,
+or package body compile in a format similar to the output
+of the SQL*Plus command 'show errors'.
+
+The function returns undef if the error string could not
+be retrieved due to a database error.
+Look in $dbh->errstr for the cause of the failure.
+
+If there are no compile errors, an empty string is returned.
+
+Example:
+
+ # Show the errors if CREATE PROCEDURE fails
+ $dbh->{RaiseError} = 0;
+ if ( $dbh->do( q{
+ CREATE OR REPLACE PROCEDURE perl_dbd_oracle_test as
+ BEGIN
+ PROCEDURE filltab( stuff OUT TAB ); asdf
+ END; } ) ) {} # Statement succeeded
+ }
+ elsif ( 6550 != $dbh->err ) { die $dbh->errstr; } # Utter failure
+ else {
+ my $msg = $dbh->func( 'plsql_errstr' );
+ die $dbh->errstr if ! defined $msg;
+ die $msg if $msg;
+ }
+
+=head2 dbms_output_enable / dbms_output_put / dbms_output_get
+
+These functions use the PL/SQL DBMS_OUTPUT package to store and
+retrieve text using the DBMS_OUTPUT buffer. Text stored in this buffer
+by dbms_output_put or any PL/SQL block can be retrieved by
+dbms_output_get or any PL/SQL block connected to the same database
+session.
+
+Stored text is not available until after dbms_output_put or the PL/SQL
+block that saved it completes its execution. This means you B<CAN NOT>
+use these functions to monitor long running PL/SQL procedures.
+
+Example 1:
+
+ # Enable DBMS_OUTPUT and set the buffer size
+ $dbh->{RaiseError} = 1;
+ $dbh->func( 1000000, 'dbms_output_enable' );
+
+ # Put text in the buffer . . .
+ $dbh->func( @text, 'dbms_output_put' );
+
+ # . . . and retreive it later
+ @text = $dbh->func( 'dbms_output_get' );
+
+Example 2:
+
+ $dbh->{RaiseError} = 1;
+ $sth = $dbh->prepare(q{
+ DECLARE tmp VARCHAR2(50);
+ BEGIN
+ SELECT SYSDATE INTO tmp FROM DUAL;
+ dbms_output.put_line('The date is '||tmp);
+ END;
+ });
+ $sth->execute;
+
+ # retreive the string
+ $date_string = $dbh->func( 'dbms_output_get' );
+
+
+=over 4
+
+=item dbms_output_enable ( [ buffer_size ] )
+
+This function calls DBMS_OUTPUT.ENABLE to enable calls to package
+DBMS_OUTPUT procedures GET, GET_LINE, PUT, and PUT_LINE. Calls to
+these procedures are ignored unless DBMS_OUTPUT.ENABLE is called
+first.
+
+The buffer_size is the maximum amount of text that can be saved in the
+buffer and must be between 2000 and 1,000,000. If buffer_size is not
+given, the default is 20,000 bytes.
+
+=item dbms_output_put ( [ @lines ] )
+
+This function calls DBMS_OUTPUT.PUT_LINE to add lines to the buffer.
+
+If all lines were saved successfully the function returns 1. Depending
+on the context, an empty list or undef is returned for failure.
+
+If any line causes buffer_size to be exceeded, a buffer overflow error
+is raised and the function call fails. Some of the text might be in
+the buffer.
+
+=item dbms_output_get
+
+This function calls DBMS_OUTPUT.GET_LINE to retrieve lines of text from
+the buffer.
+
+In an array context, all complete lines are removed from the buffer and
+returned as a list. If there are no complete lines, an empty list is
+returned.
+
+In a scalar context, the first complete line is removed from the buffer
+and returned. If there are no complete lines, undef is returned.
+
+Any text in the buffer after a call to DBMS_OUTPUT.GET_LINE or
+DBMS_OUTPUT.GET is discarded by the next call to DBMS_OUTPUT.PUT_LINE,
+DBMS_OUTPUT.PUT, or DBMS_OUTPUT.NEW_LINE.
+
+=item reauthenticate ( $username, $password )
+
+Starts a new session against the current database using the credentials
+supplied.
+
+=item ora_nls_parameters ( [ $refresh ] )
+
+Returns a hash reference containing the current NLS parameters, as given
+by the v$nls_parameters view. The values fetched are cached between calls.
+To cause the latest values to be fetched, pass a true value to the function.
+
+=item ora_can_unicode ( [ $refresh ] )
+
+Returns a number indicating whether either of the database character sets
+is a Unicode encoding. Calls ora_nls_parameters() and passes the optional
+$refresh parameter to it.
+
+0 = Neither character set is a Unicode encoding.
+
+1 = National character set is a Unicode encoding.
+
+2 = Database character set is a Unicode encoding.
+
+3 = Both character sets are Unicode encodings.
+
+=back
+
+
+=head1 Prepare postponed till execute
+
+The DBD::Oracle module can avoid an explicit 'describe' operation
+prior to the execution of the statement unless the application requests
+information about the results (such as $sth->{NAME}). This reduces
+communication with the server and increases performance (reducing the
+number of PARSE_CALLS inside the server).
+
+However, it also means that SQL errors are not detected until
+C<execute()> (or $sth->{NAME} etc) is called instead of when
+C<prepare()> is called. Note that if the describe is triggered by the
+use of $sth->{NAME} or a similar attribute and the describe fails then
+I<an exception is thrown> even if C<RaiseError> is false!
+
+Set L</ora_check_sql> to 0 in prepare() to enable this behaviour.
+
+=head1 Handling LOBs
+
+=head2 Simple Usage
+
+The value of an Oracle LOB column is not the content of the LOB. It's a
+'LOB Locator' which, after being selected or inserted needs extra
+processing to read or write the content of the LOB.
+
+When fetching LOBs they are, by default, made to look just like LONGs and
+are subject to the LongReadLen and LongTruncOk attributes. Note that
+with OCI 7 DBD::Oracle pre-allocates the whole buffer (LongReadLen) at
+the time the statement is prepared. With OCI 8+ it grows the buffer to
+the amount needed for the largest LOB to be fetched so far.
+
+When inserting or updating LOBs some I<major> magic has to be performed
+behind the scenes to make it transparent. Basically the driver has to
+insert a 'LOB Locator' and then refetch the newly inserted LOB
+Locator before being able to write the data into it. However, it works
+well most of the time, and I've made it as fast as possible, just one
+extra server-round-trip per insert or update after the first. For the
+time being, only single-row LOB updates are supported.
+
+To insert or update a large LOB using a placeholder, DBD::Oracle has to
+know in advance that it is a LOB type. So you need to say:
+
+ $sth->bind_param($field_num, $lob_value, { ora_type => ORA_CLOB });
+
+The ORA_CLOB and ORA_BLOB constants can be imported using
+
+ use DBD::Oracle qw(:ora_types);
+
+or use the corresponding integer values (112 and 113).
+
+One further wrinkle: for inserts and updates of LOBs, DBD::Oracle has
+to be able to tell which parameters relate to which table fields.
+In all cases where it can possibly work it out for itself, it does,
+however, if there are multiple LOB fields of the same type in the table
+then you need to tell it which field each LOB param relates to:
+
+ $sth->bind_param($idx, $value, { ora_type=>ORA_CLOB, ora_field=>'foo' });
+
+There are some limitations inherent in the way DBD::Oracle makes typical
+LOB operations simple by hiding the LOB Locator processing:
+
+ - Can't pass LOBs to/from PL/SQL (except as strings less than 32KB)
+ - Can't read/write LOBs in chunks (except via DBMS_LOB.WRITEAPPEND in PL/SQL)
+ - To INSERT a LOB, you need UPDATE privilege.
+
+The alternative is to disable the automatic LOB Locator processing.
+If L</ora_auto_lob> is 0 in prepare(), you can fetch the LOB Locators and
+do all the work yourself using the ora_lob_*() methods and/or Oracle::OCI.
+See the L</LOB Methods> section below.
+
+=head2 LOB Locator Methods
+
+The following driver-specific methods let you manipulate "LOB Locators".
+LOB locators can be selected from tables directly, if the C<ora_auto_lob>
+attribute is false, or returned via PL/SQL procedure calls.
+
+(If using a DBI version earlier than 1.36 they must be called via the
+func() method. Note that methods called via func() don't honour
+RaiseError etc, and so it's important to check $dbh->err after each call.
+It's recommended that you upgrade to DBI 1.38 or later.)
+
+B<Warning:> Currently multi-byte character set issues have not been
+fully worked out. So these methods may not do what you expect if
+either the perl data is utf8 or the CLOB is a multi-byte character set
+(including uft8). The current behaviour in these situations may not be
+correct and is B<subject to change>. I<Testing and patches are most welcome.>
+
+=over 4
+
+=item ora_lob_read
+
+ $data = $dbh->ora_lob_read($lob_locator, $offset, $length);
+
+Read a portion of the LOB. $offset starts at 1.
+Uses the Oracle OCILobRead function.
+
+=item ora_lob_write
+
+ $rc = $dbh->ora_lob_write($lob_locator, $offset, $data);
+
+Write/overwrite a portion of the LOB. $offset starts at 1.
+Uses the Oracle OCILobWrite function.
+
+=item ora_lob_append
+
+ $rc = $dbh->ora_lob_append($lob_locator, $data);
+
+Append $data to the LOB. Uses the Oracle OCILobWriteAppend function.
+
+NOTE: This method should I<not> be used if either the client or the
+server are Oracle version 8 due to Oracle bug #886191.
+
+=item ora_lob_trim
+
+ $rc = $dbh->ora_lob_trim($lob_locator, $length);
+
+Trims the length of the LOB to $length.
+Uses the Oracle OCILobTrim function.
+
+=item ora_lob_length
+
+ $length = $dbh->ora_lob_length($lob_locator);
+
+Returns the length of the LOB.
+Uses the Oracle OCILobGetLength function.
+
+=back
+
+=head2 LOB Locator Method Examples
+
+I<Note:> Make sure you first read the note in the section above about
+multi-byte character set issues with these methods.
+
+The following examples demonstrate the usage of LOB Locators
+to read, write, and append data, and to query the size of
+large data.
+
+The following examples assume a table containing two large
+object columns, one binary and one character, with a primary
+key column, defined as follows:
+
+ CREATE TABLE lob_example (
+ lob_id INTEGER PRIMARY KEY,
+ bindata BLOB,
+ chardata CLOB
+ )
+
+It also assumes a sequence for use in generating unique
+lob_id field values, defined as follows:
+
+ CREATE SEQUENCE lob_example_seq
+
+
+=head2 Example: Inserting a new row with large data
+
+Unless enough memory is available to store and bind the
+entire lob data for insert all at once, the lob columns must
+be written iteratively, piece by piece. In the case of a new row,
+this is performed by first inserting a row, with empty values in
+the lob columns, then modifying the row by writing the large data
+iteratively to the lob columns using their LOB locators as handles.
+
+The insert statement must create token values in the lob
+columns. Here, we use the empty string for both the binary
+and character large object columns 'bindata' and 'chardata'.
+
+After the INSERT statement, a SELECT statement is used to
+acquire lob locators to the 'bindata' and 'chardata' fields
+of the newly inserted row. Because these lob locators are
+subsequently written, they must be acquired from a select
+statement containing the clause 'FOR UPDATE' (lob locators
+are only valid within the transaction that fetched them, so
+can't be used effectively if AutoCommit is enabled).
+
+ my $lob_id = $dbh->selectrow_array( <<" SQL" );
+ SELECT lob_example_seq.nextval FROM DUAL
+ SQL
+
+ my $sth = $dbh->prepare( <<" SQL" );
+ INSERT INTO lob_example
+ ( lob_id, bindata, chardata )
+ VALUES ( ?, EMPTY_BLOB(),EMPTY_CLOB() )
+ SQL
+ $sth->execute( $lob_id );
+
+ $sth = $dbh->prepare( <<" SQL", { ora_auto_lob => 0 } );
+ SELECT bindata, chardata
+ FROM lob_example
+ WHERE lob_id = ?
+ FOR UPDATE
+ SQL
+ $sth->execute( $lob_id );
+ my ( $bin_locator, $char_locator ) = $sth->fetchrow_array();
+ $sth->finish();
+
+ open BIN_FH, "/binary/data/source" or die;
+ open CHAR_FH, "/character/data/source" or die;
+ my $chunk_size = 4096; # Arbitrary chunk size
+
+ # BEGIN WRITING BIN_DATA COLUMN
+ my $offset = 1; # Offsets start at 1, not 0
+ my $length = 0;
+ my $buffer = '';
+ while( $length = read( BIN_FH, $buffer, $chunk_size ) ) {
+ $dbh->ora_lob_write( $bin_locator, $offset, $buffer );
+ $offset += $length;
+ }
+
+ # BEGIN WRITING CHAR_DATA COLUMN
+ $offset = 1; # Offsets start at 1, not 0
+ $length = 0;
+ $buffer = '';
+ while( $length = read( CHAR_FH, $buffer, $chunk_size ) ) {
+ $dbh->ora_lob_write( $char_locator, $offset, $buffer );
+ $offset += $length;
+ }
+
+
+In this example we demonstrate the use of ora_lob_write()
+iteratively to append data to the columns 'bin_data' and
+'char_data'. Had we used ora_lob_append(), we could have
+saved ourselves the trouble of keeping track of the offset
+into the lobs. The snippet of code beneath the comment
+'BEGIN WRITING BIN_DATA COLUMN' could look as follows:
+
+ my $buffer = '';
+ while ( read( BIN_FH, $buffer, $chunk_size ) ) {
+ $dbh->ora_lob_append( $bin_locator, $buffer );
+ }
+
+The scalar variables $offset and $length are no longer
+needed, because ora_lob_append() keeps track of the offset
+for us.
+
+
+=head2 Example: Updating an existing row with large data
+
+In this example, we demonstrate a technique for overwriting
+a portion of a blob field with new binary data. The blob
+data before and after the section overwritten remains
+unchanged. Hence, this technique could be used for updating
+fixed length subfields embedded in a binary field.
+
+ my $lob_id = 5; # Arbitrary row identifier, for example
+
+ $sth = $dbh->prepare( <<" SQL", { ora_auto_lob => 0 } );
+ SELECT bindata
+ FROM lob_example
+ WHERE lob_id = ?
+ FOR UPDATE
+ SQL
+ $sth->execute( $lob_id );
+ my ( $bin_locator ) = $sth->fetchrow_array();
+
+ my $offset = 100234;
+ my $data = "This string will overwrite a portion of the blob";
+ $dbh->ora_lob_write( $bin_locator, $offset, $data );
+
+After running this code, the row where lob_id = 5 will
+contain, starting at position 100234 in the bin_data column,
+the string "This string will overwrite a portion of the blob".
+
+=head2 Example: Streaming character data from the database
+
+In this example, we demonstrate a technique for streaming
+data from the database to a file handle, in this case
+STDOUT. This allows more data to be read in and written out
+than could be stored in memory at a given time.
+
+ my $lob_id = 17; # Arbitrary row identifier, for example
+
+ $sth = $dbh->prepare( <<" SQL", { ora_auto_lob => 0 } );
+ SELECT chardata
+ FROM lob_example
+ WHERE lob_id = ?
+ SQL
+ $sth->execute( $lob_id );
+ my ( $char_locator ) = $sth->fetchrow_array();
+
+ my $chunk_size = 1034; # Arbitrary chunk size, for example
+ my $offset = 1; # Offsets start at 1, not 0
+ while( my $data = $dbh->ora_lob_read( $char_locator, $offset, $chunk_size ) ) {
+ print STDOUT $data;
+ $offset += $chunk_size;
+ }
+
+Notice that the select statement does not contain the phrase
+"FOR UPDATE". Because we are only reading from the lob
+locator returned, and not modifying the lob it refers to,
+the select statement does not require the "FOR UPDATE"
+clause.
+
+=head2 Example: Truncating existing large data
+
+In this example, we truncate the data already present in a
+large object column in the database. Specifically, for each
+row in the table, we truncate the 'bindata' value to half
+its previous length.
+
+After acquiring a lob locator for the column, we query its
+length, then we trim the length by half. Because we modify
+the large objects with the call to ora_lob_trim(), we must
+select the lob locators 'FOR UPDATE'.
+
+ my $sth = $dbh->prepare( <<" SQL", { ora_auto_lob => 0 } );
+ SELECT bindata
+ FROM lob_example
+ FOR UPATE
+ SQL
+ $sth->execute();
+ while( my ( $bin_locator ) = $sth->fetchrow_array() ) {
+ my $binlength = $dbh->ora_lob_length( $bin_locator );
+ if( $binlength > 0 ) {
+ $dbh->ora_lob_trim( $bin_locator, $binlength/2 );
+ }
+ }
+
+=head1 Binding Cursors
+
+Cursors can be returned from PL/SQL blocks, either from stored
+functions (or procedures with OUT parameters) or
+from direct C<OPEN> statements, as shown below:
+
+ use DBI;
+ use DBD::Oracle qw(:ora_types);
+ my $dbh = DBI->connect(...);
+ my $sth1 = $dbh->prepare(q{
+ BEGIN OPEN :cursor FOR
+ SELECT table_name, tablespace_name
+ FROM user_tables WHERE tablespace_name = :space;
+ END;
+ });
+ $sth1->bind_param(":space", "USERS");
+ my $sth2;
+ $sth1->bind_param_inout(":cursor", \$sth2, 0, { ora_type => ORA_RSET } );
+ $sth1->execute;
+ # $sth2 is now a valid DBI statement handle for the cursor
+ while ( my @row = $sth2->fetchrow_array ) { ... }
+
+The only special requirement is the use of C<bind_param_inout()> with an
+attribute hash parameter that specifies C<ora_type> as C<ORA_RSET>.
+If you don't do that you'll get an error from the C<execute()> like:
+"ORA-06550: line X, column Y: PLS-00306: wrong number or types of
+arguments in call to ...".
+
+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).
+
+ # Create the function that returns a cursor
+ $dbh->do(q{
+ CREATE OR REPLACE FUNCTION sp_ListEmp RETURN SYS_REFCURSOR
+ AS l_cursor SYS_REFCURSOR;
+ BEGIN
+ OPEN l_cursor FOR select ename, empno from emp
+ ORDER BY ename;
+ RETURN l_cursor;
+ END;
+ });
+
+ # Use the function that returns a cursor
+ my $sth1 = $dbh->prepare(q{BEGIN :cursor := sp_ListEmp; END;});
+ my $sth2;
+ $sth1->bind_param_inout(":cursor", \$sth2, 0, { ora_type => ORA_RSET } );
+ $sth1->execute;
+ # $sth2 is now a valid DBI statement handle for the cursor
+ while ( my @row = $sth2->fetchrow_array ) { ... }
+
+A cursor obtained from PL/SQL as above may be passed back to PL/SQL
+by binding for input, as shown in this example, which explicitly
+closes a cursor:
+
+ my $sth3 = $dbh->prepare("BEGIN CLOSE :cursor; END;");
+ $sth3->bind_param(":cursor", $sth2, { ora_type => ORA_RSET } );
+ $sth3->execute;
+
+It is not normally necessary to close a cursor
+explicitly in this way. Oracle will close the cursor automatically
+at the first client-server interaction after the cursor statement handle is
+destroyed. An explicit close may be desirable if the reference to
+the cursor handle from the PL/SQL statement handle delays the destruction
+of the cursor handle for too long. This reference remains until the
+PL/SQL handle is re-bound, re-executed or destroyed.
+
+See the C<curref.pl> script in the Oracle.ex directory in the DBD::Oracle
+source distribution for a complete working example.
+
+=head1 Fetching Nested Cursors
+
+Oracle supports the use of select list expressions of type REF CURSOR.
+These may be explicit cursor expressions - C<CURSOR(SELECT ...)>, or
+calls to PL/SQL functions which return REF CURSOR values. The values
+of these expressions are known as nested cursors.
+
+The value returned to a Perl program when a nested cursor is fetched
+is a statement handle. This statement handle is ready to be fetched from.
+It should not (indeed, must not) be executed.
+
+Oracle imposes a restriction on the order of fetching when nested
+cursors are used. Suppose C<$sth1> is a handle for a select statement
+involving nested cursors, and C<$sth2> is a nested cursor handle fetched
+from C<$sth1>. C<$sth2> can only be fetched from while C<$sth1> is
+still active, and the row containing C<$sth2> is still current in C<$sth1>.
+Any attempt to fetch another row from C<$sth1> renders all nested cursor
+handles previously fetched from C<$sth1> defunct.
+
+Fetching from such a defunct handle results in an error with the message
+C<ERROR nested cursor is defunct (parent row is no longer current)>.
+
+This means that the C<fetchall...> or C<selectall...> methods are not useful
+for queries returning nested cursors. By the time such a method returns,
+all the nested cursor handles it has fetched will be defunct.
+
+It is necessary to use an explicit fetch loop, and to do all the
+fetching of nested cursors within the loop, as the following example
+shows:
+
+ use DBI;
+ my $dbh = DBI->connect(...);
+ my $sth = $dbh->prepare(q{
+ SELECT dname, CURSOR(
+ SELECT ename FROM emp
+ WHERE emp.deptno = dept.deptno
+ ORDER BY ename
+ ) FROM dept ORDER BY dname
+ });
+ $sth->execute;
+ while ( my ($dname, $nested) = $sth->fetchrow_array ) {
+ print "$dname\n";
+ while ( my ($ename) = $nested->fetchrow_array ) {
+ print " $ename\n";
+ }
+ }
+
+
+The cursor returned by the function C<sp_ListEmp> defined in the
+previous section can be fetched as a nested cursor as follows:
+
+ my $sth = $dbh->prepare(q{SELECT sp_ListEmp FROM dual});
+ $sth->execute;
+ my ($nested) = $sth->fetchrow_array;
+ while ( my @row = $nested->fetchrow_array ) { ... }
+
+=head2 Pre-fetching Nested Cursors
+
+By default, DBD::Oracle pre-fetches rows in order to reduce the number of
+round trips to the server. For queries which do not involve nested cursors,
+the number of pre-fetched rows is controlled by the DBI database handle
+attribute C<RowCacheSize> (q.v.).
+
+In Oracle, server side open cursors are a controlled resource, limited in
+number, on a per session basis, to the value of the initialization
+parameter C<OPEN_CURSORS>. Nested cursors count towards ths limit.
+Each nested cursor in the current row counts 1, as does
+each nested cursor in a pre-fetched row. Defunct nested cursors do not count.
+
+An Oracle specific database handle attribute, C<ora_max_nested_cursors>,
+further controls pre-fetching for queries involving nested cursors. For
+each statement handle, the total number of nested cursors in pre-fetched
+rows is limited to the value of this parameter. The default value
+is 0, which disables pre-fetching for queries involving nested cursors.
+
+=head1 Returning A Value from an INSERT
+
+Oracle supports an extended SQL insert syntax which will return one
+or more of the values inserted. This can be particularly useful for
+single-pass insertion of values with re-used sequence values
+(avoiding a separate "select seq.nextval from dual" step).
+
+ $sth = $dbh->prepare(qq{
+ INSERT INTO foo (id, bar)
+ VALUES (foo_id_seq.nextval, :bar)
+ RETURNING id INTO :id
+ });
+ $sth->bind_param(":bar", 42);
+ $sth->bind_param_inout(":id", \my $new_id, 99);
+ $sth->execute;
+ print "The id of the new record is $new_id\n";
+
+If you have many columns to bind you can use code like this:
+
+ @params = (... column values for record to be inserted ...);
+ $sth->bind_param($_, $params[$_-1]) for (1..@params);
+ $sth->bind_param_inout(@params+1, \my $new_id, 99);
+ $sth->execute;
+
+=head1 Returning A Recordset
+
+DBD::Oracle does not currently support binding a PL/SQL table (aka array)
+as an IN OUT parameter to any Perl data structure. You cannot therefore call
+a PL/SQL function or procedure from DBI that uses a non-atomic data type as
+either a parameter, or a return value. However, if you are using Oracle 9.0.1
+or later, you can make use of table (or pipelined) functions.
+
+For example, assume you have the existing PL/SQL Package :
+
+CREATE OR REPLACE PACKAGE Array_Example AS
+ --
+ TYPE tRec IS RECORD (
+ Col1 NUMBER,
+ Col2 VARCHAR2 (10),
+ Col3 DATE) ;
+ --
+ TYPE taRec IS TABLE OF tRec INDEX BY BINARY_INTEGER ;
+ --
+ FUNCTION Array_Func RETURN taRec ;
+ --
+END Array_Example ;
+
+CREATE OR REPLACE PACKAGE BODY Array_Example AS
+--
+FUNCTION Array_Func RETURN taRec AS
+--
+ l_Ret taRec ;
+--
+BEGIN
+ FOR i IN 1 .. 5 LOOP
+ l_Ret (i).Col1 := i ;
+ l_Ret (i).Col2 := 'Row : ' || i ;
+ l_Ret (i).Col3 := TRUNC (SYSDATE) + i ;
+ END LOOP ;
+ RETURN l_Ret ;
+END ;
+--
+END Array_Example ;
+/
+
+Currently, there is no way to directly call the function
+Array_Example.Array_Func from DBI. However, by making the following relatively
+painless additions, its not only possible, but extremely efficient.
+
+First, you need to create database object types that correspond to the record
+and table types in the package. From the above example, these would be :
+
+ CREATE OR REPLACE TYPE tArray_Example__taRec
+ AS OBJECT (
+ Col1 NUMBER,
+ Col2 VARCHAR2 (10),
+ Col3 DATE
+ ) ;
+
+ CREATE OR REPLACE TYPE taArray_Example__taRec
+ AS TABLE OF tArray_Example__taRec ;
+
+Now, assuming the existing function needs to remain unchanged (it is probably
+being called from other PL/SQL code), we need to add a new function to the
+package. Here's the new package specification and body :
+
+ CREATE OR REPLACE PACKAGE Array_Example AS
+ --
+ TYPE tRec IS RECORD (
+ Col1 NUMBER,
+ Col2 VARCHAR2 (10),
+ Col3 DATE) ;
+ --
+ TYPE taRec IS TABLE OF tRec INDEX BY BINARY_INTEGER ;
+ --
+ FUNCTION Array_Func RETURN taRec ;
+ FUNCTION Array_Func_DBI RETURN taArray_Example__taRec PIPELINED ;
+ --
+ END Array_Example ;
+
+ CREATE OR REPLACE PACKAGE BODY Array_Example AS
+ --
+ FUNCTION Array_Func RETURN taRec AS
+ l_Ret taRec ;
+ BEGIN
+ FOR i IN 1 .. 5 LOOP
+ l_Ret (i).Col1 := i ;
+ l_Ret (i).Col2 := 'Row : ' || i ;
+ l_Ret (i).Col3 := TRUNC (SYSDATE) + i ;
+ END LOOP ;
+ RETURN l_Ret ;
+ END ;
+
+ FUNCTION Array_Func_DBI RETURN taArray_Example__taRec PIPELINED AS
+ l_Set taRec ;
+ BEGIN
+ l_Set := Array_Func ;
+ FOR i IN l_Set.FIRST .. l_Set.LAST LOOP
+ PIPE ROW (
+ tArray_Example__taRec (
+ l_Set (i).Col1,
+ l_Set (i).Col2,
+ l_Set (i).Col3
+ )
+ ) ;
+ END LOOP ;
+ RETURN ;
+ END ;
+ --
+ END Array_Example ;
+
+As you can see, the new function is very simple. Now, it is a simple matter
+of calling the function as a straight-forward SELECT from your DBI code. From
+the above example, the code would look something like this :
+
+ my $sth = $dbh->prepare('SELECT * FROM TABLE(Array_Example.Array_Func_DBI)');
+ $sth->execute;
+ while ( my ($col1, $col2, $col3) = $sth->fetchrow_array {
+ ...
+ }
+
+=head1 Timezones
+
+If TWO_TASK isn't set, Oracle uses the TZ variable from the local environment.
+
+If TWO_TASK IS set, Oracle uses the TZ variable of the listener process
+running on the server.
+
+You could have multiple listeners, each with their own TZ, and assign
+users to the appropriate listener by setting TNS_ADMIN to a directory
+that contains a tnsnames.ora file that points to the port that their
+listener is on.
+
+[Brad Howerter, who supplied this info said: "I've done this to simulate
+running a perl script at the end of the previous month even though it
+was the 6th of the new month. I had the dba start up a listener with
+TZ=X+144. (144 hours = 6 days)"]
+
+
+=head1 Oracle Related Links
+
+=head2 Oracle on Linux
+
+ http://www.datamgmt.com/maillist.html
+ http://www.eGroups.com/list/oracle-on-linux
+ http://www.wmd.de/wmd/staff/pauck/misc/oracle_on_linux.html
+ ftp://oracle-ftp.oracle.com/server/patch_sets/LINUX
+ http://www.ixora.com.au/
+
+=head2 Free Oracle Tools and Links
+
+ ora_explain supplied and installed with DBD::Oracle.
+
+ http://www.orafaq.com/
+
+ http://vonnieda.org/oracletool/
+
+=head2 Commercial Oracle Tools and Links
+
+Assorted tools and references for general information.
+No recommendation implied.
+
+ http://www.platinum.com/products/oracle.htm
+ http://www.SoftTreeTech.com
+ http://www.databasegroup.com
+
+Also PL/Vision from RevealNet and Steven Feuerstein, and
+"Q" from Savant Corporation.
+
+
+=head1 SEE ALSO
+
+L<DBI>
+
+http://search.cpan.org/~timb/DBD-Oracle/MANIFEST for all files in
+the DBD::Oracle source distribution including the examples in the
+Oracle.ex directory
+
+ http://search.cpan.org/search?query=Oracle&mode=dist
+
+=head1 AUTHOR
+
+DBD::Oracle by Tim Bunce. DBI by Tim Bunce.
+
+=head1 ACKNOWLEDGEMENTS
+
+A great many people have helped me with DBD::Oracle over the 12 years
+between 1994 and 2006. Far too many to name, but I thank them all.
+Many are named in the Changes file.
+
+See also L<DBI/ACKNOWLEDGEMENTS>.
+
+=head1 MAINTAINER
+
+As of release 1.17 in February 2006 The Pythian Group, Inc. (L<http://www.pythian.com>)
+are taking the lead in maintaining DBD::Oracle with my assistance and
+gratitude. That frees more of my time to work on DBI for perl 5 and perl 6.
+
+=head1 COPYRIGHT
+
+The DBD::Oracle module is Copyright (c) 1994-2006 Tim Bunce. Ireland.
+
+The DBD::Oracle module is free open source software; you can
+redistribute it and/or modify it under the same terms as Perl 5.
+
+=head1 CONTRIBUTING
+
+If you'd like DBD::Oracle to do something new or different the best way
+to make that happen is to do it yourself and email to [email protected] a
+patch of the source code (using 'diff' - see below) that shows the changes.
+
+=head2 How to create a patch using Subversion
+
+The DBD::Oracle source code is maintained using Subversion (a replacement
+for CVS, see L<http://subversion.tigris.org/>). To access the source
+you'll need to install a Subversion client. Then, to get the source
+code, do:
+
+ svn checkout http://svn.perl.org/modules/dbd-oracle/trunk
+
+If it prompts for a username and password use your perl.org account
+if you have one, else just 'guest' and 'guest'. The source code will
+be in a new subdirectory called C<trunk>.
+
+To keep informed about changes to the source you can send an empty email
+to [email protected] after which you'll get an email with the
+change log message and diff of each change checked-in to the source.
+
+After making your changes you can generate a patch file, but before
+you do, make sure your source is still upto date using:
+
+ svn update
+
+If you get any conflicts reported you'll need to fix them first.
+Then generate the patch file from within the C<trunk> directory using:
+
+ svn diff > foo.patch
+
+Read the patch file, as a sanity check, and then email it to [email protected].
+
+=head2 How to create a patch without Subversion
+
+Unpack a fresh copy of the distribution:
+
+ tar xfz DBD-Oracle-1.40.tar.gz
+
+Rename the newly created top level directory:
+
+ mv DBD-Oracle-1.40 DBD-Oracle-1.40.your_foo
+
+Edit the contents of DBD-Oracle-1.40.your_foo/* till it does what you want.
+
+Test your changes and then remove all temporary files:
+
+ make test && make distclean
+
+Go back to the directory you originally unpacked the distribution:
+
+ cd ..
+
+Unpack I<another> copy of the original distribution you started with:
+
+ tar xfz DBD-Oracle-1.40.tar.gz
+
+Then create a patch file by performing a recursive C<diff> on the two
+top level directories:
+
+ diff -r -u DBD-Oracle-1.40 DBD-Oracle-1.40.your_foo > DBD-Oracle-1.40.your_foo.patch
+
+=head2 Speak before you patch
+
+For anything non-trivial or possibly controversial it's a good idea
+to discuss (on [email protected]) the changes you propose before
+actually spending time working on them. Otherwise you run the risk
+of them being rejected because they don't fit into some larger plans
+you may not be aware of.
+
+=cut
Added: dbd-oracle/branches/DBD-Oracle8/Oracle_8.xs
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle8/Oracle_8.xs Mon Dec 21 10:25:03 2009
@@ -0,0 +1,366 @@
+#include "Oracle_8.h"
+
+DBISTATE_DECLARE;
+
+MODULE = DBD::Oracle_8 PACKAGE = DBD::Oracle
+
+I32
+constant(name=Nullch)
+ char *name
+ ALIAS:
+ ORA_VARCHAR2 = 1
+ ORA_NUMBER = 2
+ ORA_STRING = 5
+ ORA_LONG = 8
+ ORA_ROWID = 11
+ ORA_DATE = 12
+ ORA_RAW = 23
+ ORA_LONGRAW = 24
+ ORA_CHAR = 96
+ ORA_CHARZ = 97
+ ORA_MLSLABEL = 105
+ ORA_NTY = 108
+ ORA_CLOB = 112
+ ORA_BLOB = 113
+ ORA_RSET = 116
+ ORA_SYSDBA = 0x0002
+ ORA_SYSOPER = 0x0004
+ SQLCS_IMPLICIT = SQLCS_IMPLICIT
+ SQLCS_NCHAR = SQLCS_NCHAR
+ CODE:
+ if (!ix) {
+ if (!name) name = GvNAME(CvGV(cv));
+ croak("Unknown DBD::Oracle_8 constant '%s'", name);
+ }
+ else RETVAL = ix;
+ OUTPUT:
+ RETVAL
+
+void
+ORA_OCI()
+ CODE:
+ SV *sv = sv_newmortal();
+ sv_setnv(sv, atof(ORA_OCI_VERSION)); /* 9.1! see docs */
+ sv_setpv(sv, ORA_OCI_VERSION); /* 9.10.11.12 */
+ SvNOK_on(sv); /* dualvar hack */
+ ST(0) = sv;
+
+void
+ora_env_var(name)
+ char *name
+ CODE:
+ char buf[1024];
+ char *p = ora_env_var(name, buf, sizeof(buf)-1);
+ SV *sv = sv_newmortal();
+ if (p)
+ sv_setpv(sv, p);
+ ST(0) = sv;
+
+#ifdef __CYGWIN32__
+void
+ora_cygwin_set_env(name, value)
+ char * name
+ char * value
+ CODE:
+ ora_cygwin_set_env(name, value);
+
+#endif /* __CYGWIN32__ */
+
+
+INCLUDE: Oracle_8.xsi
+
+MODULE = DBD::Oracle_8 PACKAGE = DBD::Oracle_8::st
+
+void
+ora_fetch(sth)
+ SV * sth
+ PPCODE:
+ /* fetchrow: but with scalar fetch returning NUM_FIELDS for Oraperl */
+ /* This code is called _directly_ by Oraperl.pm bypassing the DBI. */
+ /* as a result we have to do some things ourselves (like calling */
+ /* CLEAR_ERROR) and we loose the tracing that the DBI offers :-( */
+ D_imp_sth(sth);
+ AV *av;
+ int debug = DBIc_DEBUGIV(imp_sth);
+ if (DBIS->debug > debug)
+ debug = DBIS->debug;
+ DBIh_CLEAR_ERROR(imp_sth);
+ if (GIMME == G_SCALAR) { /* XXX Oraperl */
+ /* This non-standard behaviour added only to increase the */
+ /* performance of the oraperl emulation layer (Oraperl.pm) */
+ if (!imp_sth->done_desc && !dbd_describe(sth, imp_sth))
+ XSRETURN_UNDEF;
+ XSRETURN_IV(DBIc_NUM_FIELDS(imp_sth));
+ }
+ if (debug >= 2)
+ PerlIO_printf(DBILOGFP, " -> ora_fetch\n");
+ av = dbd_st_fetch(sth, imp_sth);
+ if (av) {
+ int num_fields = AvFILL(av)+1;
+ int i;
+ EXTEND(sp, num_fields);
+ for(i=0; i < num_fields; ++i) {
+ PUSHs(AvARRAY(av)[i]);
+ }
+ if (debug >= 2)
+ PerlIO_printf(DBILOGFP, " <- (...) [%d items]\n", num_fields);
+ }
+ else {
+ if (debug >= 2)
+ PerlIO_printf(DBILOGFP, " <- () [0 items]\n");
+ }
+ if (debug >= 2 && SvTRUE(DBIc_ERR(imp_sth)))
+ PerlIO_printf(DBILOGFP, " !! ERROR: %s %s",
+ neatsvpv(DBIc_ERR(imp_sth),0), neatsvpv(DBIc_ERRSTR(imp_sth),0));
+
+
+void
+cancel(sth)
+ SV * sth
+ CODE:
+ D_imp_sth(sth);
+ ST(0) = dbd_st_cancel(sth, imp_sth) ? &sv_yes : &sv_no;
+
+
+MODULE = DBD::Oracle_8 PACKAGE = DBD::Oracle_8::db
+
+void
+reauthenticate(dbh, uid, pwd)
+ SV * dbh
+ char * uid
+ char * pwd
+ CODE:
+ D_imp_dbh(dbh);
+ ST(0) = ora_db_reauthenticate(dbh, imp_dbh, uid, pwd) ? &sv_yes : &sv_no;
+
+void
+ora_lob_write(dbh, locator, offset, data)
+ SV *dbh
+ OCILobLocator *locator
+ UV offset
+ SV *data
+ PREINIT:
+ D_imp_dbh(dbh);
+ ub4 amtp;
+ STRLEN data_len; /* bytes not chars */
+ dvoid *bufp;
+ sword status;
+ ub2 csid;
+ ub1 csform;
+ CODE:
+ csid = 0;
+ csform = SQLCS_IMPLICIT;
+ bufp = SvPV(data, data_len);
+ amtp = data_len;
+ /* if locator is CLOB and data is UTF8 and not in bytes pragma */
+ /* if (0 && SvUTF8(data) && !IN_BYTES) { amtp = sv_len_utf8(data); } */
+ /* added by lab: */
+ /* LAB do something about length here? see above comment */
+ OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
+ ST(0) = &sv_undef;
+ return;
+ }
+#ifdef OCI_ATTR_CHARSET_ID
+ /* Effectively only used so AL32UTF8 works properly */
+ OCILobCharSetId_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csid, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetId");
+ ST(0) = &sv_undef;
+ return;
+ }
+#endif /* OCI_ATTR_CHARSET_ID */
+ /* if data is utf8 but charset isn't then switch to utf8 csid */
+ csid = (SvUTF8(data) && !CS_IS_UTF8(csid)) ? utf8_csid : CSFORM_IMPLIED_CSID(csform);
+
+ OCILobWrite_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
+ &amtp, (ub4)offset,
+ bufp, (ub4)data_len, OCI_ONE_PIECE,
+ NULL, NULL,
+ (ub2)0, csform , status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobWrite");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = &sv_yes;
+ }
+
+void
+ora_lob_append(dbh, locator, data)
+ SV *dbh
+ OCILobLocator *locator
+ SV *data
+ PREINIT:
+ D_imp_dbh(dbh);
+ ub4 amtp;
+ STRLEN data_len; /* bytes not chars */
+ dvoid *bufp;
+ sword status;
+ ub4 startp;
+ ub1 csform;
+ ub2 csid;
+ CODE:
+ csid = 0;
+ csform = SQLCS_IMPLICIT;
+ bufp = SvPV(data, data_len);
+ amtp = data_len;
+ /* if locator is CLOB and data is UTF8 and not in bytes pragma */
+ /* if (1 && SvUTF8(data) && !IN_BYTES) */
+ /* added by lab: */
+ /* LAB do something about length here? see above comment */
+ OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
+ ST(0) = &sv_undef;
+ return;
+ }
+#ifdef OCI_ATTR_CHARSET_ID
+ /* Effectively only used so AL32UTF8 works properly */
+ OCILobCharSetId_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csid, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetId");
+ ST(0) = &sv_undef;
+ return;
+ }
+#endif /* OCI_ATTR_CHARSET_ID */
+ /* if data is utf8 but charset isn't then switch to utf8 csid */
+ csid = (SvUTF8(data) && !CS_IS_UTF8(csid)) ? utf8_csid : CSFORM_IMPLIED_CSID(csform);
+#if !defined(ORA_OCI_8) && defined(OCI_HTYPE_DIRPATH_FN_CTX) /* Oracle is >= 9.0 */
+ OCILobWriteAppend_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
+ &amtp, bufp, (ub4)data_len, OCI_ONE_PIECE,
+ NULL, NULL,
+ csid, csform, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobWriteAppend");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = &sv_yes;
+ }
+#else
+ OCILobGetLength_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, &startp, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobGetLength");
+ ST(0) = &sv_undef;
+ } else {
+ /* start one after the end -- the first position in the LOB is 1 */
+ startp++;
+ if (DBIS->debug >= 2 )
+ PerlIO_printf(DBILOGFP, " Calling OCILobWrite with csid=%d csform=%d\n",csid, csform );
+ OCILobWrite_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
+ &amtp, startp,
+ bufp, (ub4)data_len, OCI_ONE_PIECE,
+ NULL, NULL,
+ csid, csform , status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobWrite");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = &sv_yes;
+ }
+ }
+#endif
+
+
+void
+ora_lob_read(dbh, locator, offset, length)
+ SV *dbh
+ OCILobLocator *locator
+ UV offset
+ UV length
+ PREINIT:
+ D_imp_dbh(dbh);
+ ub4 amtp;
+ STRLEN bufp_len;
+ SV *dest_sv;
+ dvoid *bufp;
+ sword status;
+ ub1 csform;
+ CODE:
+ csform = SQLCS_IMPLICIT;
+ dest_sv = sv_2mortal(newSV(length*4)); /*LAB: crude hack that works... tim did it else where XXX */
+ SvPOK_on(dest_sv);
+ bufp_len = SvLEN(dest_sv); /* XXX bytes not chars? (lab: yes) */
+ bufp = SvPVX(dest_sv);
+ amtp = length; /* if utf8 and clob/nclob: in: chars, out: bytes */
+ /* http://www.lc.leidenuniv.nl/awcourse/oracle/appdev.920/a96584/oci16m40.htm#427818 */
+ /* if locator is CLOB and data is UTF8 and not in bytes pragma */
+ /* if (0 && SvUTF8(dest_sv) && !IN_BYTES) { amtp = sv_len_utf8(dest_sv); } */
+ /* added by lab: */
+ OCILobCharSetForm_log_stat( imp_dbh->envhp, imp_dbh->errhp, locator, &csform, status );
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobCharSetForm");
+ dest_sv = &sv_undef;
+ return;
+ }
+ OCILobRead_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator,
+ &amtp, (ub4)offset, /* offset starts at 1 */
+ bufp, (ub4)bufp_len,
+ 0, 0, (ub2)0, csform, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobRead");
+ dest_sv = &sv_undef;
+ }
+ else {
+ SvCUR(dest_sv) = amtp; /* always bytes here */
+ *SvEND(dest_sv) = '\0';
+ if (CSFORM_IMPLIES_UTF8(csform))
+ SvUTF8_on(dest_sv);
+
+ }
+ ST(0) = dest_sv;
+
+void
+ora_lob_trim(dbh, locator, length)
+ SV *dbh
+ OCILobLocator *locator
+ UV length
+ PREINIT:
+ D_imp_dbh(dbh);
+ sword status;
+ CODE:
+ OCILobTrim_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, length, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobTrim");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = &sv_yes;
+ }
+
+void
+ora_lob_length(dbh, locator)
+ SV *dbh
+ OCILobLocator *locator
+ PREINIT:
+ D_imp_dbh(dbh);
+ sword status;
+ ub4 len = 0;
+ CODE:
+ OCILobGetLength_log_stat(imp_dbh->svchp, imp_dbh->errhp, locator, &len, status);
+ if (status != OCI_SUCCESS) {
+ oci_error(dbh, imp_dbh->errhp, status, "OCILobTrim");
+ ST(0) = &sv_undef;
+ }
+ else {
+ ST(0) = sv_2mortal(newSVuv(len));
+ }
+
+
+
+MODULE = DBD::Oracle_8 PACKAGE = DBD::Oracle_8::dr
+
+void
+init_oci(drh)
+ SV * drh
+ CODE:
+ D_imp_drh(drh);
+ dbd_init_oci(DBIS) ;
+ dbd_init_oci_drh(imp_drh) ;
+
+
+
+
Added: dbd-oracle/branches/DBD-Oracle8/Oracle_8.xsi
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle8/Oracle_8.xsi Mon Dec 21 10:25:03 2009
@@ -0,0 +1,729 @@
+# $Id: Driver.xst,v 11.14 2003/08/22 21:23:39 timbo Exp $
+# Copyright (c) 1997-2002 Tim Bunce Ireland
+# Copyright (c) 2002 Jonathan Leffler
+#
+# You may distribute under the terms of either the GNU General Public
+# License or the Artistic License, as specified in the Perl README file.
+
+
+#include "Driver_xst.h"
+
+
+MODULE = DBD::Oracle_8 PACKAGE = DBD::Oracle_8
+
+REQUIRE: 1.929
+PROTOTYPES: DISABLE
+
+BOOT:
+ items = 0; /* avoid 'unused variable' warning */
+ DBISTATE_INIT;
+ /* XXX this interface will change: */
+ DBI_IMP_SIZE("DBD::Oracle_8::dr::imp_data_size", sizeof(imp_drh_t));
+ DBI_IMP_SIZE("DBD::Oracle_8::db::imp_data_size", sizeof(imp_dbh_t));
+ DBI_IMP_SIZE("DBD::Oracle_8::st::imp_data_size", sizeof(imp_sth_t));
+ dbd_init(DBIS);
+
+
+# ------------------------------------------------------------
+# driver level interface
+# ------------------------------------------------------------
+MODULE = DBD::Oracle_8 PACKAGE = DBD::Oracle_8::dr
+
+
+#ifdef dbd_discon_all
+
+# disconnect_all renamed and ALIAS'd to avoid length clash on VMS :-(
+void
+discon_all_(drh)
+ SV * drh
+ ALIAS:
+ disconnect_all = 1
+ CODE:
+ D_imp_drh(drh);
+ if (0) ix = ix; /* avoid unused variable warning */
+ ST(0) = dbd_discon_all(drh, imp_drh) ? &sv_yes : &sv_no;
+
+#endif /* dbd_discon_all */
+
+
+#ifdef dbd_dr_data_sources
+
+void
+data_sources(drh, attr = Nullsv)
+ SV *drh
+ SV *attr
+ PPCODE:
+ {
+ D_imp_drh(drh);
+ AV *av = dbd_dr_data_sources(drh, imp_drh, attr);
+ if (av) {
+ int i;
+ int n = AvFILL(av)+1;
+ EXTEND(sp, n);
+ for (i = 0; i < n; ++i) {
+ PUSHs(AvARRAY(av)[i]);
+ }
+ }
+ }
+
+#endif
+
+
+# ------------------------------------------------------------
+# database level interface
+# ------------------------------------------------------------
+MODULE = DBD::Oracle_8 PACKAGE = DBD::Oracle_8::db
+
+
+void
+_login(dbh, dbname, username, password, attribs=Nullsv)
+ SV * dbh
+ char * dbname
+ SV * username
+ SV * password
+ SV * attribs
+ CODE:
+ {
+ STRLEN lna;
+ D_imp_dbh(dbh);
+ char *u = (SvOK(username)) ? SvPV(username,lna) : "";
+ char *p = (SvOK(password)) ? SvPV(password,lna) : "";
+#ifdef dbd_db_login6
+ ST(0) = dbd_db_login6(dbh, imp_dbh, dbname, u, p, attribs) ? &sv_yes : &sv_no;
+#else
+ ST(0) = dbd_db_login( dbh, imp_dbh, dbname, u, p) ? &sv_yes : &sv_no;
+#endif
+ }
+
+
+void
+selectall_arrayref(...)
+ PREINIT:
+ SV *sth;
+ SV **maxrows_svp;
+ SV **tmp_svp;
+ SV *attr = &PL_sv_undef;
+ imp_sth_t *imp_sth;
+ CODE:
+ if (items > 2) {
+ attr = ST(2);
+ if (SvROK(attr) &&
+ (DBD_ATTRIB_TRUE(attr,"Slice",5,tmp_svp) || DBD_ATTRIB_TRUE(attr,"Columns",7,tmp_svp))
+ ) {
+ /* fallback to perl implementation */
+ ST(0) = dbixst_bounce_method("DBD::Oracle_8::db::SUPER::selectall_arrayref", items);
+ XSRETURN(1);
+ }
+ }
+ /* --- prepare --- */
+ if (SvROK(ST(1))) {
+ sth = ST(1);
+ }
+ else {
+ sth = dbixst_bounce_method("prepare", 3);
+ if (!SvROK(sth))
+ XSRETURN_UNDEF;
+ }
+ imp_sth = (imp_sth_t*)(DBIh_COM(sth));
+ /* --- bind_param --- */
+ if (items > 3) { /* need to bind params before execute */
+ if (!dbdxst_bind_params(sth, imp_sth, items-2, ax+2) ) {
+ XSRETURN_UNDEF;
+ }
+ }
+ /* --- execute --- */
+ DBIc_ROW_COUNT(imp_sth) = 0;
+ if ( dbd_st_execute(sth, imp_sth) <= -2 ) { /* -2 == error */
+ XSRETURN_UNDEF;
+ }
+ /* --- fetchall --- */
+ maxrows_svp = DBD_ATTRIB_GET_SVP(attr, "MaxRows", 7);
+ ST(0) = dbdxst_fetchall_arrayref(sth, &PL_sv_undef, (maxrows_svp) ? *maxrows_svp : &PL_sv_undef);
+
+
+void
+selectrow_arrayref(...)
+ ALIAS:
+ selectrow_array = 1
+ PREINIT:
+ imp_sth_t *imp_sth;
+ SV *sth;
+ AV *row_av;
+ PPCODE:
+ if (SvROK(ST(1))) {
+ sth = ST(1);
+ }
+ else {
+ /* --- prepare --- */
+ sth = dbixst_bounce_method("prepare", 3);
+ if (!SvROK(sth))
+ XSRETURN_UNDEF;
+ }
+ imp_sth = (imp_sth_t*)(DBIh_COM(sth));
+ /* --- bind_param --- */
+ if (items > 3) { /* need to bind params before execute */
+ if (!dbdxst_bind_params(sth, imp_sth, items-2, ax+2) ) {
+ XSRETURN_UNDEF;
+ }
+ }
+ /* --- execute --- */
+ DBIc_ROW_COUNT(imp_sth) = 0;
+ if ( dbd_st_execute(sth, imp_sth) <= -2 ) { /* -2 == error */
+ XSRETURN_UNDEF;
+ }
+ /* --- fetchrow_arrayref --- */
+ row_av = dbd_st_fetch(sth, imp_sth);
+ if (!row_av) {
+ if (GIMME == G_SCALAR)
+ PUSHs(&PL_sv_undef);
+ }
+ else if (ix == 1) { /* selectrow_array */
+ int i;
+ int num_fields = AvFILL(row_av)+1;
+ if (GIMME == G_SCALAR)
+ num_fields = 1; /* return just first field */
+ EXTEND(sp, num_fields);
+ for(i=0; i < num_fields; ++i) {
+ PUSHs(AvARRAY(row_av)[i]);
+ }
+ }
+ else {
+ PUSHs( sv_2mortal(newRV((SV *)row_av)) );
+ }
+ /* --- finish --- */
+#ifdef dbd_st_finish3
+ dbd_st_finish3(sth, imp_sth, 0);
+#else
+ dbd_st_finish(sth, imp_sth);
+#endif
+
+
+#ifdef dbd_db_do4 /* deebeedee-deebee-doo, deebee-doobee-dah? */
+
+void
+do(dbh, statement, params = Nullsv)
+ SV * dbh
+ char * statement
+ SV * params
+ CODE:
+ {
+ D_imp_dbh(dbh);
+ IV retval;
+ retval = dbd_db_do4(dbh, imp_dbh, statement, params);
+ /* remember that dbd_db_do4 must return <= -2 for error */
+ if (retval == 0) /* ok with no rows affected */
+ XST_mPV(0, "0E0"); /* (true but zero) */
+ else if (retval < -1) /* -1 == unknown number of rows */
+ XST_mUNDEF(0); /* <= -2 means error */
+ else
+ XST_mIV(0, retval); /* typically 1, rowcount or -1 */
+ }
+
+#endif
+
+
+#ifdef dbd_db_last_insert_id
+
+void
+last_insert_id(dbh, catalog, schema, table, field, attr=Nullsv)
+ SV * dbh
+ SV * catalog
+ SV * schema
+ SV * table
+ SV * field
+ SV * attr
+ CODE:
+ {
+ D_imp_dbh(dbh);
+ ST(0) = dbd_db_last_insert_id(dbh, imp_dbh, catalog, schema, table, field, attr);
+ }
+
+#endif
+
+
+void
+commit(dbh)
+ SV * dbh
+ CODE:
+ D_imp_dbh(dbh);
+ if (DBIc_has(imp_dbh,DBIcf_AutoCommit) && DBIc_WARN(imp_dbh))
+ warn("commit ineffective with AutoCommit enabled");
+ ST(0) = dbd_db_commit(dbh, imp_dbh) ? &sv_yes : &sv_no;
+
+
+void
+rollback(dbh)
+ SV * dbh
+ CODE:
+ D_imp_dbh(dbh);
+ if (DBIc_has(imp_dbh,DBIcf_AutoCommit) && DBIc_WARN(imp_dbh))
+ warn("rollback ineffective with AutoCommit enabled");
+ ST(0) = dbd_db_rollback(dbh, imp_dbh) ? &sv_yes : &sv_no;
+
+
+void
+disconnect(dbh)
+ SV * dbh
+ CODE:
+ D_imp_dbh(dbh);
+ if ( !DBIc_ACTIVE(imp_dbh) ) {
+ XSRETURN_YES;
+ }
+ /* pre-disconnect checks and tidy-ups */
+ if (DBIc_CACHED_KIDS(imp_dbh)) {
+ SvREFCNT_dec(DBIc_CACHED_KIDS(imp_dbh)); /* cast them to the winds */
+ DBIc_CACHED_KIDS(imp_dbh) = Nullhv;
+ }
+ /* Check for disconnect() being called whilst refs to cursors */
+ /* still exists. This possibly needs some more thought. */
+ if (DBIc_ACTIVE_KIDS(imp_dbh) && DBIc_WARN(imp_dbh) && !dirty) {
+ STRLEN lna;
+ char *plural = (DBIc_ACTIVE_KIDS(imp_dbh)==1) ? "" : "s";
+ warn("%s->disconnect invalidates %d active statement handle%s %s",
+ SvPV(dbh,lna), (int)DBIc_ACTIVE_KIDS(imp_dbh), plural,
+ "(either destroy statement handles or call finish on them before disconnecting)");
+ }
+ ST(0) = dbd_db_disconnect(dbh, imp_dbh) ? &sv_yes : &sv_no;
+ DBIc_ACTIVE_off(imp_dbh); /* ensure it's off, regardless */
+
+
+void
+STORE(dbh, keysv, valuesv)
+ SV * dbh
+ SV * keysv
+ SV * valuesv
+ CODE:
+ D_imp_dbh(dbh);
+ if (SvGMAGICAL(valuesv))
+ mg_get(valuesv);
+ ST(0) = &sv_yes;
+ if (!dbd_db_STORE_attrib(dbh, imp_dbh, keysv, valuesv))
+ if (!DBIc_DBISTATE(imp_dbh)->set_attr(dbh, keysv, valuesv))
+ ST(0) = &sv_no;
+
+
+void
+FETCH(dbh, keysv)
+ SV * dbh
+ SV * keysv
+ CODE:
+ D_imp_dbh(dbh);
+ SV *valuesv = dbd_db_FETCH_attrib(dbh, imp_dbh, keysv);
+ if (!valuesv)
+ valuesv = DBIc_DBISTATE(imp_dbh)->get_attr(dbh, keysv);
+ ST(0) = valuesv; /* dbd_db_FETCH_attrib did sv_2mortal */
+
+
+void
+DESTROY(dbh)
+ SV * dbh
+ PPCODE:
+ D_imp_dbh(dbh);
+ ST(0) = &sv_yes;
+ if (!DBIc_IMPSET(imp_dbh)) { /* was never fully set up */
+ STRLEN lna;
+ if (DBIc_WARN(imp_dbh) && !dirty && DBIc_DBISTATE(imp_dbh)->debug >= 2)
+ PerlIO_printf(DBIc_LOGPIO(imp_dbh),
+ " DESTROY for %s ignored - handle not initialised\n",
+ SvPV(dbh,lna));
+ }
+ else {
+ /* pre-disconnect checks and tidy-ups */
+ if (DBIc_CACHED_KIDS(imp_dbh)) {
+ SvREFCNT_dec(DBIc_CACHED_KIDS(imp_dbh)); /* cast them to the winds */
+ DBIc_CACHED_KIDS(imp_dbh) = Nullhv;
+ }
+ if (DBIc_IADESTROY(imp_dbh)) { /* want's ineffective destroy */
+ DBIc_ACTIVE_off(imp_dbh);
+ }
+ if (DBIc_ACTIVE(imp_dbh)) {
+ /* The application has not explicitly disconnected. That's bad. */
+ /* To ensure integrity we *must* issue a rollback. This will be */
+ /* harmless if the application has issued a commit. If it hasn't */
+ /* then it'll ensure integrity. Consider a Ctrl-C killing perl */
+ /* between two statements that must be executed as a transaction. */
+ /* Perl will call DESTROY on the dbh and, if we don't rollback, */
+ /* the server may automatically commit! Bham! Corrupt database! */
+ if (!DBIc_has(imp_dbh,DBIcf_AutoCommit)) {
+ if (DBIc_WARN(imp_dbh)
+ && DBIc_is(imp_dbh, DBIcf_Executed)
+ && (!dirty || DBIc_DBISTATE(imp_dbh)->debug >= 3)
+ )
+ warn("Issuing rollback() for database handle being DESTROY'd without explicit disconnect()");
+ dbd_db_rollback(dbh, imp_dbh); /* ROLLBACK! */
+ }
+ dbd_db_disconnect(dbh, imp_dbh);
+ DBIc_ACTIVE_off(imp_dbh); /* ensure it's off, regardless */
+ }
+ dbd_db_destroy(dbh, imp_dbh);
+ }
+
+
+#ifdef dbd_take_imp_data
+
+void
+take_imp_data(h)
+ SV * h
+ CODE:
+ D_imp_xxh(h);
+ ST(0) = (dbd_take_imp_data(h, imp_xxh, NULL))
+ ? dbixst_bounce_method("DBD::Oracle_8::db::SUPER::take_imp_data", items)
+ : &sv_undef;
+
+#endif
+
+#ifdef dbd_db_data_sources
+
+void
+data_sources(dbh, attr = Nullsv)
+ SV *dbh
+ SV *attr
+ PPCODE:
+ {
+ D_imp_dbh(dbh);
+ AV *av = dbd_db_data_sources(dbh, imp_dbh, attr);
+ if (av) {
+ int i;
+ int n = AvFILL(av)+1;
+ EXTEND(sp, n);
+ for (i = 0; i < n; ++i) {
+ PUSHs(AvARRAY(av)[i]);
+ }
+ }
+ }
+
+#endif
+
+# -- end of DBD::Oracle_8::db
+
+# ------------------------------------------------------------
+# statement interface
+# ------------------------------------------------------------
+MODULE = DBD::Oracle_8 PACKAGE = DBD::Oracle_8::st
+
+
+void
+_prepare(sth, statement, attribs=Nullsv)
+ SV * sth
+ char * statement
+ SV * attribs
+ CODE:
+ {
+ D_imp_sth(sth);
+ DBD_ATTRIBS_CHECK("_prepare", sth, attribs);
+ ST(0) = dbd_st_prepare(sth, imp_sth, statement, attribs) ? &sv_yes : &sv_no;
+ }
+
+
+#ifdef dbd_st_rows
+
+void
+rows(sth)
+ SV * sth
+ CODE:
+ D_imp_sth(sth);
+ XST_mIV(0, dbd_st_rows(sth, imp_sth));
+
+#endif /* dbd_st_rows */
+
+
+#ifdef dbd_st_bind_col
+
+void
+bind_col(sth, col, ref, attribs=Nullsv)
+ SV * sth
+ SV * col
+ SV * ref
+ SV * attribs
+ CODE:
+ {
+ IV sql_type = 0;
+ D_imp_sth(sth);
+ if (SvGMAGICAL(ref))
+ mg_get(ref);
+ if (attribs) {
+ if (SvNIOK(attribs)) {
+ sql_type = SvIV(attribs);
+ attribs = Nullsv;
+ }
+ else {
+ SV **svp;
+ DBD_ATTRIBS_CHECK("bind_col", sth, attribs);
+ /* XXX we should perhaps complain if TYPE is not SvNIOK */
+ DBD_ATTRIB_GET_IV(attribs, "TYPE",4, svp, sql_type);
+ }
+ }
+ switch(dbd_st_bind_col(sth, imp_sth, col, ref, sql_type, attribs)) {
+ case 2: ST(0) = &sv_yes; /* job done completely */
+ break;
+ case 1: /* fallback to DBI default */
+ ST(0) = (DBIc_DBISTATE(imp_sth)->bind_col(sth, col, ref, attribs))
+ ? &sv_yes : &sv_no;
+ break;
+ default: ST(0) = &sv_no; /* dbd_st_bind_col has called set_err */
+ break;
+ }
+ }
+
+#endif /* dbd_st_bind_col */
+
+void
+bind_param(sth, param, value, attribs=Nullsv)
+ SV * sth
+ SV * param
+ SV * value
+ SV * attribs
+ CODE:
+ {
+ IV sql_type = 0;
+ D_imp_sth(sth);
+ if (SvGMAGICAL(value))
+ mg_get(value);
+ if (attribs) {
+ if (SvNIOK(attribs)) {
+ sql_type = SvIV(attribs);
+ attribs = Nullsv;
+ }
+ else {
+ SV **svp;
+ DBD_ATTRIBS_CHECK("bind_param", sth, attribs);
+ /* XXX we should perhaps complain if TYPE is not SvNIOK */
+ DBD_ATTRIB_GET_IV(attribs, "TYPE",4, svp, sql_type);
+ }
+ }
+ ST(0) = dbd_bind_ph(sth, imp_sth, param, value, sql_type, attribs, FALSE, 0)
+ ? &sv_yes : &sv_no;
+ }
+
+
+void
+bind_param_inout(sth, param, value_ref, maxlen, attribs=Nullsv)
+ SV * sth
+ SV * param
+ SV * value_ref
+ IV maxlen
+ SV * attribs
+ CODE:
+ {
+ IV sql_type = 0;
+ D_imp_sth(sth);
+ SV *value;
+ if (!SvROK(value_ref) || SvTYPE(SvRV(value_ref)) > SVt_PVMG)
+ croak("bind_param_inout needs a reference to a scalar value");
+ value = SvRV(value_ref);
+ if (SvREADONLY(value))
+ croak("Modification of a read-only value attempted");
+ if (SvGMAGICAL(value))
+ mg_get(value);
+ if (attribs) {
+ if (SvNIOK(attribs)) {
+ sql_type = SvIV(attribs);
+ attribs = Nullsv;
+ }
+ else {
+ SV **svp;
+ DBD_ATTRIBS_CHECK("bind_param", sth, attribs);
+ DBD_ATTRIB_GET_IV(attribs, "TYPE",4, svp, sql_type);
+ }
+ }
+ ST(0) = dbd_bind_ph(sth, imp_sth, param, value, sql_type, attribs, TRUE, maxlen)
+ ? &sv_yes : &sv_no;
+ }
+
+
+void
+execute(sth, ...)
+ SV * sth
+ CODE:
+ D_imp_sth(sth);
+ int retval;
+ if (items > 1) { /* need to bind params */
+ if (!dbdxst_bind_params(sth, imp_sth, items, ax) ) {
+ XSRETURN_UNDEF;
+ }
+ }
+ /* XXX this code is duplicated in selectrow_arrayref above */
+ if (DBIc_ROW_COUNT(imp_sth) > 0) /* reset for re-execute */
+ DBIc_ROW_COUNT(imp_sth) = 0;
+ retval = dbd_st_execute(sth, imp_sth);
+ /* remember that dbd_st_execute must return <= -2 for error */
+ if (retval == 0) /* ok with no rows affected */
+ XST_mPV(0, "0E0"); /* (true but zero) */
+ else if (retval < -1) /* -1 == unknown number of rows */
+ XST_mUNDEF(0); /* <= -2 means error */
+ else
+ XST_mIV(0, retval); /* typically 1, rowcount or -1 */
+
+
+#ifdef dbd_st_execute_for_fetch
+
+void
+execute_for_fetch(sth, fetch_tuple_sub, tuple_status = Nullsv)
+ SV * sth
+ SV * fetch_tuple_sub
+ SV * tuple_status
+ CODE:
+ {
+ D_imp_sth(sth);
+ ST(0) = dbd_st_execute_for_fetch(sth, imp_sth, fetch_tuple_sub, tuple_status);
+ }
+
+#endif
+
+
+
+void
+fetchrow_arrayref(sth)
+ SV * sth
+ ALIAS:
+ fetch = 1
+ CODE:
+ D_imp_sth(sth);
+ AV *av;
+ if (0) ix = ix; /* avoid unused variable warning */
+ av = dbd_st_fetch(sth, imp_sth);
+ ST(0) = (av) ? sv_2mortal(newRV((SV *)av)) : &PL_sv_undef;
+
+
+void
+fetchrow_array(sth)
+ SV * sth
+ ALIAS:
+ fetchrow = 1
+ PPCODE:
+ D_imp_sth(sth);
+ AV *av;
+ av = dbd_st_fetch(sth, imp_sth);
+ if (av) {
+ int i;
+ int num_fields = AvFILL(av)+1;
+ EXTEND(sp, num_fields);
+ for(i=0; i < num_fields; ++i) {
+ PUSHs(AvARRAY(av)[i]);
+ }
+ if (0) ix = ix; /* avoid unused variable warning */
+ }
+
+
+void
+fetchall_arrayref(sth, slice=&PL_sv_undef, batch_row_count=&PL_sv_undef)
+ SV * sth
+ SV * slice
+ SV * batch_row_count
+ CODE:
+ if (SvOK(slice)) { /* fallback to perl implementation */
+ ST(0) = dbixst_bounce_method("DBD::Oracle_8::st::SUPER::fetchall_arrayref", 3);
+ }
+ else {
+ ST(0) = dbdxst_fetchall_arrayref(sth, slice, batch_row_count);
+ }
+
+
+void
+finish(sth)
+ SV * sth
+ CODE:
+ D_imp_sth(sth);
+ D_imp_dbh_from_sth;
+ if (!DBIc_ACTIVE(imp_sth)) {
+ /* No active statement to finish */
+ XSRETURN_YES;
+ }
+ if (!DBIc_ACTIVE(imp_dbh)) {
+ /* Either an explicit disconnect() or global destruction */
+ /* has disconnected us from the database. Finish is meaningless */
+ DBIc_ACTIVE_off(imp_sth);
+ XSRETURN_YES;
+ }
+#ifdef dbd_st_finish3
+ ST(0) = dbd_st_finish3(sth, imp_sth, 0) ? &sv_yes : &sv_no;
+#else
+ ST(0) = dbd_st_finish(sth, imp_sth) ? &sv_yes : &sv_no;
+#endif
+
+
+void
+blob_read(sth, field, offset, len, destrv=Nullsv, destoffset=0)
+ SV * sth
+ int field
+ long offset
+ long len
+ SV * destrv
+ long destoffset
+ CODE:
+ {
+ D_imp_sth(sth);
+ if (!destrv)
+ destrv = sv_2mortal(newRV(sv_2mortal(newSV(0))));
+ if (dbd_st_blob_read(sth, imp_sth, field, offset, len, destrv, destoffset))
+ ST(0) = SvRV(destrv);
+ else ST(0) = &PL_sv_undef;
+ }
+
+
+void
+STORE(sth, keysv, valuesv)
+ SV * sth
+ SV * keysv
+ SV * valuesv
+ CODE:
+ D_imp_sth(sth);
+ if (SvGMAGICAL(valuesv))
+ mg_get(valuesv);
+ ST(0) = &sv_yes;
+ if (!dbd_st_STORE_attrib(sth, imp_sth, keysv, valuesv))
+ if (!DBIc_DBISTATE(imp_sth)->set_attr(sth, keysv, valuesv))
+ ST(0) = &sv_no;
+
+
+# FETCH renamed and ALIAS'd to avoid case clash on VMS :-(
+void
+FETCH_attrib(sth, keysv)
+ SV * sth
+ SV * keysv
+ ALIAS:
+ FETCH = 1
+ CODE:
+ D_imp_sth(sth);
+ SV *valuesv;
+ if (0) ix = ix; /* avoid unused variable warning */
+ valuesv = dbd_st_FETCH_attrib(sth, imp_sth, keysv);
+ if (!valuesv)
+ valuesv = DBIc_DBISTATE(imp_sth)->get_attr(sth, keysv);
+ ST(0) = valuesv; /* dbd_st_FETCH_attrib did sv_2mortal */
+
+
+void
+DESTROY(sth)
+ SV * sth
+ PPCODE:
+ D_imp_sth(sth);
+ ST(0) = &sv_yes;
+ if (!DBIc_IMPSET(imp_sth)) { /* was never fully set up */
+ STRLEN lna;
+ if (DBIc_WARN(imp_sth) && !dirty && DBIc_DBISTATE(imp_sth)->debug >= 2)
+ PerlIO_printf(DBIc_LOGPIO(imp_sth),
+ " DESTROY for %s ignored - handle not initialised\n",
+ SvPV(sth,lna));
+ }
+ else {
+ if (DBIc_IADESTROY(imp_sth)) { /* want's ineffective destroy */
+ DBIc_ACTIVE_off(imp_sth);
+ }
+ if (DBIc_ACTIVE(imp_sth)) {
+ D_imp_dbh_from_sth;
+ if (!dirty && DBIc_ACTIVE(imp_dbh)) {
+#ifdef dbd_st_finish3
+ dbd_st_finish3(sth, imp_sth, 1);
+#else
+ dbd_st_finish(sth, imp_sth);
+#endif
+ }
+ else {
+ DBIc_ACTIVE_off(imp_sth);
+ }
+ }
+ dbd_st_destroy(sth, imp_sth);
+ }
+
+# end of Oracle.xst
Added: dbd-oracle/branches/DBD-Oracle8/Oraperl_8.pm
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle8/Oraperl_8.pm Mon Dec 21 10:25:03 2009
@@ -0,0 +1,875 @@
+# Oraperl Emulation Interface for Perl 5 DBD::Oracle DBI
+#
+# Oraperl.pm
+#
+# Copyright (c) 1994,1995 Tim Bunce
+#
+# See the COPYRIGHT section in the Oracle.pm file for terms.
+#
+# To use this interface use one of the following invocations:
+#
+# use Oraperl;
+# or
+# eval 'use Oraperl; 1;' || die $@ if $] >= 5;
+#
+# The second form allows oraperl scripts to be used with
+# both oraperl and perl 5.
+
+package Oraperl_8;
+
+require 5.004;
+
+use DBI 1.21;
+use Exporter;
+
+$VERSION = substr(q$Revision: 1.44 $, 10);
+
+@ISA = qw(Exporter);
+
+@EXPORT = qw(
+ &ora_login &ora_open &ora_bind &ora_fetch &ora_close
+ &ora_logoff &ora_do &ora_titles &ora_lengths &ora_types
+ &ora_commit &ora_rollback &ora_autocommit &ora_version
+ &ora_readblob
+ $ora_cache $ora_long $ora_trunc $ora_errno $ora_errstr
+ $ora_verno $ora_debug
+);
+
+$debug = 0 unless defined $debug;
+$debugdbi = 0;
+# $safe # set true/false before 'use Oraperl' if needed.
+$safe = 1 unless defined $safe;
+
+# Help those who get core dumps from non-'safe' Oraperl (bad cursors)
+use sigtrap qw(ILL);
+if (!$safe) {
+ $SIG{BUS} = $SIG{SEGV} = sub {
+ print STDERR "Add BEGIN { \$Oraperl_8::safe=1 } above 'use Oraperl_8'.\n"
+ unless $safe;
+ goto &sigtrap::trap;
+ };
+}
+
+
+# Install Driver (use of install_driver is a special case here)
+$drh = DBI->install_driver('Oracle');
+if ($drh) {
+ print "DBD::Oracle driver installed as $drh\n" if $debug;
+ $drh->trace($debug);
+ $drh->{CompatMode} = 1;
+ $drh->{Warn} = 0;
+}
+
+
+use strict;
+
+sub _func_ref {
+ my $name = shift;
+ my $pkg = ($Oraperl_8::safe) ? "DBI" : "DBD::Oracle";
+ \&{"${pkg}::$name"};
+}
+
+sub _warn {
+ my $prev_warn = shift;
+ if ($_[0] =~ /^(Bad|Duplicate) free/) {
+ return unless $ENV{PERL_DBD_DUMP} eq 'dump';
+ print STDERR "Aborting with a core dump for diagnostics (PERL_DBD_DUMP)\n";
+ CORE::dump;
+ }
+ $prev_warn ? &$prev_warn(@_) : warn @_;
+}
+
+
+# -----------------------------------------------------------------
+#
+# $lda = &ora_login($system_id, $name, $password)
+# &ora_logoff($lda)
+
+sub ora_login {
+ my($system_id, $name, $password) = @_;
+ local($Oraperl_8::prev_warn) = $SIG{'__WARN__'} || 0; # must be local
+ local($SIG{'__WARN__'}) = sub { _warn($Oraperl_8::prev_warn, @_) };
+ return DBI->connect("dbi:Oracle:$system_id", $name, $password, {
+ PrintError => 0, AutoCommit => 0
+ });
+}
+sub ora_logoff {
+ my($dbh) = @_;
+ return if !$dbh;
+ local($Oraperl_8::prev_warn) = $SIG{'__WARN__'} || 0; # must be local
+ local($SIG{'__WARN__'}) = sub { _warn($Oraperl_8::prev_warn, @_) };
+ $dbh->disconnect();
+}
+
+
+
+# -----------------------------------------------------------------
+#
+# $csr = &ora_open($lda, $stmt [, $cache])
+# &ora_bind($csr, $var, ...)
+# &ora_fetch($csr [, $trunc])
+# &ora_do($lda, $stmt)
+# &ora_close($csr)
+
+sub ora_open {
+ my($lda, $stmt) = @_;
+ $Oraperl_8::ora_cache_o = $_[2]; # temp hack to pass cache through
+
+ my $csr = $lda->prepare($stmt) or return undef;
+
+ # only execute here if no bind vars specified
+ $csr->execute or return undef unless $csr->{NUM_OF_PARAMS};
+
+ $csr;
+}
+
+*ora_bind = _func_ref('st::execute');
+*ora_fetch = \&{"DBD::Oracle::st::ora_fetch"};
+*ora_close = _func_ref('st::finish');
+
+sub ora_do {
+ # error => undef
+ # 0 => "0E0" (0 but true)
+ # >0 => >0
+ my($lda, $stmt, @params) = @_; # @params are an extension to the original Oraperl.
+
+ return $lda->do($stmt, undef, @params); # SEE DEFAULT METHOD IN DBI.pm
+
+ # OLD CODE:
+ # $csr is local, cursor will be closed on exit
+ my $csr = $lda->prepare($stmt) or return undef;
+ # Oracle OCI will automatically execute DDL statements in prepare()!
+ # We must be carefull not to execute them again! This needs careful
+ # examination and thought.
+ # Perhaps oracle is smart enough not to execute them again?
+ my $ret = $csr->execute(@params);
+ my $rows = $csr->rows;
+ ($rows == 0) ? "0E0" : $rows;
+}
+
+
+# -----------------------------------------------------------------
+#
+# &ora_titles($csr [, $truncate])
+# &ora_lengths($csr)
+# &ora_types($csr)
+
+sub ora_titles{
+ my($csr, $trunc) = @_;
+ warn "ora_titles: truncate option not implemented" if $trunc;
+ @{$csr->{'NAME'}};
+}
+sub ora_lengths{
+ @{shift->{'ora_lengths'}} # oracle specific
+}
+sub ora_types{
+ @{shift->{'ora_types'}} # oracle specific
+}
+
+
+# -----------------------------------------------------------------
+#
+# &ora_commit($lda)
+# &ora_rollback($lda)
+# &ora_autocommit($lda, $on_off)
+# &ora_version
+
+*ora_commit = _func_ref('db::commit');
+*ora_rollback = _func_ref('db::rollback');
+
+sub ora_autocommit {
+ my($lda, $mode) = @_;
+ $lda->{AutoCommit} = $mode;
+ "0E0";
+}
+sub ora_version {
+ my($sw) = DBI->internal;
+ print "\n";
+ print "Oraperl emulation interface version $Oraperl_8::VERSION\n";
+ print "$Oraperl_8::drh->{Attribution}\n";
+ print "$sw->{Attribution}\n\n";
+}
+
+
+# -----------------------------------------------------------------
+#
+# $ora_errno
+# $ora_errstr
+*Oraperl_8::ora_errno = \$DBI::err;
+*Oraperl_8::ora_errstr = \$DBI::errstr;
+
+
+# -----------------------------------------------------------------
+#
+# $ora_verno
+# $ora_debug not supported, use $h->debug(2) where $h is $lda or $csr
+# $ora_cache not supported
+# $ora_long used at ora_open()
+# $ora_trunc used at ora_open()
+
+$Oraperl_8::ora_verno = '3.000'; # to distinguish it from oraperl 2.4
+
+# ora_long is left unset so that the DBI $h->{LongReadLen} attrib will be used
+# by default. If ora_long is set then LongReadLen will be ignored (sadly) but
+# that behaviour may change later to only apply to oraperl mode handles.
+#$Oraperl::ora_long = 80; # 80, oraperl default
+$Oraperl_8::ora_trunc = 0; # long trunc is error, oraperl default
+
+
+# -----------------------------------------------------------------
+#
+# Non-oraperl extensions added here to make it easy to still run
+# script using oraperl (by avoiding $csr->blob_read(...))
+
+*ora_readblob = _func_ref('st::blob_read');
+
+
+1;
+__END__
+
+=head1 NAME
+
+Oraperl - Perl access to Oracle databases for old oraperl scripts
+
+=head1 SYNOPSIS
+
+ eval 'use Oraperl_8; 1;' || die $@ if $] >= 5; # ADD THIS LINE TO OLD SCRIPTS
+
+ $lda = &ora_login($system_id, $name, $password)
+ $csr = &ora_open($lda, $stmt [, $cache])
+ &ora_bind($csr, $var, ...)
+ &ora_fetch($csr [, $trunc])
+ &ora_close($csr)
+ &ora_logoff($lda)
+
+ &ora_do($lda, $stmt)
+
+ &ora_titles($csr)
+ &ora_lengths($csr)
+ &ora_types($csr)
+ &ora_commit($lda)
+ &ora_rollback($lda)
+ &ora_autocommit($lda, $on_off)
+ &ora_version()
+
+ $ora_cache
+ $ora_long
+ $ora_trunc
+ $ora_errno
+ $ora_errstr
+ $ora_verno
+
+ $ora_debug
+
+=head1 DESCRIPTION
+
+Oraperl is an extension to Perl which allows access to Oracle databases.
+
+The original oraperl was a Perl 4 binary with Oracle OCI compiled into it.
+The Perl 5 Oraperl module described here is distributed with L<DBD::Oracle>
+(a database driver what operates within L<DBI>) and adds an extra layer over
+L<DBI> method calls.
+The Oraperl module should only be used to allow existing Perl 4 oraperl scripts
+to run with minimal changes; any new development should use L<DBI> directly.
+
+The functions which make up this extension are described in the
+following sections. All functions return a false or undefined (in the
+Perl sense) value to indicate failure. You do not need to understand
+the references to OCI in these descriptions. They are here to help
+those who wish to extend the routines or to port them to new machines.
+
+The text in this document is largely unchanged from the original Perl4
+oraperl manual written by Kevin Stock <[email protected]>. Any comments
+specific to the DBD::Oracle Oraperl emulation are prefixed by B<DBD:>.
+See the DBD::Oracle and DBI manuals for more information.
+
+B<DBD:> In order to make the oraperl function definitions available in
+perl5 you need to arrange to 'use' the Oraperl.pm module in each file
+or package which uses them. You can do this by simply adding S<C<use
+Oraperl;>> in each file or package. If you need to make the scripts work
+with both the perl4 oraperl and perl5 you should add add the following
+text instead:
+
+ eval 'use Oraperl; 1;' || die $@ if $] >= 5;
+
+=head2 Principal Functions
+
+The main functions for database access are &ora_login(), &ora_open(),
+&ora_bind(), &ora_fetch(), &ora_close(), &ora_do() and &ora_logoff().
+
+=over 2
+
+=item * ora_login
+
+ $lda = &ora_login($system_id, $username, $password)
+
+In order to access information held within an Oracle database, a
+program must first log in to it by calling the &ora_login() function.
+This function is called with three parameters, the system ID (see
+below) of the Oracle database to be used, and the Oracle username and
+password. The value returned is a login identifier (actually an Oracle
+Login Data Area) referred to below as $lda.
+
+Multiple logins may be active simultaneously. This allows a simple
+mechanism for correlating or transferring data between databases.
+
+Most Oracle programs (for example, SQL*Plus or SQL*Forms) examine the
+environment variable ORACLE_SID or TWO_TASK to determine which database
+to connect to. In an environment which uses several different
+databases, it is easy to make a mistake, and attempt to run a program
+on the wrong one. Also, it is cumbersome to create a program which
+works with more than one database simultaneously. Therefore, Oraperl
+requires the system ID to be passed as a parameter. However, if the
+system ID parameter is an empty string then oracle will use the
+existing value of ORACLE_SID or TWO_TASK in the usual manner.
+
+Example:
+
+ $lda = &ora_login('personnel', 'scott', 'tiger') || die $ora_errstr;
+
+This function is equivalent to the OCI olon and orlon functions.
+
+B<DBD:> note that a name is assumed to be a TNS alias if it does not
+appear as the name of a SID in /etc/oratab or /var/opt/oracle/oratab.
+See the code in Oracle.pm for the full logic of database name handling.
+
+B<DBD:> Since the returned $lda is a Perl5 reference the database login
+identifier is now automatically released if $lda is overwritten or goes
+out of scope.
+
+=item * ora_open
+
+ $csr = &ora_open($lda, $statement [, $cache])
+
+To specify an SQL statement to be executed, the program must call the
+&ora_open() function. This function takes at least two parameters: a
+login identifier (obtained from &ora_login()) and the SQL statement to
+be executed. An optional third parameter specifies the size of the row
+cache to be used for a SELECT statement. The value returned from
+&ora_open() is a statement identifier (actually an ORACLE Cursor)
+referred to below as $csr.
+
+If the row cache size is not specified, a default size is
+used. As distributed, the default is five rows, but this
+may have been changed at your installation (see the
+&ora_version() function and $ora_cache variable below).
+
+Examples:
+
+ $csr = &ora_open($lda, 'select ename, sal from emp order by ename', 10);
+
+ $csr = &ora_open($lda, 'insert into dept values(:1, :2, :3)');
+
+This function is equivalent to the OCI oopen and oparse functions. For
+statements which do not contain substitution variables (see the section
+Substitution Variables below), it also uses of the oexec function. For
+SELECT statements, it also makes use of the odescr and odefin functions
+to allocate memory for the values to be returned from the database.
+
+=item * ora_bind
+
+ &ora_bind($csr, $var, ...)
+
+If an SQL statement contains substitution variables (see the section
+Substitution Variables below), &ora_bind() is used to assign actual
+values to them. This function takes a statement identifier (obtained
+from &ora_open()) as its first parameter, followed by as many
+parameters as are required by the statement.
+
+Example:
+
+ &ora_bind($csr, 50, 'management', 'Paris');
+
+This function is equivalent to the OCI obndrn and oexec statements.
+
+The OCI obndrn function does not allow empty strings to be bound. As
+distributed, $ora_bind therefore replaces empty strings with a single
+space. However, a compilation option allows this substitution to be
+suppressed, causing &ora_bind() to fail. The output from the
+&ora_version() function specifies which is the case at your installation.
+
+=item * ora_fetch
+
+ $nfields = &ora_fetch($csr)
+
+ @data = &ora_fetch($csr [, $trunc])
+
+The &ora_fetch() function is used in conjunction with a SQL SELECT
+statement to retrieve information from a database. This function takes
+one mandatory parameter, a statement identifier (obtained from
+&ora_open()).
+
+Used in a scalar context, the function returns the number of fields
+returned by the query but no data is actually fetched. This may be
+useful in a program which allows a user to enter a statement interactively.
+
+Example:
+
+ $nfields = &ora_fetch($csr);
+
+Used in an array context, the value returned is an array containing the
+data, one element per field. Note that this will not work as expected:
+
+ @data = &ora_fetch($csr) || die "..."; # WRONG
+
+The || forces a scalar context so ora_fetch returns the number of fields.
+
+An optional second parameter may be supplied to indicate whether the
+truncation of a LONG or LONG RAW field is to be permitted (non-zero) or
+considered an error (zero). If this parameter is not specified, the
+value of the global variable $ora_trunc is used instead. Truncation of
+other datatypes is always considered a error.
+
+B<DBD:> The optional second parameter to ora_fetch is not supported.
+A DBI usage error will be generated if a second parameter is supplied.
+Use the global variable $ora_trunc instead. Also note that the
+experimental DBI blob_read method can be used to retrieve a long:
+
+ $csr->blob_read($field, $offset, $len [, \$dest, $destoffset]);
+
+If truncation occurs, $ora_errno will be set to 1406. &ora_fetch()
+will complete successfully if truncation is permitted, otherwise it
+will fail.
+
+&ora_fetch() will fail at the end of the data or if an error occurs. It
+is possible to distinguish between these cases by testing the value of
+the variable $ora_errno. This will be zero for end of data, non-zero if
+an error has occurred.
+
+Example:
+
+ while (($deptno, $dname, $loc) = &ora_fetch($csr))
+ {
+ warn "Truncated!!!" if $ora_errno == 1406;
+ # do something with the data
+ }
+ warn $ora_errstr if $ora_errno;
+
+This function is equivalent to the OCI ofetch function.
+
+=item * ora_close
+
+ &ora_close($csr)
+
+If an SQL statement is no longer required (for example, all the data
+selected has been processed, or no more rows are to be inserted) then
+the statement identifier should be released. This is done by calling
+the &ora_close() function with the statement identifier as its only
+parameter.
+
+This function is equivalent to the OCI oclose function.
+
+B<DBD:> Since $csr is a Perl5 reference the statement/cursor is now
+automatically closed if $csr is overwritten or goes out of scope.
+
+
+=item * ora_do
+
+ &ora_do($lda, $statement)
+
+Not all SQL statements return data or contain substitution
+variables. In these cases the &ora_do() function may be
+used as an alternative to &ora_open() and &ora_close().
+This function takes two parameters, a login identifier and
+the statement to be executed.
+
+Example:
+
+ &ora_do($lda, 'drop table employee');
+
+This function is roughly equivalent to
+
+ &ora_close( &ora_open($lda, $statement) )
+
+B<DBD:> oraperl v2 used to return the string 'OK' to indicate
+success with a zero numeric value. The Oraperl emulation now
+uses the string '0E0' to achieve the same effect since it does
+not cause any C<-w> warnings when used in a numeric context.
+
+=item * ora_logoff
+
+ &ora_logoff($lda)
+
+When the program no longer needs to access a given database, the login
+identifier should be released using the &ora_logoff() function.
+
+This function is equivalent to the OCI ologoff function.
+
+B<DBD:> Since $lda is a Perl5 reference the database login identifier
+is now automatically released if $lda is overwritten or goes out of scope.
+
+=back
+
+=head2 Ancillary Functions
+
+Additional functions available are: &ora_titles(),
+&ora_lengths(), &ora_types(), &ora_autocommit(),
+&ora_commit(), &ora_rollback() and &ora_version().
+
+The first three are of most use within a program which
+allows statements to be entered interactively. See, for
+example, the sample program sql which is supplied with
+Oraperl and may have been installed at your site.
+
+=over 2
+
+=item * ora_titles
+
+ @titles = &ora_titles($csr)
+
+A program may determine the field titles of an executed
+query by calling &ora_titles(). This function takes a
+single parameter, a statement identifier (obtained from
+&ora_open()) indicating the query for which the titles are
+required. The titles are returned as an array of strings,
+one for each column.
+
+Titles are truncated to the length of the field, as reported
+by the &ora_lengths() function.
+
+B<DBD:> oraperl v2.2 actually changed the behaviour such that the
+titles were not truncated unless an optional second parameter was
+true. This was not reflected in the oraperl manual. The Oraperl
+emulation adopts the non truncating behaviour and doesn't support the
+truncate parameter.
+
+
+=item * ora_lengths
+
+ @lengths = &ora_lengths($csr)
+
+A program may determine the length of each of the fields
+returned by a query by calling the &ora_lengths() function.
+This function takes a single parameter, a statement
+identifier (obtained from &ora_open()) indicating the query
+for which the lengths are required. The lengths are
+returned as an array of integers, one for each column.
+
+
+=item * ora_types
+
+ @types = &ora_types($csr)
+
+A program may determine the type of each of the fields returned by a
+query by calling the &ora_types() function. This function takes a
+single parameter, a statement identifier (obtained from &ora_open())
+indicating the query for which the lengths are required. The types are
+returned as an array of integers, one for each field.
+
+These types are defined in your OCI documentation. The correct
+interpretation for Oracle v6 is given in the file oraperl.ph.
+
+
+=item * ora_autocommit
+
+ &ora_autocommit($lda, $on_or_off)
+
+Autocommit mode (in which each transaction is committed immediately,
+without waiting for an explicit commit) may be enabled or disabled
+using &ora_autocommit(). This function takes two parameters, a login
+identifier (obtained from &ora_login()) and a true/false value
+indicating whether autocommit is to be enabled (non-zero) or disabled
+(zero). By default, autocommit is off.
+
+Note that autocommit can only be set per login, not per statement. If
+you need to control autocommit by statement (for example, to allow
+deletions to be rolled back, but insertions to be committed
+immediately) you should make multiple calls to &ora_login() and use a
+separate login identifier for each statement.
+
+
+=item * ora_commit, ora_rollback
+
+ &ora_commit($lda)
+ &ora_rollback($lda)
+
+Modifications to a database may be committed or rolled back using the
+&ora_commit() and &ora_rollback() functions. These functions take a
+single parameter, a login identifier obtained from &ora_login().
+
+Transactions which have been committed (either explicitly by a call to
+&ora_commit() or implicitly through the use of &ora_autocommit())
+cannot be subsequently rolled back.
+
+Note that commit and rollback can only be used per login, not per
+statement. If you need to commit or rollback by statement you should
+make multiple calls to &ora_login() and use a separate login identifier
+for each statement.
+
+
+=item * ora_version
+
+ &ora_version()
+
+The &ora_version() function prints the version number and
+copyright information concerning Oraperl. It also prints
+the values of various compilation time options. It does not
+return any value, and should not normally be used in a
+program.
+
+Example:
+
+ perl -MOraperl -e 'ora_version()'
+
+ This is Oraperl, version 2, patch level 0.
+
+ Debugging is available, including the -D flag.
+ Default fetch row cache size is 5.
+ Empty bind values are replaced by a space.
+
+ Perl is copyright by Larry Wall; type oraperl -v for details.
+ Additions for oraperl: Copyright 1991, 1992, Kevin Stock.
+
+ Oraperl may be distributed under the same conditions as Perl.
+
+This function is the equivalent of Perl's C<-v> flag.
+
+B<DBD:> The Oraperl emulation printout is similar but not identical.
+
+=back
+
+=head1 VARIABLES
+
+Six special variables are provided, $ora_cache, $ora_long,
+$ora_trunc, $ora_errno, $ora_errstr and $ora_verno.
+
+=head2 Customisation Variables
+
+These variables are used to dictate the behaviour of Oraperl
+under certain conditions.
+
+=over 2
+
+=item * $ora_cache
+
+The $ora_cache variable determines the default cache size used by the
+&ora_open() function for SELECT statements if an explicit cache size is
+not given.
+
+It is initialised to the default value reported by &ora_version() but
+may be set within a program to apply to all subsequent calls to
+&ora_open(). Cursors which are already open are not affected. As
+distributed, the default value is five, but may have been altered at
+your installation.
+
+As a special case, assigning zero to $ora_cache resets it to the
+default value. Attempting to set $ora_cache to a negative value results
+in a warning.
+
+
+=item * $ora_long
+
+Normally, Oraperl interrogates the database to determine the length of
+each field and allocates buffer space accordingly. This is not
+possible for fields of type LONG or LONGRAW. To allocate space
+according to the maximum possible length (65535 bytes) would obviously
+be extremely wasteful of memory.
+
+Therefore, when &ora_open() determines that a field is a LONG type, it
+allocates the amount of space indicated by the $ora_long variable. This
+is initially set to 80 (for compatibility with Oracle products) but may
+be set within a program to whatever size is required.
+
+$ora_long is only used when fetching data, not when inserting it.
+
+
+=item * $ora_trunc
+
+Since Oraperl cannot determine exactly the maximum length of a LONG
+field, it is possible that the length indicated by $ora_long is not
+sufficient to store the data fetched. In such a case, the optional
+second parameter to &ora_fetch() indicates whether the truncation
+should be allowed or should provoke an error.
+
+If this second parameter is not specified, the value of $ora_trunc is
+used as a default. This only applies to LONG and LONGRAW data types.
+Truncation of a field of any other type is always considered an error
+(principally because it indicates a bug in Oraperl).
+
+=back
+
+=head2 Status Variables
+
+These variables report information about error conditions or about
+Oraperl itself. They may only be read; a fatal error occurs if a
+program attempts to change them.
+
+=over 2
+
+=item * $ora_errno
+
+$ora_errno contains the Oracle error code provoked by the last function
+call.
+
+There are two cases of particular interest concerning &ora_fetch(). If
+a LONG or LONGRAW field is truncated (and truncation is allowed) then
+&ora_fetch() will complete successfully but $ora_errno will be set to
+1406 to indicate the truncation. When &ora_fetch() fails, $ora_errno
+will be set to zero if this was due to the end of data or an error code
+if it was due to an actual error.
+
+
+=item * $ora_errstr
+
+The $ora_errstr variable contains the Oracle error message
+corresponding to the current value of $ora_errno.
+
+
+=item * $ora_verno
+
+The $ora_verno variable contains the version number of Oraperl in the
+form v.ppp where v is the major version number and ppp is the
+patchlevel. For example, in Oraperl version 3, patch level 142,
+$ora_verno would contain the value 3.142 (more or less, allowing for
+floating point error).
+
+=back
+
+
+=head1 SUBSTITUTION VARIABLES
+
+Oraperl allows an SQL statement to contain substitution variables.
+These consist of a colon followed by a number. For example, a program
+which added records to a telephone list might use the following call to
+&ora_open():
+
+ $csr = &ora_open($csr, "insert into telno values(:1, :2)");
+
+The two names :1 and :2 are called substitution variables. The
+function &ora_bind() is used to assign values to these variables. For
+example, the following statements would add two new people to the
+list:
+
+ &ora_bind($csr, "Annette", "472-8836");
+ &ora_bind($csr, "Brian", "937-1823");
+
+Note that the substitution variables must be assigned consecutively
+beginning from 1 for each SQL statement, as &ora_bind() assigns its
+parameters in this order. Named substitution variables (for example,
+:NAME, :TELNO) are not permitted.
+
+B<DBD:> Substitution variables are now bound as type 1 (VARCHAR2)
+and not type 5 (STRING) by default. This can alter the behaviour of
+SQL code which compares a char field with a substitution variable.
+See the String Comparison section in the Datatypes chapter of the
+Oracle OCI manual for more details.
+
+You can work around this by using DBD::Oracle's ability to specify
+the Oracle type to be used on a per field basis:
+
+ $char_attrib = { ora_type => 5 }; # 5 = STRING (ala oraperl2.4)
+ $csr = ora_open($dbh, "select foo from bar where x=:1 and y=:2");
+ $csr->bind_param(1, $value_x, $char_attrib);
+ $csr->bind_param(2, $value_y, $char_attrib);
+ ora_bind($csr); # bind with no parameters since we've done bind_param()'s
+
+
+=head1 DEBUGGING
+
+B<DBD:> The Oraperl $ora_debug variable is not supported. However
+detailed debugging can be enabled at any time by executing
+
+ $h->debug(2);
+
+where $h is either a $lda or a $csr. If debugging is enabled on an
+$lda then it is automatically passed on to any cursors returned by
+&ora_open().
+
+=head1 EXAMPLE
+
+ format STDOUT_TOP =
+ Name Phone
+ ==== =====
+ .
+
+ format STDOUT =
+ @<<<<<<<<<< @>>>>>>>>>>
+ $name, $phone
+ .
+
+ die "You should use oraperl, not perl\n" unless defined &ora_login;
+ $ora_debug = shift if $ARGV[0] =~ /^\-#/;
+
+ $lda = &ora_login('t', 'kstock', 'kstock')
+ || die $ora_errstr;
+ $csr = &ora_open($lda, 'select * from telno order by name')
+ || die $ora_errstr;
+
+ $nfields = &ora_fetch($csr);
+ print "Query will return $nfields fields\n\n";
+
+ while (($name, $phone) = &ora_fetch($csr)) { write; }
+ warn $ora_errstr if $ora_errno;
+
+ die "fetch error: $ora_errstr" if $ora_errno;
+
+ do ora_close($csr) || die "can't close cursor";
+ do ora_logoff($lda) || die "can't log off Oracle";
+
+
+=head1 NOTES
+
+In keeping with the philosophy of Perl, there is no pre-defined limit
+to the number of simultaneous logins or SQL statements which may be
+active, nor to the number of data fields which may be returned by a
+query. The only limits are those imposed by the amount of memory
+available, or by Oracle.
+
+
+=head1 WARNINGS
+
+The Oraperl emulation software shares no code with the original
+oraperl. It is built on top of the new Perl5 DBI and DBD::Oracle
+modules. These modules are still evolving. (One of the goals of
+the Oraperl emulation software is to allow useful work to be done
+with the DBI and DBD::Oracle modules whilst insulating users from
+the ongoing changes in their interfaces.)
+
+It is quite possible, indeed probable, that some differences in
+behaviour will exist. These are probably confined to error handling.
+
+B<All> differences in behaviour which are not documented here should be
+reported to to [email protected].
+
+
+=head1 SEE ALSO
+
+=over 2
+
+=item Oracle Documentation
+
+SQL Language Reference Manual.
+Programmer's Guide to the Oracle Call Interfaces.
+
+=item Books
+
+Programming Perl by Larry Wall and Randal Schwartz.
+Learning Perl by Randal Schwartz.
+
+=item Manual Pages
+
+perl(1)
+
+=back
+
+=head1 AUTHOR
+
+Original Oraperl 2.4 code and documentation
+by Kevin Stock <[email protected]>.
+
+DBI and Oraperl emulation using DBD::Oracle by Tim Bunce.
+
+=head1 MAINTAINER
+
+As of DBD::Oracle release 1.17 in February 2006 The Pythian Group, Inc.
+(L<http://www.pythian.com>) are taking the lead in maintaining DBD::Oracle with
+my assistance and gratitude.
+
+=head1 COPYRIGHT
+
+Copyright (c) 1994-2006 Tim Bunce. Ireland.
+
+The DBD::Oracle module is free open source software; you can
+redistribute it and/or modify it under the same terms as Perl 5.
+
+=cut
Modified: dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/Oracle.dll
==============================================================================
Binary files. No diff available.
Modified: dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/Oracle.exp
==============================================================================
Binary files. No diff available.
Modified: dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/Oracle.lib
==============================================================================
Binary files. No diff available.
Modified: dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/Oracle.pdb
==============================================================================
Binary files. No diff available.
Modified: dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/mk.pm
==============================================================================
--- dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/mk.pm (original)
+++ dbd-oracle/branches/DBD-Oracle8/blib/arch/auto/DBD/Oracle/mk.pm Mon Dec 21 10:25:03 2009
@@ -1,220 +1,341 @@
$dbd_oracle_mm_opts = {
- 'INC' => '-Ic:/instant10.1/sdk/include -Ic:/instant10.1/rdbms/demo -IC:/Perl/site/lib/auto/DBI/',
+ 'NAME' => 'DBD::Oracle',
+ 'INC' => '-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/',
+ 'LIBS' => [
+ '-LC:/oracle/ora92/oci/LIB/MSVC OCI'
+ ],
+ 'AUTHOR' => 'Tim Bunce ([email protected])',
+ 'DIR' => [],
+ 'DEFINE' => ' -DUTF8_SUPPORT -DORA_OCI_VERSION=\\"8.1.7.0\\"',
'dist' => {
'DIST_DEFAULT' => 'clean distcheck disttest tardist',
- 'PREOP' => '$(MAKE) -f Makefile.old distdir',
'COMPRESS' => 'gzip -v9',
+ 'PREOP' => '$(MAKE) -f Makefile.old distdir',
'SUFFIX' => 'gz'
},
- 'DEFINE' => ' -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\\"10.1.0.4\\"',
'OBJECT' => '$(O_FILES)',
+ 'clean' => {
+ 'FILES' => 'xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*'
+ },
'EXE_FILES' => [
'ora_explain'
],
- 'NAME' => 'DBD::Oracle',
- 'VERSION_FROM' => 'Oracle.pm',
- 'AUTHOR' => 'Tim Bunce ([email protected])',
- 'DIR' => [],
'ABSTRACT_FROM' => 'Oracle.pm',
- 'LIBS' => [
- '-Lc:/instant10.1/sdk/LIB/MSVC OCI'
- ],
+ 'VERSION_FROM' => 'Oracle.pm',
'PREREQ_PM' => {
'DBI' => 0
- },
- 'clean' => {
- 'FILES' => 'xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*'
- }
+ }
};
$dbd_oracle_mm_self = bless( {
- 'RM_RF' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_rf',
- 'INSTALLARCHLIB' => '$(PREFIX)\\lib',
- 'INST_SCRIPT' => 'blib\\script',
- 'INST_ARCHLIB' => 'blib\\arch',
- 'INST_LIB' => 'blib\\lib',
- 'NOECHO' => '@',
+ 'MM_Win32_VERSION' => '6.55_02',
+ 'BSLOADLIBS' => '',
+ 'ECHO_N' => '$(ABSPERLRUN) -e "print qq{@ARGV}" --',
+ 'BOOTDEP' => '',
+ 'INSTALLSITESCRIPT' => 'C:\\Perl10\\site\\bin',
+ 'CCDLFLAGS' => ' ',
+ 'LDDLFLAGS' => '-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\\Perl10\\lib\\CORE" -machine:x86',
+ 'DESTINSTALLVENDORMAN3DIR' => '$(DESTDIR)$(INSTALLVENDORMAN3DIR)',
+ 'LDLOADLIBS' => 'C:\\oracle\\ora92\\oci\\LIB\\MSVC\\OCI.lib "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\oldnames.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\kernel32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\user32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\gdi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\winspool.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\comdlg32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\advapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\shell32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ole32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\oleaut32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\netapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\uuid.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ws2_32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\mpr.lib" "C:\
\Program Files\\Microsoft Platform SDK\\Lib\\winmm.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\version.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbc32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbccp32.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\msvcrt.lib"',
+ 'INST_HTMLDIR' => 'blib\\html',
+ 'PREOP' => '$(NOECHO) $(NOOP)',
+ 'MACROSTART' => '',
+ 'DESTINSTALLVENDORHTMLDIR' => '$(DESTDIR)$(INSTALLVENDORHTMLDIR)',
+ 'XS_VERSION' => '1.17',
+ 'MAKEMAKER' => 'C:/Perl10/lib/ExtUtils/MakeMaker.pm',
+ 'USEMAKEFILE' => '-f',
+ 'RM_RF' => '$(ABSPERLRUN) -MExtUtils::Command -e "rm_rf" --',
+ 'PMLIBDIRS' => [
+ 'lib'
+ ],
+ 'INST_LIBDIR' => '$(INST_LIB)\\DBD',
+ 'SITEARCHEXP' => 'C:\\Perl10\\site\\lib',
+ 'ABSTRACT' => 'Oracle database driver for the DBI module',
+ 'INST_MAN1DIR' => 'blib\\man1',
+ 'MAN3EXT' => '3',
'XS' => {
'Oracle.xs' => 'Oracle.c'
},
- 'ABSTRACT_FROM' => 'Oracle.pm',
- 'INSTALLSCRIPT' => '$(PREFIX)\\bin',
+ 'MAKE' => 'C:\\Perl\\bin\\nmake.exe',
+ 'FULL_AR' => '',
+ 'TRUE' => '$(ABSPERLRUN) -e "exit 0" --',
+ 'FULLPERL' => 'C:\\Perl10\\bin\\perl.exe',
+ 'DIR' => $dbd_oracle_mm_opts->{'DIR'},
+ 'CONFIG' => [
+ 'ar',
+ 'cc',
+ 'cccdlflags',
+ 'ccdlflags',
+ 'dlext',
+ 'dlsrc',
+ 'exe_ext',
+ 'full_ar',
+ 'ld',
+ 'lddlflags',
+ 'ldflags',
+ 'libc',
+ 'lib_ext',
+ 'obj_ext',
+ 'osname',
+ 'osvers',
+ 'ranlib',
+ 'sitelibexp',
+ 'sitearchexp',
+ 'so',
+ 'vendorarchexp',
+ 'vendorlibexp'
+ ],
+ 'DESTDIR' => '',
+ 'INSTALLSITEHTMLDIR' => 'C:\\Perl10\\html',
+ 'MAN1PODS' => {
+ 'ora_explain' => '$(INST_MAN1DIR)\\ora_explain.$(MAN1EXT)'
+ },
+ 'INSTALLSITEBIN' => 'C:\\Perl10\\site\\bin',
+ 'CHMOD' => '$(ABSPERLRUN) -MExtUtils::Command -e "chmod" --',
+ 'DESTINSTALLVENDORLIB' => '$(DESTDIR)$(INSTALLVENDORLIB)',
+ 'OBJ_EXT' => '.obj',
+ 'C' => [
+ 'Oracle.c',
+ 'dbdimp.c',
+ 'oci8.c'
+ ],
+ 'EXE_FILES' => $dbd_oracle_mm_opts->{'EXE_FILES'},
+ 'TARFLAGS' => 'cvf',
+ 'PERL_INC' => 'C:\\Perl10\\lib\\CORE',
+ 'HAS_LINK_CODE' => 1,
+ 'INSTALLPRIVLIB' => 'C:\\Perl10\\lib',
+ 'SITELIBEXP' => 'C:\\Perl10\\site\\lib',
+ 'DESTINSTALLPRIVLIB' => '$(DESTDIR)$(INSTALLPRIVLIB)',
+ 'VENDORLIBEXP' => '',
+ 'DEFINE' => ' -DUTF8_SUPPORT -DORA_OCI_VERSION=\\"8.1.7.0\\"',
+ 'FULLEXT' => 'DBD\\Oracle',
'MAKEFILE' => 'Makefile',
- 'LIBS' => $dbd_oracle_mm_opts->{'LIBS'},
- 'TEST_F' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e test_f',
- 'PARENT_NAME' => 'DBD',
- 'DEV_NULL' => '> NUL',
- 'INST_HTMLSCRIPTDIR' => undef,
- 'INST_ARCHLIBDIR' => '$(INST_ARCHLIB)\\DBD',
- 'MV' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mv',
- 'SITELIBEXP' => 'C:\\Perl\\site\\lib',
- 'LDLOADLIBS' => 'c:\\instant10.1\\sdk\\LIB\\MSVC\\OCI.lib "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\oldnames.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\kernel32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\user32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\gdi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\winspool.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\comdlg32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\advapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\shell32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ole32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\oleaut32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\netapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\uuid.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\wsock32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\mpr.lib" "C:\\
Program Files\\Microsoft Platform SDK\\Lib\\winmm.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\version.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbc32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbccp32.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\msvcrt.lib"',
- 'O_FILES' => [
- 'Oracle.obj',
- 'dbdimp.obj',
- 'oci8.obj'
- ],
- 'DLBASE' => '$(BASEEXT)',
- 'FULLPERL' => 'C:\\Perl\\bin\\perl.exe',
- 'INST_ARCHAUTODIR' => '$(INST_ARCHLIB)\\auto\\$(FULLEXT)',
- 'LIBPERL_A' => 'libperl.lib',
- 'NOOP' => 'rem',
- 'CCDLFLAGS' => ' ',
- 'CCCDLFLAGS' => ' ',
- 'INSTALLDIRS' => 'site',
- 'INST_AUTODIR' => '$(INST_LIB)\\auto\\$(FULLEXT)',
'PL_FILES' => {
'ora_explain.PL' => 'ora_explain'
},
- 'INSTALLPRIVLIB' => '$(PREFIX)\\lib',
- 'HTMLEXT' => 'html',
- 'NAME_SYM' => 'DBD_Oracle',
- 'OSVERS' => '4.0',
- 'MAKE_APERL_FILE' => 'Makefile.aperl',
- 'PERL' => 'C:\\Perl\\bin\\perl.exe',
+ 'VENDORARCHEXP' => '',
+ 'MM_VERSION' => '6.55_02',
+ 'INSTALLSCRIPT' => 'C:\\Perl10\\bin',
+ 'CC' => 'cl',
+ 'LIBS' => $dbd_oracle_mm_opts->{'LIBS'},
+ 'DLEXT' => 'dll',
+ 'EQUALIZE_TIMESTAMP' => '$(ABSPERLRUN) -MExtUtils::Command -e "eqtime" --',
+ 'XS_VERSION_MACRO' => 'XS_VERSION',
+ 'VERBINST' => 0,
+ 'TAR' => 'tar',
+ 'ABSPERL' => '$(PERL)',
+ 'FALSE' => '$(ABSPERLRUN) -e "exit 1" --',
+ 'DESTINSTALLARCHLIB' => '$(DESTDIR)$(INSTALLARCHLIB)',
+ 'INST_STATIC' => '$(INST_ARCHAUTODIR)\\$(BASEEXT)$(LIB_EXT)',
+ 'DISTVNAME' => 'DBD-Oracle-1.17',
+ 'ABSTRACT_FROM' => 'Oracle.pm',
+ 'DESTINSTALLSCRIPT' => '$(DESTDIR)$(INSTALLSCRIPT)',
+ 'INST_AUTODIR' => '$(INST_LIB)\\auto\\$(FULLEXT)',
'RESULT' => [
'# This Makefile is for the DBD::Oracle extension to perl.
#
# It was generated automatically by MakeMaker version
-# 5.45 (Revision: 1.222) from the contents of
+# 6.55_02 (Revision: 65502) from the contents of
# Makefile.PL. Don\'t edit this file, edit Makefile.PL instead.
#
-# ANY CHANGES MADE HERE WILL BE LOST!
+# ANY CHANGES MADE HERE WILL BE LOST!
#
# MakeMaker ARGV: ()
#
-# MakeMaker Parameters:
',
- '# ABSTRACT_FROM => q[Oracle.pm]',
- '# AUTHOR => q[Tim Bunce ([email protected])]',
- '# DEFINE => q[ -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\\"10.1.0.4\\"]',
- '# DIR => []',
- '# EXE_FILES => [q[ora_explain]]',
- '# INC => q[-Ic:/instant10.1/sdk/include -Ic:/instant10.1/rdbms/demo -IC:/Perl/site/lib/auto/DBI/]',
- '# LIBS => [q[-Lc:/instant10.1/sdk/LIB/MSVC OCI]]',
- '# NAME => q[DBD::Oracle]',
- '# OBJECT => q[$(O_FILES)]',
- '# PREREQ_PM => { DBI=>q[0] }',
- '# VERSION_FROM => q[Oracle.pm]',
- '# clean => { FILES=>q[xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*] }',
- '# dist => { DIST_DEFAULT=>q[clean distcheck disttest tardist], PREOP=>q[$(MAKE) -f Makefile.old distdir], COMPRESS=>q[gzip -v9], SUFFIX=>q[gz] }',
+ '# MakeMaker Parameters:
+',
+ '# ABSTRACT_FROM => q[Oracle.pm]',
+ '# AUTHOR => q[Tim Bunce ([email protected])]',
+ '# BUILD_REQUIRES => { }',
+ '# DEFINE => q[ -DUTF8_SUPPORT -DORA_OCI_VERSION=\\"8.1.7.0\\"]',
+ '# DIR => []',
+ '# EXE_FILES => [q[ora_explain]]',
+ '# INC => q[-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/]',
+ '# LIBS => [q[-LC:/oracle/ora92/oci/LIB/MSVC OCI]]',
+ '# NAME => q[DBD::Oracle]',
+ '# OBJECT => q[$(O_FILES)]',
+ '# PREREQ_PM => { DBI=>q[0] }',
+ '# VERSION_FROM => q[Oracle.pm]',
+ '# clean => { FILES=>q[xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*] }',
+ '# dist => { DIST_DEFAULT=>q[clean distcheck disttest tardist], COMPRESS=>q[gzip -v9], PREOP=>q[$(MAKE) -f Makefile.old distdir], SUFFIX=>q[gz] }',
'
# --- MakeMaker post_initialize section:'
],
- 'INSTALLHTMLSCRIPTDIR' => undef,
- 'HTMLLIBPODS' => {},
- 'EXE_EXT' => '.exe',
- 'LDFLAGS' => '-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\\Perl\\lib\\CORE" -machine:x86',
- 'CC' => 'cl',
- 'INSTALLHTMLSITELIBDIR' => undef,
- 'PERLMAINCC' => '$(CC)',
- 'XS_VERSION' => '1.17',
- 'DEFINE' => ' -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\\"10.1.0.4\\"',
+ 'FULLPERLRUNINST' => '$(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"',
'MAP_TARGET' => 'perl',
- 'INSTALLSITEARCH' => 'C:\\Perl\\site\\lib',
- 'INST_BIN' => 'blib\\bin',
- 'INST_HTMLLIBDIR' => undef,
- 'TOUCH' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e touch',
- 'CP' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e cp',
- 'PERL_SRC' => undef,
- 'INST_LIBDIR' => '$(INST_LIB)\\DBD',
- 'EXTRALIBS' => 'c:\\instant10.1\\sdk\\LIB\\MSVC\\OCI.lib "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\oldnames.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\kernel32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\user32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\gdi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\winspool.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\comdlg32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\advapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\shell32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ole32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\oleaut32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\netapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\uuid.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\wsock32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\mpr.lib" "C:\\P
rogram Files\\Microsoft Platform SDK\\Lib\\winmm.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\version.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbc32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbccp32.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\msvcrt.lib"',
- 'OSNAME' => 'MSWin32',
- 'EXE_FILES' => $dbd_oracle_mm_opts->{'EXE_FILES'},
- 'INSTALLHTMLPRIVLIBDIR' => undef,
- 'CHMOD' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e chmod',
- 'LDFROM' => '$(OBJECT)',
- 'PMLIBDIRS' => [
- 'lib'
- ],
- 'DLEXT' => 'dll',
- 'C' => [
- 'Oracle.c',
- 'dbdimp.c',
- 'oci8.c'
- ],
- 'OBJ_EXT' => '.obj',
- 'HTMLSCRIPTPODS' => {},
+ 'INSTALLMAN3DIR' => 'C:\\Perl10\\man\\man3',
+ 'PERLPREFIX' => 'C:\\Perl10',
+ 'AUTHOR' => 'Tim Bunce ([email protected])',
+ 'INC' => '-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/',
+ 'LDFLAGS' => '-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\\Perl10\\lib\\CORE" -machine:x86',
+ 'INSTALLVENDORHTMLDIR' => 'C:\\Perl10\\html',
+ 'dist' => $dbd_oracle_mm_opts->{'dist'},
+ 'INSTALLVENDORMAN1DIR' => '',
+ 'MAKEFILE_OLD' => 'Makefile.old',
'H' => [
'Oracle.h',
'dbdimp.h',
'dbivport.h',
'ocitrace.h'
],
- 'INSTALLBIN' => '$(PREFIX)\\bin',
- 'FIRST_MAKEFILE' => 'Makefile',
- 'CONFIG' => [
- 'ar',
- 'cc',
- 'cccdlflags',
- 'ccdlflags',
- 'dlext',
- 'dlsrc',
- 'ld',
- 'lddlflags',
- 'ldflags',
- 'libc',
- 'lib_ext',
- 'obj_ext',
- 'osname',
- 'osvers',
- 'ranlib',
- 'sitelibexp',
- 'sitearchexp',
- 'so',
- 'exe_ext',
- 'full_ar'
- ],
- 'SKIPHASH' => {},
- 'RANLIB' => 'rem',
- 'clean' => $dbd_oracle_mm_opts->{'clean'},
- 'DLSRC' => 'dl_win32.xs',
- 'MAN1PODS' => {},
- 'SITEARCHEXP' => 'C:\\Perl\\site\\lib',
- 'PERL_LIB' => 'C:\\Perl\\lib',
- 'INST_EXE' => 'blib\\script',
- 'PERL_INC' => 'C:\\Perl\\lib\\CORE',
- 'AUTHOR' => 'Tim Bunce ([email protected])',
- 'VERSION' => '1.17',
- 'DIR' => $dbd_oracle_mm_opts->{'DIR'},
- 'SO' => 'dll',
- 'MAN3PODS' => {},
- 'INC' => '-Ic:/instant10.1/sdk/include -Ic:/instant10.1/rdbms/demo -IC:/Perl/site/lib/auto/DBI/',
- 'LD' => 'link',
- 'DISTNAME' => 'DBD-Oracle',
+ 'PERLRUNINST' => '$(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"',
+ 'CI' => 'ci -u',
+ 'DESTINSTALLBIN' => '$(DESTDIR)$(INSTALLBIN)',
+ 'DESTINSTALLVENDORMAN1DIR' => '$(DESTDIR)$(INSTALLVENDORMAN1DIR)',
+ 'INST_ARCHLIBDIR' => '$(INST_ARCHLIB)\\DBD',
'OBJECT' => '$(O_FILES)',
+ 'BUILD_REQUIRES' => {},
+ 'NAME_SYM' => 'DBD_Oracle',
+ 'RANLIB' => 'rem',
+ 'DIRFILESEP' => '^\\',
+ 'POSTOP' => '$(NOECHO) $(NOOP)',
+ 'INSTALLVENDORBIN' => '',
+ 'COMPRESS' => 'gzip --best',
+ 'SUFFIX' => '.gz',
+ 'MAN1EXT' => '1',
+ 'PERL_LIB' => 'C:\\Perl10\\lib',
+ 'ECHO' => '$(ABSPERLRUN) -l -e "print qq{@ARGV}" --',
+ 'EXPORT_LIST' => '$(BASEEXT).def',
+ 'INST_BOOT' => '$(INST_ARCHAUTODIR)\\$(BASEEXT).bs',
+ 'MV' => '$(ABSPERLRUN) -MExtUtils::Command -e "mv" --',
+ 'OSVERS' => '5.00',
'LD_RUN_PATH' => '',
+ 'MKPATH' => '$(ABSPERLRUN) -MExtUtils::Command -e "mkpath" --',
+ 'DESTINSTALLMAN1DIR' => '$(DESTDIR)$(INSTALLMAN1DIR)',
+ 'OSNAME' => 'MSWin32',
+ 'AR' => 'lib',
+ 'O_FILES' => [
+ 'Oracle.obj',
+ 'dbdimp.obj',
+ 'oci8.obj'
+ ],
+ 'FIXIN' => 'pl2bat.bat',
+ 'DIST_DEFAULT' => 'tardist',
+ 'SKIPHASH' => {},
+ 'NOOP' => 'rem',
+ 'PERL_ARCHLIB' => 'C:\\Perl10\\lib',
+ 'VERSION_SYM' => '1_17',
+ 'VERSION_MACRO' => 'VERSION',
+ 'WARN_IF_OLD_PACKLIST' => '$(ABSPERLRUN) -MExtUtils::Command::MM -e "warn_if_old_packlist" --',
+ 'MM_REVISION' => 65502,
+ 'RM_F' => '$(ABSPERLRUN) -MExtUtils::Command -e "rm_f" --',
+ 'LIBC' => 'msvcrt.lib',
+ 'UNINST' => 0,
+ 'PERLRUN' => '$(PERL)',
+ 'LINKTYPE' => 'dynamic',
+ 'INSTALLVENDORLIB' => '',
+ 'DEV_NULL' => '> NUL',
+ 'DLSRC' => 'dl_win32.xs',
+ 'INST_ARCHAUTODIR' => '$(INST_ARCHLIB)\\auto\\$(FULLEXT)',
+ 'DESTINSTALLSITEBIN' => '$(DESTDIR)$(INSTALLSITEBIN)',
+ 'MACROEND' => '',
+ 'ARGS' => {
+ 'NAME' => 'DBD::Oracle',
+ 'INC' => '-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/',
+ 'LIBS' => $dbd_oracle_mm_opts->{'LIBS'},
+ 'AUTHOR' => 'Tim Bunce ([email protected])',
+ 'DIR' => $dbd_oracle_mm_opts->{'DIR'},
+ 'DEFINE' => ' -DUTF8_SUPPORT -DORA_OCI_VERSION=\\"8.1.7.0\\"',
+ 'dist' => $dbd_oracle_mm_opts->{'dist'},
+ 'OBJECT' => '$(O_FILES)',
+ 'clean' => $dbd_oracle_mm_opts->{'clean'},
+ 'EXE_FILES' => $dbd_oracle_mm_opts->{'EXE_FILES'},
+ 'ABSTRACT_FROM' => 'Oracle.pm',
+ 'VERSION_FROM' => 'Oracle.pm',
+ 'PREREQ_PM' => $dbd_oracle_mm_opts->{'PREREQ_PM'}
+ },
+ 'CP' => '$(ABSPERLRUN) -MExtUtils::Command -e "cp" --',
+ 'DEFINE_VERSION' => '-D$(VERSION_MACRO)=\\"$(VERSION)\\"',
+ 'PREREQ_PM' => $dbd_oracle_mm_opts->{'PREREQ_PM'},
+ 'DESTINSTALLSITELIB' => '$(DESTDIR)$(INSTALLSITELIB)',
+ 'INST_LIB' => 'blib\\lib',
+ 'INST_DYNAMIC' => '$(INST_ARCHAUTODIR)\\$(DLBASE).$(DLEXT)',
+ 'FULLPERLRUN' => '$(FULLPERL)',
+ 'INSTALLSITEMAN1DIR' => '$(INSTALLMAN1DIR)',
+ 'DESTINSTALLSITEMAN3DIR' => '$(DESTDIR)$(INSTALLSITEMAN3DIR)',
+ 'MOD_INSTALL' => '$(ABSPERLRUN) -MExtUtils::Install -e "install([ from_to => {@ARGV}, verbose => \'$(VERBINST)\', uninstall_shadows => \'$(UNINST)\', dir_mode => \'$(PERM_DIR)\' ]);" --',
+ 'DLBASE' => '$(BASEEXT)',
+ 'INST_MAN3DIR' => 'blib\\man3',
+ 'CCCDLFLAGS' => ' ',
+ 'INSTALLSITEARCH' => 'C:\\Perl10\\site\\lib',
+ 'PMLIBPARENTDIRS' => [
+ 'lib'
+ ],
+ 'XS_DEFINE_VERSION' => '-D$(XS_VERSION_MACRO)=\\"$(XS_VERSION)\\"',
+ 'DESTINSTALLSITESCRIPT' => '$(DESTDIR)$(INSTALLSITESCRIPT)',
+ 'SHAR' => 'shar',
+ 'PERLMAINCC' => '$(CC)',
+ 'RCS_LABEL' => 'rcs -Nv$(VERSION_SYM): -q',
'NAME' => 'DBD::Oracle',
+ 'PARENT_NAME' => 'DBD',
+ 'INSTALLSITELIB' => 'C:\\Perl10\\site\\lib',
+ 'MAKE_APERL_FILE' => 'Makefile.aperl',
+ 'ZIP' => 'zip',
+ 'VERSION_FROM' => 'Oracle.pm',
+ 'SITEPREFIX' => 'C:\\Perl10\\site',
+ 'INSTALLVENDORSCRIPT' => '',
+ 'TO_UNIX' => '$(NOECHO) $(NOOP)',
+ 'PERL' => 'C:\\Perl10\\bin\\perl.exe',
+ 'DESTINSTALLVENDORARCH' => '$(DESTDIR)$(INSTALLVENDORARCH)',
+ 'NOECHO' => '@',
+ 'DESTINSTALLVENDORBIN' => '$(DESTDIR)$(INSTALLVENDORBIN)',
+ 'DESTINSTALLHTMLDIR' => '$(DESTDIR)$(INSTALLHTMLDIR)',
+ 'PERM_RW' => 644,
'UMASK_NULL' => 'umask 0',
- 'PERL_ARCHLIB' => 'C:\\Perl\\lib',
- 'INSTALLMAN1DIR' => '',
- 'INST_MAN1DIR' => '',
+ 'DOC_INSTALL' => '$(ABSPERLRUN) -MExtUtils::Command::MM -e "perllocal_install" --',
+ 'TOUCH' => '$(ABSPERLRUN) -MExtUtils::Command -e "touch" --',
+ 'LD' => 'link',
+ 'PERL_SRC' => undef,
+ 'DESTINSTALLMAN3DIR' => '$(DESTDIR)$(INSTALLMAN3DIR)',
+ 'ZIPFLAGS' => '-r',
+ 'PERM_DIR' => 755,
+ 'DISTNAME' => 'DBD-Oracle',
+ 'INST_BIN' => 'blib\\bin',
+ 'FIRST_MAKEFILE' => 'Makefile',
+ 'VENDORPREFIX' => '',
+ 'LDFROM' => '$(OBJECT)',
+ 'clean' => $dbd_oracle_mm_opts->{'clean'},
+ 'PREFIX' => '$(SITEPREFIX)',
+ 'INSTALLDIRS' => 'site',
+ 'INST_ARCHLIB' => 'blib\\arch',
+ 'INSTALLHTMLDIR' => 'C:\\Perl10\\html',
+ 'PERL_ARCHIVE' => '$(PERL_INC)\\perl510.lib',
+ 'INSTALLVENDORARCH' => '',
+ 'DESTINSTALLSITEMAN1DIR' => '$(DESTDIR)$(INSTALLSITEMAN1DIR)',
+ 'INSTALLBIN' => 'C:\\Perl10\\bin',
+ 'INSTALLSITEMAN3DIR' => '$(INSTALLMAN3DIR)',
+ 'PERL_ARCHIVE_AFTER' => '',
+ 'MAN3PODS' => {
+ 'Oracle.pm' => '$(INST_MAN3DIR)\\DBD\\Oracle.$(MAN3EXT)',
+ 'Oraperl.pm' => '$(INST_MAN3DIR)\\DBD\\Oraperl.$(MAN3EXT)'
+ },
+ 'LIBPERL_A' => 'libperl.lib',
+ 'INSTALLARCHLIB' => 'C:\\Perl10\\lib',
+ 'LIB_EXT' => '.lib',
+ 'DESTINSTALLSITEHTMLDIR' => '$(DESTDIR)$(INSTALLSITEHTMLDIR)',
+ 'AR_STATIC_ARGS' => 'cr',
+ 'INSTALLVENDORMAN3DIR' => '',
+ 'EXE_EXT' => '.exe',
+ 'EXTRALIBS' => 'C:\\oracle\\ora92\\oci\\LIB\\MSVC\\OCI.lib "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\oldnames.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\kernel32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\user32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\gdi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\winspool.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\comdlg32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\advapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\shell32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ole32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\oleaut32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\netapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\uuid.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ws2_32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\mpr.lib" "C:\\
Program Files\\Microsoft Platform SDK\\Lib\\winmm.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\version.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbc32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbccp32.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\msvcrt.lib"',
+ 'PERM_RWX' => 755,
+ 'DESTINSTALLSITEARCH' => '$(DESTDIR)$(INSTALLSITEARCH)',
+ 'ABSPERLRUN' => '$(ABSPERL)',
+ 'DESTINSTALLVENDORSCRIPT' => '$(DESTDIR)$(INSTALLVENDORSCRIPT)',
'BASEEXT' => 'Oracle',
- 'VERSION_SYM' => '1_17',
- 'PREREQ_PM' => $dbd_oracle_mm_opts->{'PREREQ_PM'},
- 'INSTALLMAN3DIR' => '',
- 'MAN1EXT' => '1',
- 'INST_MAN3DIR' => '',
+ 'TEST_F' => '$(ABSPERLRUN) -MExtUtils::Command -e "test_f" --',
'PM' => {
+ 'Oracle.pm' => '$(INST_LIB)\\DBD\\Oracle.pm',
'oraperl.ph' => '$(INST_LIB)/oraperl.ph',
- 'lib/DBD/Oracle/GetInfo.pm' => '$(INST_LIB)\\DBD\\Oracle\\GetInfo.pm',
- 'Oracle.pm' => '$(INST_LIBDIR)\\Oracle.pm',
- 'mk.pm' => '$(INST_LIBDIR)\\mk.pm',
- 'Oraperl.pm' => '$(INST_LIB)/Oraperl.pm'
+ 'Oraperl.pm' => '$(INST_LIB)/Oraperl.pm',
+ 'lib/DBD/Oracle/GetInfo.pm' => 'blib\\lib\\DBD\\Oracle\\GetInfo.pm',
+ 'mk.pm' => '$(INST_LIB)\\DBD\\mk.pm'
},
- 'dist' => $dbd_oracle_mm_opts->{'dist'},
- 'VERSION_FROM' => 'Oracle.pm',
- 'LIB_EXT' => '.lib',
- 'FULL_AR' => '',
- 'INSTALLSITELIB' => 'C:\\Perl\\site\\lib',
- 'MAN3EXT' => '3',
- 'LDDLFLAGS' => '-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\\Perl\\lib\\CORE" -machine:x86',
- 'AR_STATIC_ARGS' => 'cr',
- 'PREFIX' => 'C:\\Perl',
- 'FULLEXT' => 'DBD\\Oracle',
- 'AR' => 'lib',
- 'BOOTDEP' => '',
- 'BSLOADLIBS' => '',
- 'LIBC' => 'msvcrt.lib',
- 'RM_F' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f',
- 'LINKTYPE' => 'dynamic'
+ 'ABSPERLRUNINST' => '$(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"',
+ 'PERL_CORE' => 0,
+ 'INSTALLMAN1DIR' => 'C:\\Perl10\\man\\man1',
+ 'SO' => 'dll',
+ 'VERSION' => '1.17',
+ 'DIST_CP' => 'best',
+ 'INST_SCRIPT' => 'blib\\script',
+ 'UNINSTALL' => '$(ABSPERLRUN) -MExtUtils::Command::MM -e "uninstall" --'
}, 'PACK001' );
Modified: dbd-oracle/branches/DBD-Oracle8/dbdimp.c
==============================================================================
--- dbd-oracle/branches/DBD-Oracle8/dbdimp.c (original)
+++ dbd-oracle/branches/DBD-Oracle8/dbdimp.c Mon Dec 21 10:25:03 2009
@@ -17,7 +17,7 @@
#include "w32api/winbase.h"
#endif /* __CYGWIN32__ */
-#include "Oracle.h"
+#include "Oracle_8.h"
#if defined(CAN_USE_PRO_C)
/* #include <sql2oci.h> for SQL_SINGLE_RCTX but causes clashes */
Modified: dbd-oracle/branches/DBD-Oracle8/dbdimp.obj
==============================================================================
Binary files. No diff available.
Modified: dbd-oracle/branches/DBD-Oracle8/mk.pm
==============================================================================
--- dbd-oracle/branches/DBD-Oracle8/mk.pm (original)
+++ dbd-oracle/branches/DBD-Oracle8/mk.pm Mon Dec 21 10:25:03 2009
@@ -1,147 +1,65 @@
$dbd_oracle_mm_opts = {
- 'INC' => '-Ic:/instant10.1/sdk/include -Ic:/instant10.1/rdbms/demo -IC:/Perl/site/lib/auto/DBI/',
+ 'NAME' => 'DBD::Oracle_8',
+ 'INC' => '-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/',
+ 'LIBS' => [
+ '-LC:/oracle/ora92/oci/LIB/MSVC OCI'
+ ],
+ 'AUTHOR' => 'Tim Bunce ([email protected])',
+ 'DIR' => [],
+ 'DEFINE' => ' -DUTF8_SUPPORT -DORA_OCI_VERSION=\\"8.1.7.0\\"',
'dist' => {
'DIST_DEFAULT' => 'clean distcheck disttest tardist',
- 'PREOP' => '$(MAKE) -f Makefile.old distdir',
'COMPRESS' => 'gzip -v9',
+ 'PREOP' => '$(MAKE) -f Makefile.old distdir',
'SUFFIX' => 'gz'
},
- 'DEFINE' => ' -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\\"10.1.0.4\\"',
'OBJECT' => '$(O_FILES)',
+ 'clean' => {
+ 'FILES' => 'xstmp.c Oracle_8.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*'
+ },
'EXE_FILES' => [
'ora_explain'
],
- 'NAME' => 'DBD::Oracle',
- 'VERSION_FROM' => 'Oracle.pm',
- 'AUTHOR' => 'Tim Bunce ([email protected])',
- 'DIR' => [],
- 'ABSTRACT_FROM' => 'Oracle.pm',
- 'LIBS' => [
- '-Lc:/instant10.1/sdk/LIB/MSVC OCI'
- ],
+ 'ABSTRACT_FROM' => 'Oracle_8.pm',
+ 'VERSION_FROM' => 'Oracle_8.pm',
'PREREQ_PM' => {
'DBI' => 0
- },
- 'clean' => {
- 'FILES' => 'xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*'
- }
+ }
};
$dbd_oracle_mm_self = bless( {
- 'RM_RF' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_rf',
- 'INSTALLARCHLIB' => '$(PREFIX)\\lib',
- 'INST_SCRIPT' => 'blib\\script',
- 'INST_ARCHLIB' => 'blib\\arch',
- 'INST_LIB' => 'blib\\lib',
- 'NOECHO' => '@',
- 'XS' => {
- 'Oracle.xs' => 'Oracle.c'
- },
- 'ABSTRACT_FROM' => 'Oracle.pm',
- 'INSTALLSCRIPT' => '$(PREFIX)\\bin',
- 'MAKEFILE' => 'Makefile',
- 'LIBS' => $dbd_oracle_mm_opts->{'LIBS'},
- 'TEST_F' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e test_f',
- 'PARENT_NAME' => 'DBD',
- 'DEV_NULL' => '> NUL',
- 'INST_HTMLSCRIPTDIR' => undef,
- 'INST_ARCHLIBDIR' => '$(INST_ARCHLIB)\\DBD',
- 'MV' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mv',
- 'SITELIBEXP' => 'C:\\Perl\\site\\lib',
- 'LDLOADLIBS' => 'c:\\instant10.1\\sdk\\LIB\\MSVC\\OCI.lib "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\oldnames.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\kernel32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\user32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\gdi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\winspool.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\comdlg32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\advapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\shell32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ole32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\oleaut32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\netapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\uuid.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\wsock32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\mpr.lib" "C:\\
Program Files\\Microsoft Platform SDK\\Lib\\winmm.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\version.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbc32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbccp32.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\msvcrt.lib"',
- 'O_FILES' => [
- 'Oracle.obj',
- 'dbdimp.obj',
- 'oci8.obj'
- ],
- 'DLBASE' => '$(BASEEXT)',
- 'FULLPERL' => 'C:\\Perl\\bin\\perl.exe',
- 'INST_ARCHAUTODIR' => '$(INST_ARCHLIB)\\auto\\$(FULLEXT)',
- 'LIBPERL_A' => 'libperl.lib',
- 'NOOP' => 'rem',
+ 'MM_Win32_VERSION' => '6.55_02',
+ 'BSLOADLIBS' => '',
+ 'ECHO_N' => '$(ABSPERLRUN) -e "print qq{@ARGV}" --',
+ 'BOOTDEP' => '',
+ 'INSTALLSITESCRIPT' => 'C:\\Perl10\\site\\bin',
'CCDLFLAGS' => ' ',
- 'CCCDLFLAGS' => ' ',
- 'INSTALLDIRS' => 'site',
- 'INST_AUTODIR' => '$(INST_LIB)\\auto\\$(FULLEXT)',
- 'PL_FILES' => {
- 'ora_explain.PL' => 'ora_explain'
- },
- 'INSTALLPRIVLIB' => '$(PREFIX)\\lib',
- 'HTMLEXT' => 'html',
- 'NAME_SYM' => 'DBD_Oracle',
- 'OSVERS' => '4.0',
- 'MAKE_APERL_FILE' => 'Makefile.aperl',
- 'PERL' => 'C:\\Perl\\bin\\perl.exe',
- 'RESULT' => [
- '# This Makefile is for the DBD::Oracle extension to perl.
-#
-# It was generated automatically by MakeMaker version
-# 5.45 (Revision: 1.222) from the contents of
-# Makefile.PL. Don\'t edit this file, edit Makefile.PL instead.
-#
-# ANY CHANGES MADE HERE WILL BE LOST!
-#
-# MakeMaker ARGV: ()
-#
-# MakeMaker Parameters:
-',
- '# ABSTRACT_FROM => q[Oracle.pm]',
- '# AUTHOR => q[Tim Bunce ([email protected])]',
- '# DEFINE => q[ -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\\"10.1.0.4\\"]',
- '# DIR => []',
- '# EXE_FILES => [q[ora_explain]]',
- '# INC => q[-Ic:/instant10.1/sdk/include -Ic:/instant10.1/rdbms/demo -IC:/Perl/site/lib/auto/DBI/]',
- '# LIBS => [q[-Lc:/instant10.1/sdk/LIB/MSVC OCI]]',
- '# NAME => q[DBD::Oracle]',
- '# OBJECT => q[$(O_FILES)]',
- '# PREREQ_PM => { DBI=>q[0] }',
- '# VERSION_FROM => q[Oracle.pm]',
- '# clean => { FILES=>q[xstmp.c Oracle.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*] }',
- '# dist => { DIST_DEFAULT=>q[clean distcheck disttest tardist], PREOP=>q[$(MAKE) -f Makefile.old distdir], COMPRESS=>q[gzip -v9], SUFFIX=>q[gz] }',
- '
-# --- MakeMaker post_initialize section:'
- ],
- 'INSTALLHTMLSCRIPTDIR' => undef,
- 'HTMLLIBPODS' => {},
- 'EXE_EXT' => '.exe',
- 'LDFLAGS' => '-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\\Perl\\lib\\CORE" -machine:x86',
- 'CC' => 'cl',
- 'INSTALLHTMLSITELIBDIR' => undef,
- 'PERLMAINCC' => '$(CC)',
- 'XS_VERSION' => '1.17',
- 'DEFINE' => ' -DUTF8_SUPPORT -DNEW_OCI_INIT -DORA_OCI_VERSION=\\"10.1.0.4\\"',
- 'MAP_TARGET' => 'perl',
- 'INSTALLSITEARCH' => 'C:\\Perl\\site\\lib',
- 'INST_BIN' => 'blib\\bin',
- 'INST_HTMLLIBDIR' => undef,
- 'TOUCH' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e touch',
- 'CP' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e cp',
- 'PERL_SRC' => undef,
- 'INST_LIBDIR' => '$(INST_LIB)\\DBD',
- 'EXTRALIBS' => 'c:\\instant10.1\\sdk\\LIB\\MSVC\\OCI.lib "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\oldnames.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\kernel32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\user32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\gdi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\winspool.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\comdlg32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\advapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\shell32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ole32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\oleaut32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\netapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\uuid.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\wsock32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\mpr.lib" "C:\\P
rogram Files\\Microsoft Platform SDK\\Lib\\winmm.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\version.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbc32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbccp32.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\msvcrt.lib"',
- 'OSNAME' => 'MSWin32',
- 'EXE_FILES' => $dbd_oracle_mm_opts->{'EXE_FILES'},
- 'INSTALLHTMLPRIVLIBDIR' => undef,
- 'CHMOD' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e chmod',
- 'LDFROM' => '$(OBJECT)',
+ 'LDDLFLAGS' => '-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\\Perl10\\lib\\CORE" -machine:x86',
+ 'DESTINSTALLVENDORMAN3DIR' => '$(DESTDIR)$(INSTALLVENDORMAN3DIR)',
+ 'LDLOADLIBS' => 'C:\\oracle\\ora92\\oci\\LIB\\MSVC\\OCI.lib "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\oldnames.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\kernel32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\user32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\gdi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\winspool.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\comdlg32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\advapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\shell32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ole32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\oleaut32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\netapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\uuid.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ws2_32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\mpr.lib" "C:\
\Program Files\\Microsoft Platform SDK\\Lib\\winmm.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\version.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbc32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbccp32.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\msvcrt.lib"',
+ 'INST_HTMLDIR' => 'blib\\html',
+ 'PREOP' => '$(NOECHO) $(NOOP)',
+ 'MACROSTART' => '',
+ 'DESTINSTALLVENDORHTMLDIR' => '$(DESTDIR)$(INSTALLVENDORHTMLDIR)',
+ 'XS_VERSION' => '0.01',
+ 'MAKEMAKER' => 'C:/Perl10/lib/ExtUtils/MakeMaker.pm',
+ 'USEMAKEFILE' => '-f',
+ 'RM_RF' => '$(ABSPERLRUN) -MExtUtils::Command -e "rm_rf" --',
'PMLIBDIRS' => [
'lib'
],
- 'DLEXT' => 'dll',
- 'C' => [
- 'Oracle.c',
- 'dbdimp.c',
- 'oci8.c'
- ],
- 'OBJ_EXT' => '.obj',
- 'HTMLSCRIPTPODS' => {},
- 'H' => [
- 'Oracle.h',
- 'dbdimp.h',
- 'dbivport.h',
- 'ocitrace.h'
- ],
- 'INSTALLBIN' => '$(PREFIX)\\bin',
- 'FIRST_MAKEFILE' => 'Makefile',
+ 'INST_LIBDIR' => '$(INST_LIB)\\DBD',
+ 'SITEARCHEXP' => 'C:\\Perl10\\site\\lib',
+ 'ABSTRACT' => undef,
+ 'INST_MAN1DIR' => 'blib\\man1',
+ 'MAN3EXT' => '3',
+ 'XS' => {
+ 'Oracle_8.xs' => 'Oracle_8.c'
+ },
+ 'MAKE' => 'C:\\Perl\\bin\\nmake.exe',
+ 'FULL_AR' => '',
+ 'TRUE' => '$(ABSPERLRUN) -e "exit 0" --',
+ 'FULLPERL' => 'C:\\Perl10\\bin\\perl.exe',
+ 'DIR' => $dbd_oracle_mm_opts->{'DIR'},
'CONFIG' => [
'ar',
'cc',
@@ -149,6 +67,8 @@
'ccdlflags',
'dlext',
'dlsrc',
+ 'exe_ext',
+ 'full_ar',
'ld',
'lddlflags',
'ldflags',
@@ -161,60 +81,261 @@
'sitelibexp',
'sitearchexp',
'so',
- 'exe_ext',
- 'full_ar'
+ 'vendorarchexp',
+ 'vendorlibexp'
],
- 'SKIPHASH' => {},
- 'RANLIB' => 'rem',
- 'clean' => $dbd_oracle_mm_opts->{'clean'},
- 'DLSRC' => 'dl_win32.xs',
- 'MAN1PODS' => {},
- 'SITEARCHEXP' => 'C:\\Perl\\site\\lib',
- 'PERL_LIB' => 'C:\\Perl\\lib',
- 'INST_EXE' => 'blib\\script',
- 'PERL_INC' => 'C:\\Perl\\lib\\CORE',
+ 'DESTDIR' => '',
+ 'INSTALLSITEHTMLDIR' => 'C:\\Perl10\\html',
+ 'MAN1PODS' => {
+ 'ora_explain' => '$(INST_MAN1DIR)\\ora_explain.$(MAN1EXT)'
+ },
+ 'INSTALLSITEBIN' => 'C:\\Perl10\\site\\bin',
+ 'CHMOD' => '$(ABSPERLRUN) -MExtUtils::Command -e "chmod" --',
+ 'DESTINSTALLVENDORLIB' => '$(DESTDIR)$(INSTALLVENDORLIB)',
+ 'OBJ_EXT' => '.obj',
+ 'C' => [
+ 'Oracle_8.c',
+ 'dbdimp.c',
+ 'oci8.c'
+ ],
+ 'EXE_FILES' => $dbd_oracle_mm_opts->{'EXE_FILES'},
+ 'TARFLAGS' => 'cvf',
+ 'PERL_INC' => 'C:\\Perl10\\lib\\CORE',
+ 'HAS_LINK_CODE' => 1,
+ 'INSTALLPRIVLIB' => 'C:\\Perl10\\lib',
+ 'SITELIBEXP' => 'C:\\Perl10\\site\\lib',
+ 'DESTINSTALLPRIVLIB' => '$(DESTDIR)$(INSTALLPRIVLIB)',
+ 'VENDORLIBEXP' => '',
+ 'DEFINE' => ' -DUTF8_SUPPORT -DORA_OCI_VERSION=\\"8.1.7.0\\"',
+ 'FULLEXT' => 'DBD\\Oracle_8',
+ 'MAKEFILE' => 'Makefile',
+ 'PL_FILES' => {
+ 'ora_explain.PL' => 'ora_explain'
+ },
+ 'VENDORARCHEXP' => '',
+ 'MM_VERSION' => '6.55_02',
+ 'INSTALLSCRIPT' => 'C:\\Perl10\\bin',
+ 'CC' => 'cl',
+ 'LIBS' => $dbd_oracle_mm_opts->{'LIBS'},
+ 'DLEXT' => 'dll',
+ 'EQUALIZE_TIMESTAMP' => '$(ABSPERLRUN) -MExtUtils::Command -e "eqtime" --',
+ 'XS_VERSION_MACRO' => 'XS_VERSION',
+ 'VERBINST' => 0,
+ 'TAR' => 'tar',
+ 'ABSPERL' => '$(PERL)',
+ 'FALSE' => '$(ABSPERLRUN) -e "exit 1" --',
+ 'DESTINSTALLARCHLIB' => '$(DESTDIR)$(INSTALLARCHLIB)',
+ 'INST_STATIC' => '$(INST_ARCHAUTODIR)\\$(BASEEXT)$(LIB_EXT)',
+ 'DISTVNAME' => 'DBD-Oracle_8-0.01',
+ 'ABSTRACT_FROM' => 'Oracle_8.pm',
+ 'DESTINSTALLSCRIPT' => '$(DESTDIR)$(INSTALLSCRIPT)',
+ 'INST_AUTODIR' => '$(INST_LIB)\\auto\\$(FULLEXT)',
+ 'RESULT' => [
+ '# This Makefile is for the DBD::Oracle_8 extension to perl.
+#
+# It was generated automatically by MakeMaker version
+# 6.55_02 (Revision: 65502) from the contents of
+# Makefile.PL. Don\'t edit this file, edit Makefile.PL instead.
+#
+# ANY CHANGES MADE HERE WILL BE LOST!
+#
+# MakeMaker ARGV: ()
+#
+',
+ '# MakeMaker Parameters:
+',
+ '# ABSTRACT_FROM => q[Oracle_8.pm]',
+ '# AUTHOR => q[Tim Bunce ([email protected])]',
+ '# BUILD_REQUIRES => { }',
+ '# DEFINE => q[ -DUTF8_SUPPORT -DORA_OCI_VERSION=\\"8.1.7.0\\"]',
+ '# DIR => []',
+ '# EXE_FILES => [q[ora_explain]]',
+ '# INC => q[-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/]',
+ '# LIBS => [q[-LC:/oracle/ora92/oci/LIB/MSVC OCI]]',
+ '# NAME => q[DBD::Oracle_8]',
+ '# OBJECT => q[$(O_FILES)]',
+ '# PREREQ_PM => { DBI=>q[0] }',
+ '# VERSION_FROM => q[Oracle_8.pm]',
+ '# clean => { FILES=>q[xstmp.c Oracle_8.xsi dll.base dll.exp sqlnet.log libOracle.def ora_explain mk.pm DBD_ORA_OBJ.*] }',
+ '# dist => { DIST_DEFAULT=>q[clean distcheck disttest tardist], COMPRESS=>q[gzip -v9], PREOP=>q[$(MAKE) -f Makefile.old distdir], SUFFIX=>q[gz] }',
+ '
+# --- MakeMaker post_initialize section:'
+ ],
+ 'FULLPERLRUNINST' => '$(FULLPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"',
+ 'MAP_TARGET' => 'perl',
+ 'INSTALLMAN3DIR' => 'C:\\Perl10\\man\\man3',
+ 'PERLPREFIX' => 'C:\\Perl10',
'AUTHOR' => 'Tim Bunce ([email protected])',
- 'VERSION' => '1.17',
- 'DIR' => $dbd_oracle_mm_opts->{'DIR'},
- 'SO' => 'dll',
- 'MAN3PODS' => {},
- 'INC' => '-Ic:/instant10.1/sdk/include -Ic:/instant10.1/rdbms/demo -IC:/Perl/site/lib/auto/DBI/',
- 'LD' => 'link',
- 'DISTNAME' => 'DBD-Oracle',
+ 'INC' => '-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/',
+ 'LDFLAGS' => '-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\\Perl10\\lib\\CORE" -machine:x86',
+ 'INSTALLVENDORHTMLDIR' => 'C:\\Perl10\\html',
+ 'dist' => $dbd_oracle_mm_opts->{'dist'},
+ 'INSTALLVENDORMAN1DIR' => '',
+ 'MAKEFILE_OLD' => 'Makefile.old',
+ 'H' => [
+ 'Oracle_8.h',
+ 'dbdimp.h',
+ 'dbivport.h',
+ 'ocitrace.h'
+ ],
+ 'PERLRUNINST' => '$(PERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"',
+ 'CI' => 'ci -u',
+ 'DESTINSTALLBIN' => '$(DESTDIR)$(INSTALLBIN)',
+ 'DESTINSTALLVENDORMAN1DIR' => '$(DESTDIR)$(INSTALLVENDORMAN1DIR)',
+ 'INST_ARCHLIBDIR' => '$(INST_ARCHLIB)\\DBD',
'OBJECT' => '$(O_FILES)',
+ 'BUILD_REQUIRES' => {},
+ 'NAME_SYM' => 'DBD_Oracle_8',
+ 'RANLIB' => 'rem',
+ 'DIRFILESEP' => '^\\',
+ 'POSTOP' => '$(NOECHO) $(NOOP)',
+ 'INSTALLVENDORBIN' => '',
+ 'COMPRESS' => 'gzip --best',
+ 'SUFFIX' => '.gz',
+ 'MAN1EXT' => '1',
+ 'PERL_LIB' => 'C:\\Perl10\\lib',
+ 'ECHO' => '$(ABSPERLRUN) -l -e "print qq{@ARGV}" --',
+ 'EXPORT_LIST' => '$(BASEEXT).def',
+ 'INST_BOOT' => '$(INST_ARCHAUTODIR)\\$(BASEEXT).bs',
+ 'MV' => '$(ABSPERLRUN) -MExtUtils::Command -e "mv" --',
+ 'OSVERS' => '5.00',
'LD_RUN_PATH' => '',
- 'NAME' => 'DBD::Oracle',
- 'UMASK_NULL' => 'umask 0',
- 'PERL_ARCHLIB' => 'C:\\Perl\\lib',
- 'INSTALLMAN1DIR' => '',
- 'INST_MAN1DIR' => '',
- 'BASEEXT' => 'Oracle',
- 'VERSION_SYM' => '1_17',
+ 'MKPATH' => '$(ABSPERLRUN) -MExtUtils::Command -e "mkpath" --',
+ 'DESTINSTALLMAN1DIR' => '$(DESTDIR)$(INSTALLMAN1DIR)',
+ 'OSNAME' => 'MSWin32',
+ 'AR' => 'lib',
+ 'O_FILES' => [
+ 'Oracle_8.obj',
+ 'dbdimp.obj',
+ 'oci8.obj'
+ ],
+ 'FIXIN' => 'pl2bat.bat',
+ 'DIST_DEFAULT' => 'tardist',
+ 'SKIPHASH' => {},
+ 'NOOP' => 'rem',
+ 'PERL_ARCHLIB' => 'C:\\Perl10\\lib',
+ 'VERSION_SYM' => '0_01',
+ 'VERSION_MACRO' => 'VERSION',
+ 'WARN_IF_OLD_PACKLIST' => '$(ABSPERLRUN) -MExtUtils::Command::MM -e "warn_if_old_packlist" --',
+ 'MM_REVISION' => 65502,
+ 'RM_F' => '$(ABSPERLRUN) -MExtUtils::Command -e "rm_f" --',
+ 'LIBC' => 'msvcrt.lib',
+ 'UNINST' => 0,
+ 'PERLRUN' => '$(PERL)',
+ 'LINKTYPE' => 'dynamic',
+ 'INSTALLVENDORLIB' => '',
+ 'DEV_NULL' => '> NUL',
+ 'DLSRC' => 'dl_win32.xs',
+ 'INST_ARCHAUTODIR' => '$(INST_ARCHLIB)\\auto\\$(FULLEXT)',
+ 'DESTINSTALLSITEBIN' => '$(DESTDIR)$(INSTALLSITEBIN)',
+ 'MACROEND' => '',
+ 'ARGS' => {
+ 'NAME' => 'DBD::Oracle_8',
+ 'INC' => '-IC:/oracle/ora92/oci/include -IC:/oracle/ora92/rdbms/demo -IC:/Perl10/site/lib/auto/DBI/',
+ 'LIBS' => $dbd_oracle_mm_opts->{'LIBS'},
+ 'AUTHOR' => 'Tim Bunce ([email protected])',
+ 'DIR' => $dbd_oracle_mm_opts->{'DIR'},
+ 'DEFINE' => ' -DUTF8_SUPPORT -DORA_OCI_VERSION=\\"8.1.7.0\\"',
+ 'dist' => $dbd_oracle_mm_opts->{'dist'},
+ 'OBJECT' => '$(O_FILES)',
+ 'clean' => $dbd_oracle_mm_opts->{'clean'},
+ 'EXE_FILES' => $dbd_oracle_mm_opts->{'EXE_FILES'},
+ 'ABSTRACT_FROM' => 'Oracle_8.pm',
+ 'VERSION_FROM' => 'Oracle_8.pm',
+ 'PREREQ_PM' => $dbd_oracle_mm_opts->{'PREREQ_PM'}
+ },
+ 'CP' => '$(ABSPERLRUN) -MExtUtils::Command -e "cp" --',
+ 'DEFINE_VERSION' => '-D$(VERSION_MACRO)=\\"$(VERSION)\\"',
'PREREQ_PM' => $dbd_oracle_mm_opts->{'PREREQ_PM'},
- 'INSTALLMAN3DIR' => '',
- 'MAN1EXT' => '1',
- 'INST_MAN3DIR' => '',
- 'PM' => {
- 'oraperl.ph' => '$(INST_LIB)/oraperl.ph',
- 'lib/DBD/Oracle/GetInfo.pm' => '$(INST_LIB)\\DBD\\Oracle\\GetInfo.pm',
- 'Oracle.pm' => '$(INST_LIBDIR)\\Oracle.pm',
- 'mk.pm' => '$(INST_LIBDIR)\\mk.pm',
- 'Oraperl.pm' => '$(INST_LIB)/Oraperl.pm'
- },
- 'dist' => $dbd_oracle_mm_opts->{'dist'},
- 'VERSION_FROM' => 'Oracle.pm',
+ 'DESTINSTALLSITELIB' => '$(DESTDIR)$(INSTALLSITELIB)',
+ 'INST_LIB' => 'blib\\lib',
+ 'INST_DYNAMIC' => '$(INST_ARCHAUTODIR)\\$(DLBASE).$(DLEXT)',
+ 'FULLPERLRUN' => '$(FULLPERL)',
+ 'INSTALLSITEMAN1DIR' => '$(INSTALLMAN1DIR)',
+ 'DESTINSTALLSITEMAN3DIR' => '$(DESTDIR)$(INSTALLSITEMAN3DIR)',
+ 'MOD_INSTALL' => '$(ABSPERLRUN) -MExtUtils::Install -e "install([ from_to => {@ARGV}, verbose => \'$(VERBINST)\', uninstall_shadows => \'$(UNINST)\', dir_mode => \'$(PERM_DIR)\' ]);" --',
+ 'DLBASE' => '$(BASEEXT)',
+ 'INST_MAN3DIR' => 'blib\\man3',
+ 'CCCDLFLAGS' => ' ',
+ 'INSTALLSITEARCH' => 'C:\\Perl10\\site\\lib',
+ 'PMLIBPARENTDIRS' => [
+ 'lib'
+ ],
+ 'XS_DEFINE_VERSION' => '-D$(XS_VERSION_MACRO)=\\"$(XS_VERSION)\\"',
+ 'DESTINSTALLSITESCRIPT' => '$(DESTDIR)$(INSTALLSITESCRIPT)',
+ 'SHAR' => 'shar',
+ 'PERLMAINCC' => '$(CC)',
+ 'RCS_LABEL' => 'rcs -Nv$(VERSION_SYM): -q',
+ 'NAME' => 'DBD::Oracle_8',
+ 'PARENT_NAME' => 'DBD',
+ 'INSTALLSITELIB' => 'C:\\Perl10\\site\\lib',
+ 'MAKE_APERL_FILE' => 'Makefile.aperl',
+ 'ZIP' => 'zip',
+ 'VERSION_FROM' => 'Oracle_8.pm',
+ 'SITEPREFIX' => 'C:\\Perl10\\site',
+ 'INSTALLVENDORSCRIPT' => '',
+ 'TO_UNIX' => '$(NOECHO) $(NOOP)',
+ 'PERL' => 'C:\\Perl10\\bin\\perl.exe',
+ 'DESTINSTALLVENDORARCH' => '$(DESTDIR)$(INSTALLVENDORARCH)',
+ 'NOECHO' => '@',
+ 'DESTINSTALLVENDORBIN' => '$(DESTDIR)$(INSTALLVENDORBIN)',
+ 'DESTINSTALLHTMLDIR' => '$(DESTDIR)$(INSTALLHTMLDIR)',
+ 'PERM_RW' => 644,
+ 'UMASK_NULL' => 'umask 0',
+ 'DOC_INSTALL' => '$(ABSPERLRUN) -MExtUtils::Command::MM -e "perllocal_install" --',
+ 'TOUCH' => '$(ABSPERLRUN) -MExtUtils::Command -e "touch" --',
+ 'LD' => 'link',
+ 'PERL_SRC' => undef,
+ 'DESTINSTALLMAN3DIR' => '$(DESTDIR)$(INSTALLMAN3DIR)',
+ 'ZIPFLAGS' => '-r',
+ 'PERM_DIR' => 755,
+ 'DISTNAME' => 'DBD-Oracle_8',
+ 'INST_BIN' => 'blib\\bin',
+ 'FIRST_MAKEFILE' => 'Makefile',
+ 'VENDORPREFIX' => '',
+ 'LDFROM' => '$(OBJECT)',
+ 'clean' => $dbd_oracle_mm_opts->{'clean'},
+ 'PREFIX' => '$(SITEPREFIX)',
+ 'INSTALLDIRS' => 'site',
+ 'INST_ARCHLIB' => 'blib\\arch',
+ 'INSTALLHTMLDIR' => 'C:\\Perl10\\html',
+ 'PERL_ARCHIVE' => '$(PERL_INC)\\perl510.lib',
+ 'INSTALLVENDORARCH' => '',
+ 'DESTINSTALLSITEMAN1DIR' => '$(DESTDIR)$(INSTALLSITEMAN1DIR)',
+ 'INSTALLBIN' => 'C:\\Perl10\\bin',
+ 'INSTALLSITEMAN3DIR' => '$(INSTALLMAN3DIR)',
+ 'PERL_ARCHIVE_AFTER' => '',
+ 'MAN3PODS' => {
+ 'Oraperl_8.pm' => '$(INST_MAN3DIR)\\DBD\\Oraperl_8.$(MAN3EXT)',
+ 'Oracle_8.pm' => '$(INST_MAN3DIR)\\DBD\\Oracle_8.$(MAN3EXT)'
+ },
+ 'LIBPERL_A' => 'libperl.lib',
+ 'INSTALLARCHLIB' => 'C:\\Perl10\\lib',
'LIB_EXT' => '.lib',
- 'FULL_AR' => '',
- 'INSTALLSITELIB' => 'C:\\Perl\\site\\lib',
- 'MAN3EXT' => '3',
- 'LDDLFLAGS' => '-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\\Perl\\lib\\CORE" -machine:x86',
+ 'DESTINSTALLSITEHTMLDIR' => '$(DESTDIR)$(INSTALLSITEHTMLDIR)',
'AR_STATIC_ARGS' => 'cr',
- 'PREFIX' => 'C:\\Perl',
- 'FULLEXT' => 'DBD\\Oracle',
- 'AR' => 'lib',
- 'BOOTDEP' => '',
- 'BSLOADLIBS' => '',
- 'LIBC' => 'msvcrt.lib',
- 'RM_F' => '$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e rm_f',
- 'LINKTYPE' => 'dynamic'
+ 'INSTALLVENDORMAN3DIR' => '',
+ 'EXE_EXT' => '.exe',
+ 'EXTRALIBS' => 'C:\\oracle\\ora92\\oci\\LIB\\MSVC\\OCI.lib "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\oldnames.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\kernel32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\user32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\gdi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\winspool.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\comdlg32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\advapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\shell32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ole32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\oleaut32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\netapi32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\uuid.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\ws2_32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\mpr.lib" "C:\\
Program Files\\Microsoft Platform SDK\\Lib\\winmm.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\version.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbc32.lib" "C:\\Program Files\\Microsoft Platform SDK\\Lib\\odbccp32.lib" "C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\lib\\msvcrt.lib"',
+ 'PERM_RWX' => 755,
+ 'DESTINSTALLSITEARCH' => '$(DESTDIR)$(INSTALLSITEARCH)',
+ 'ABSPERLRUN' => '$(ABSPERL)',
+ 'DESTINSTALLVENDORSCRIPT' => '$(DESTDIR)$(INSTALLVENDORSCRIPT)',
+ 'BASEEXT' => 'Oracle_8',
+ 'TEST_F' => '$(ABSPERLRUN) -MExtUtils::Command -e "test_f" --',
+ 'PM' => {
+ 'Oraperl_8.pm' => '$(INST_LIB)/Oraperl_8.pm',
+ 'Oracle_8.pm' => '$(INST_LIB)\\DBD\\Oracle_8.pm',
+ 'oraperl_8.ph' => '$(INST_LIB)/oraperl_8.ph',
+ 'lib/DBD/Oracle/GetInfo.pm' => 'blib\\lib\\DBD\\Oracle\\GetInfo.pm',
+ 'mk.pm' => '$(INST_LIB)\\DBD\\mk.pm'
+ },
+ 'ABSPERLRUNINST' => '$(ABSPERLRUN) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)"',
+ 'PERL_CORE' => 0,
+ 'INSTALLMAN1DIR' => 'C:\\Perl10\\man\\man1',
+ 'SO' => 'dll',
+ 'VERSION' => '0.01',
+ 'DIST_CP' => 'best',
+ 'INST_SCRIPT' => 'blib\\script',
+ 'UNINSTALL' => '$(ABSPERLRUN) -MExtUtils::Command::MM -e "uninstall" --'
}, 'PACK001' );
Modified: dbd-oracle/branches/DBD-Oracle8/oci8.c
==============================================================================
--- dbd-oracle/branches/DBD-Oracle8/oci8.c (original)
+++ dbd-oracle/branches/DBD-Oracle8/oci8.c Mon Dec 21 10:25:03 2009
@@ -8,7 +8,7 @@
*/
-#include "Oracle.h"
+#include "Oracle_8.h"
#ifdef UTF8_SUPPORT
#include <utf8.h>
Modified: dbd-oracle/branches/DBD-Oracle8/oci8.obj
==============================================================================
Binary files. No diff available.
Added: dbd-oracle/branches/DBD-Oracle8/oraperl_8.ph
==============================================================================
--- (empty file)
+++ dbd-oracle/branches/DBD-Oracle8/oraperl_8.ph Mon Dec 21 10:25:03 2009
@@ -0,0 +1,53 @@
+# DBD::Oracle Oraperl emulation. This file is not relevant to the
+# emulation but is included for completeness only.
+# I have updated %ora_types in case it's used. Tim Bunce.
+
+# oraperl.ph
+#
+# Various constants which may be useful in oraperl programs
+#
+# Author: Kevin Stock
+# Date: 28th October 1991
+# Last Change: 8th April 1992
+
+
+# Oraperl error codes, set in $ora_errno
+
+$ORAP_NOMEM = 100001; # out of memory
+$ORAP_INVCSR = 100002; # invalid cursor supplied
+$ORAP_INVLDA = 100003; # invalid lda supplied
+$ORAP_NOSID = 100004; # couldn't set ORACLE_SID
+$ORAP_BADVAR = 100005; # bad colon variable sequence
+$ORAP_NUMVARS = 100006; # wrong number of colon variables
+$ORAP_NODATA = 100007; # statement does not return data
+
+
+# Oraperl debugging codes for $ora_debug
+# From version 2, you shouldn't really use these.
+
+$ODBG_EXEC = 8; # program execution
+$ODBG_STRNUM = 32; # string/numeric conversions
+$ODBG_MALLOC = 128; # memory allocation/release
+
+# Oracle datatypes
+# I don't know whether these are valid for all versions.
+
+%ora_types =
+(
+ 1, 'character array',
+ 2, 'number',
+ 3, 'signed integer',
+ 4, 'float',
+ 7, 'packed decimal',
+ 8, 'long string',
+ 9, 'varchar',
+ 11, 'rowid',
+ 12, 'date',
+ 15, 'varraw',
+ 23, 'raw',
+ 24, 'long raw',
+ 96, 'char',
+ 106,'mlslabel',
+);
+
+1;
Modified: dbd-oracle/branches/DBD-Oracle8/vc70.pdb
==============================================================================
Binary files. No diff available.
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.