From: Rafael Kitover Date: Thu, 22 Jul 2010 13:27:45 +0000 (-0400) Subject: silence DBD::Oracle 1.21 warning X-Git-Tag: 0.07001~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=128f61d834839db22612bcca96e1014ed9f7e8df;p=dbsrgits%2FDBIx-Class-Schema-Loader.git silence DBD::Oracle 1.21 warning --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm index 7d8f698..c561894 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/Oracle.pm @@ -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 {