grump- has asked for the wisdom of the Perl Monks concerning the following question:

Here is the stored procedure:


And here is the Perl having trouble:

#!/usr/bin/perl use DBI; use DBD::Oracle qw(:ora_types); use Data::Dumper; my $dbh = DBI->connect( "dsn", "user", "pass", { RaiseError => 1 } ); $dbh->trace(15,"trace"); my $query = $dbh->prepare( qq{BEGIN schema.package.TEST('blah', ?); co +mmit; END;}); my $xml; $query->bind_param_inout(1, \$xml, 32000, { ora_type => ORA_XMLTYPE } +); $query->execute(); $dbh->DESTROY; undef $dbh; print Dumper($xml);

The binding causes a segmentation fault and never returns, even when wrapped in an eval statement. Here is the last text in the trace:

-> bind_param_inout for DBD::Oracle::st (DBI::st=HASH(0x18d6828)~0x18d +67c8 1 SCALAR(0x183ddac) 32000 HASH(0x18d67bc)) dbd_bind_ph(): bind :p1 <== undef (type 0 (DEFAULT (varchar)), inout 0 +x183ddac, maxlen 32000, attribs: HASH(0x18d67bc)) dbd_rebind_ph() (1): rebinding :p1 as NULL (not-utf8, ftype 108 (ORA_X +MLTYPE or SQLT_NTY), csid 0, csform 0, inout 1) in dbd_rebind_ph_xml

Can anyone tell me if I am doing something wrong to get this XMLTYPE out of the stored procedure? I should add that the names of the innocent have been protected in the above code and that I should tell you that this runs in an Apache/MOD Perl environment (I have modified the displayed code to ignore the web bits). Additionally, we are running DBD version 1.42 with Oracle on the 10 version. I should also note that I am able to execute the procedure using Oracle Sql Developer.