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=c059e7c5e381f1fddccff96addbf4442c54ef732;hb=refs%2Ftags%2F0.07022;hp=d48c18e818615ed3b4d7869a98a5128bf20ab646;hpb=b45a0999ad7b944b6371a0055c103ccfaa01d75c;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 d48c18e..c059e7c 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.07017'; +our $VERSION = '0.07022'; =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