How to call DBD::Oracle's dbms_output_get from within a DBIx
- From: martin@xxxxxxxxxxxx (Martin J. Evans)
- Date: Wed, 21 Feb 2007 16:25:54 +0000
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
.
- Follow-Ups:
- Re: How to call DBD::Oracle's dbms_output_get from within a DBIx
- From: Tim Bunce
- Re: How to call DBD::Oracle's dbms_output_get from within a DBIx
- Prev by Date: RE: install_driver(Oracle) failed while connecting to oracle 10.2.0.2
- Next by Date: Re: ANNOUNCE: DBI 1.54 RC7
- Previous by thread: DBD::Oracle 1.19 install on Fedora Core 5
- Next by thread: Re: How to call DBD::Oracle's dbms_output_get from within a DBIx
- Index(es):
Relevant Pages
|