Subject: REPOST: v38i009: oraperl-v2 - Extensions to Perl to access Oracle database, Patch04
From: Kevin Stock <[email-masked]>
Date: Thu, 15 Jul 1993 16:47:36 GMT
Newsgroups: comp.sources.misc

Submitted-by: Kevin Stock <[email-masked]>
Posting-number: Volume 38, Issue 9
Archive-name: oraperl-v2/patch04
Environment: Perl, Oracle with OCI, optionally Curses
Patch-To: oraperl-v2: Volume 30, Issue 87-91

[ This is being reposted due to a problem with propagation.  -Kent+ ]

This is patch 4 to version 2 of Oraperl, a set of usersubs which allow
Perl to access Oracle databases. You need Perl (v3.0.27 or better) and
Oracle (including the Oracle Call Interface) to build Oraperl. If you
can build Larry's Curseperl, then you can also build Coraperl, which is
Oraperl with Curses.

Oraperl version 2 appeared in the comp.sources.misc newsgroup as
follows:

	v30i087-091	Part 01-05	29th June 1992
	v30i099		Patch 01	6th July 1992
	v32i093		Patch 02	4th October 1992
	v34i021		Patch 03	12th December 1992

Oraperl should be available at any comp.sources.misc archive site,
for example wuarchive.wustl.edu [128.252.135.4] (in the USA) or
src.doc.uc.ac.uk (in the UK). On these two sites, look in the
directory /usenet/comp.sources.misc/volume30/oraperl-v2.

I didn't intend to release this patch. Work on DBperl (a standard for
database access from Perl) is well underway, and the next release of
Oraperl should have been version 3, which would have been DBperl
compliant.

However, I have been laid off as part of a cost cutting exercise here,
and I don't know when I'll be able to get net access again. So, this
patch tidies up a few outstanding issues.

As I no longer have access to the net, please do not try to send me
mail. If you really want, you can write to me at the address below, but
please enclose an International Reply Coupon if you want a reply. I
won't have access to a system running Oracle, so I probably won't be
able to give you much help.

  Changes
  -------
&ora_open() and &ora_do() now ignore colons which are not followed by a
digit. This avoids problems with PL/SQL which uses := for an assignment
operator, and :NAME for trigger names.

$ora_errstr now looks up the error message using oerhms() if possible,
as the manual says it should.

If the first parameter to &ora_login() (the database ID) contains a
colon, then it will be assigned to TWO_TASK, instead of ORACLE_SID.
Note that if you also have a value set in ORACLE_SID, Oracle gets to
use whichever it wants.

The sample script sql no longer requires a value for $ORACLE_SID, since
the application may be using TWO_TASK. Also, if the sql statement is not
specified on the command line, it will be read in from standard input.

To apply the patch, unshar this file in your Oraperl source directory.
Then:

	patch -p1 <patch04
	make test

My thanks to those who suggested some of these modifications, including
Scott Grosch, Viet Hoang and Charles Jardine.

	Kevin Stock

	5 rue de la Liberation
	78660 ABLIS
	France

==========================