fix no table warnings for MS Access over DBD::ADO
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / ADO / MS_Jet.pm
index a052f38..42482b6 100644 (file)
@@ -191,6 +191,33 @@ sub _columns_info_for {
     return $result;
 }
 
+# Trap and ignore OLE warnings from nonexistant comments tables.
+
+sub _table_comment {
+    my $self = shift;
+
+    my $warn_handler = $SIG{__WARN__} || sub { warn @_ };
+
+    local $SIG{__WARN__} = sub {
+        $warn_handler->(@_) unless $_[0] =~ /cannot find the input table/;
+    };
+
+    $self->next::method(@_);
+}
+
+sub _column_comment {
+    my $self = shift;
+
+    my $warn_handler = $SIG{__WARN__} || sub { warn @_ };
+
+    local $SIG{__WARN__} = sub {
+        $warn_handler->(@_) unless $_[0] =~ /cannot find the input table/;
+    };
+
+    $self->next::method(@_);
+}
+
+
 =head1 SEE ALSO
 
 L<DBIx::Class::Schema::Loader::DBI::ODBC::ACCESS>,