Release 0.07037
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / ADO / Microsoft_SQL_Server.pm
index 2543f34..6cb624f 100644 (file)
@@ -7,8 +7,11 @@ use base qw/
     DBIx::Class::Schema::Loader::DBI::MSSQL
 /;
 use mro 'c3';
+use DBIx::Class::Schema::Loader::Utils qw/sigwarn_silencer/;
 
-our $VERSION = '0.07015';
+use namespace::clean;
+
+our $VERSION = '0.07037';
 
 =head1 NAME
 
@@ -23,14 +26,11 @@ See L<DBIx::Class::Schema::Loader::Base> for usage information.
 
 =cut
 
-sub _table_comment {
-    local $^W = 0; # invalid object warnings
-    shift->next::method(@_);
-}
-
-sub _column_comment {
-    local $^W = 0; # invalid object warnings
-    shift->next::method(@_);
+# Silence ADO "Changed database context" warnings
+sub _switch_db {
+    my $self = shift;
+    local $SIG{__WARN__} = sigwarn_silencer(qr/Changed database context/);
+    return $self->next::method(@_);
 }
 
 =head1 SEE ALSO