Hi,
I have DBIx::Log4perl which is currently connected to a DBD::Oracle. In
DBIx::Log4perl::st::execute I want to call DBD::Oracle's dbms_get_line
which is usually (from applications) called like this:
@lines = $dbh->func('dbms_output_get');
As I'm in st::execute I have a $sth and can get hold of a $dbh. I
imagined all I needed to do was:
$sth::SUPER::dbms_output_get();
but I get
Deep recursion on subroutine "DBD::Oracle::db::dbms_output_get" at
/usr/lib/perl5/site_perl/5.8.8/DBIx/Log4perl/st.pm line 32.
When I look at dbms_output_get is see it is doing:
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;
}
Any ideas how I can call dbms_output_get from within
DBIx::Log4perl::st::execute? or is this impossible?
Thanks
Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com