silence DBD::Oracle 1.21 warning
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / Oracle.pm
index 55f3aac..c561894 100644 (file)
@@ -9,7 +9,7 @@ use base qw/
 use Carp::Clan qw/^DBIx::Class/;
 use Class::C3;
 
-our $VERSION = '0.07000';
+our $VERSION = '0.07001';
 
 =head1 NAME
 
@@ -71,7 +71,16 @@ sub _tables_list {
           if $table =~ /\A(\w+)\z/;
     }
 
-    return $self->_filter_tables(\@tables, $opts);
+    {
+        # silence a warning from older DBD::Oracles in tests
+        my $warn_handler = $SIG{__WARN__} || sub { warn @_ };
+        local $SIG{__WARN__} = sub {
+            $warn_handler->(@_)
+            unless $_[0] =~ /^Field \d+ has an Oracle type \(\d+\) which is not explicitly supported/;
+        };
+
+        return $self->_filter_tables(\@tables, $opts);
+    }
 }
 
 sub _table_columns {