On Tue, Mar 25, 2003 at 05:27:31PM +0100, H.Merijn Brand wrote:
> On Tue 25 Mar 2003 16:48, Tim Bunce <[EMAIL PROTECTED]> wrote:
> > And isn't there a more reliable way if orainst/inspdver doesn't exist?
> > There ought to be something somewhere that gives the version number!
>
> Yes:
> --8<--- Literal snippet from one of my scripts, DB version stored in $prod[5]
Great. Thanks.
> > > DBI connect('','foo/bar',...) failed: ORA-01034: ORACLE not available
> > > ORA-27101: shared memory realm does not exist
> > > HP-UX Error: 2: No such file or directory (DBD ERROR: OCISessionBegin) at /pro/3
> > > gl/CPAN/DBD-Oracle-1.14/blib/lib/Oraperl.pm line 97
> > > Use of uninitialized value in concatenation (.) or string at test.pl line 69.
> > > Use of uninitialized value in concatenation (.) or string at test.pl line 69.
> > > ora_login: :
> >
> > Ah, interestingly this highlights a change that's broken the old
> > Oraperl global $ora_errno and $ora_errstr variables. Umm, question is,
> > can I summon the will to fix it...
>
> As you did with the patch below :)
Nooo, I'm talking about the "uninitialized value" warnings from Oraperl.
For those I've done:
- my $dbh = DBI->connect("dbi:Oracle:$system_id", $name, $password);
+ my $dbh = DBI->connect("dbi:Oracle:$system_id", $name, $password, {
+ HandleError => sub {
+ my ($errstr, $h,) = @_;
+ $Oraperl::ora_errno = $h->err;
+ $Oraperl::ora_errstr = $h->errstr;
+ return; # false
+ },
+ });
which is only a partial fix but good enough as I'll stop supporting
Oraperl very soon anyway :)
New (probably final) release candidate to follow...
Tim.