Oracle::PLSQL?
- Auto-generate Perl proxy interfaces for PL/SQL packages and functions
- Invoke a PL/SQL function simply by calling a perl sub of the same name!
- IN, OUT, and IN OUT params of all types work as expected, inc polymorphism
- PL/SQL exceptions map to Perl exceptions
$dbh = DBI->connect(’dbi:Oracle:’, $user, $pass, { ora_autolob => 0 });
$bfile = $dbh->selectcol_array(”select bfile from mylobs where id=? for update”, undef, 1);
$dbms_lob = new Oracle::PLSQL DBMS_LOB => \$dbh; # Magic
$dbms_lob->fileexists($bfile) or die “File missing”; # More magic via AUTOLOAD
$length = $dbms_lob->filelength($bfile);
$dbms_lob->filegetname($bfile, $diename, $filename);
$dbms_lob->fileopen($bfile, $dbms_lob->{file_readonly});
$dbms_lob->read($bfile, 40, 1, $buffer);
$dbms_lob->fileclose($bfile);
- Would work for any PL/SQL package - including your own