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=6cb624fdb1e84610b2e55c76ea1daf47c81e90c6;hb=8a9cc3bb69bee00efb91480ed7106a9bdf473414;hp=2543f348ee8be1bcaa255e6223049ebd157ab229;hpb=5fc335ab21e8dcf1ddbc9801a8486e6c613bc643;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 2543f34..6cb624f 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 @@ -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 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