X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FSchema%2FLoader%2FDBI%2FADO%2FMicrosoft_SQL_Server.pm;h=8eb137854e0e5ae32d71052ac7e41e5a71f9d2fe;hb=0af7cacc7b7e906f0ef4b356fd9f4091d0bba01b;hp=6994d2b3ceca7a49ef0c493acfa8eb236c768110;hpb=8e6c80c9ded48d2f9450de4200c4490b13d0c942;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm b/lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm index 6994d2b..8eb1378 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/ADO/Microsoft_SQL_Server.pm @@ -8,7 +8,7 @@ use base qw/ /; use mro 'c3'; -our $VERSION = '0.07011'; +our $VERSION = '0.07030'; =head1 NAME @@ -23,14 +23,14 @@ See L 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; + my $warn_handler = $SIG{__WARN__} || sub { warn @_ }; + local $SIG{__WARN__} = sub { + $warn_handler->(@_) unless $_[0] =~ /Changed database context/; + }; + return $self->next::method(@_); } =head1 SEE ALSO