Release 0.07047
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / ADO / Microsoft_SQL_Server.pm
index 6994d2b..c9b1727 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.07011';
+use namespace::clean;
+
+our $VERSION = '0.07047';
 
 =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
@@ -40,9 +40,9 @@ L<DBIx::Class::Schema::Loader::DBI::MSSQL>,
 L<DBIx::Class::Schema::Loader>, L<DBIx::Class::Schema::Loader::Base>,
 L<DBIx::Class::Schema::Loader::DBI>
 
-=head1 AUTHOR
+=head1 AUTHORS
 
-See L<DBIx::Class::Schema::Loader/AUTHOR> and L<DBIx::Class::Schema::Loader/CONTRIBUTORS>.
+See L<DBIx::Class::Schema::Loader/AUTHORS>.
 
 =head1 LICENSE