Silencing DBI "(err=0, errstr=undef, state=undef)" errors



List,

I have an $application that uses Oracle on Windows 2000, and I speak to the database with ActiveState Perl 5.6, since 5.6 is the last version for which Oracle allows AS to package DBD::Oracle. This reason, as much as anything else, precludes me from upgrading to 5.8. Yes, I have a valid license (although we are talking about 8.1.7 here). I don't fancy compiling a perl myself for this box.

I had to upgrade DBI a while ago, because I was running into problems with DBD::Proxy that have been resolved in more recent versions. Everything is now working correctly, except that I am getting the following non-error warnings:

DBD::Oracle::db selectall_arrayref warning: (err=0, errstr=undef, state=undef) at foo.pl line 666.

It's a non-error: it's basically saying "hey! everything's ok! hope you're happy about that!" and it's making my life a misery because my log files are filling up with ten of thousands of these statements. I have tried setting all sorts of incantations in the creation of database handles, such as setting RaiseError and PrintError to zero. I had high hope for the HandleError and HandleSetErr attributes. Poking about in the DBI.dll, it looks like the above err=... errstr=... state... string is belongs to the default HandleSetErr handler. I created a connection thusly:

    $db = DBI->connect( $base, $user, $pw, {
        AutoCommit   => 0,
        PrintError   => 0,
        HandleError  => sub { print "error handler <@_>\n"; return 0 },
        HandleSetErr => sub { print "seterr handler <@_>\n"; return 0 },
    }) or croak "Could not connect to database $base: ${\DBI->errstr}\n";
[download]

.... but it appears that my handlers here are not called by anything, and I still get the errstr=undef spew.

I have also tried scoping the error in a 'no warnings' block. And I'd rather not have to diddle with $SIG{__WARN__}.

Is there something wrong with my handlers, or do I need to do something differently, or do something else? Thanks for any clues I can use.

David
--
"It's overkill of course, but you can never have too much overkill."

.