Hi,
Just wondered if anyone else had seen this and if there are any opinions
on getting around it. I use DBIx::Log4perl (which I wrote to help debug
our DBI appication) and DBD::Oracle. New code added to our application
calls an oracle package function which returns a reference cursor and it
is bound in Perl like so:
my $sth2;
my $sth1 = $h->prepare(q{BEGIN ? := pkg.testfunc; END;});
$sth1->bind_param_inout(1, \$sth2, 0, { ora_type => ORA_RSET } );
as per DBD::Oracle pod. After $sth1->execute, $sth2 is a statement
handle but DBIx::Log4perl does not know about it and hence when it is
used it leads to errors in DBIx::Log4perl when it accesses private
attributes it usually stores in the statement handle (e.g. a Log4perl
log handle) which are not present. i.e., normally when the application
calls the prepare method, DBIx::Log4perl sees the returned statement
handle and does something like:
my $sth = $dbh->SUPER::prepare(@args);
$sth->{private_DBIx_Log4perl} = $log_handle if ($sth);
but DBIx::Log4perl did not see this magically returned statement handle.
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com