I use DBIx::Recordset but every time I invoke it with perl 5.6.1 and
DBD::Oracle 1.12, I see this:

Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBD/Oracle.pm line 327.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBD/Oracle.pm line 327.
Use of uninitialized value in string eq at
/usr/lib/perl5/site_perl/5.6.1/i386-linux/DBD/Oracle.pm line 327.

I traced this down to the method $dbh->tables(), which in turn invokes
table_info() (which is driver specific), which is where line 327 is.

a clean test case:
perl -MDBI -le '
$dbh = DBI->connect(qw/dbi:Oracle:$db $user $pass/);
print scalar $dbh->tables
'

So I patched Oracle.pm and shut it up:

--- Oracle.pm~  Fri Aug 31 09:27:17 2001
+++ Oracle.pm   Thu Dec 12 14:38:47 2002
@@ -324,6 +324,8 @@
        my $TypVal = $attr->{TABLE_TYPE};
        my @Where = ();
        my $Sql;
+       {
+           local $^W = 0;
        if ( $CatVal eq '%' && $SchVal eq '' && $TblVal eq '') { # Rule 19a
                $Sql = <<'SQL';
 SELECT NULL TABLE_CAT
@@ -404,6 +406,7 @@
                $Sql .= ' WHERE ' . join("\n   AND ", @Where ) . "\n" if
@Where;
                $Sql .= " ORDER BY TABLE_TYPE, TABLE_SCHEM, TABLE_NAME\n";
        }
+       }
        my $sth = $dbh->prepare($Sql) or return undef;
        $sth->execute or return undef;
        $sth;


That section of code ONLY does string manipulation (setting up table names
and sql strings internally), so for me this is perfect.  YMMV, of course...

L8r,
Rob

#!/usr/bin/perl -w
use Disclaimer qw/:standard/;

Reply via email to