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=c55a21bcbce750716bcbfc59c3129a6943b6bf1a;hb=refs%2Ftags%2F0.07029;hp=e087ce383a8d2607def872c0d1991f9d9b48c8ed;hpb=4295c4b477aafd9d66d88134c38805b50adfcc9e;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 e087ce3..c55a21b 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,10 +7,8 @@ use base qw/ DBIx::Class::Schema::Loader::DBI::MSSQL /; use mro 'c3'; -use Carp::Clan qw/^DBIx::Class/; -use namespace::clean; -our $VERSION = '0.07010'; +our $VERSION = '0.07029'; =head1 NAME @@ -23,8 +21,21 @@ Proxy for L when using L. See L for usage information. +=cut + +# 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 +L, L, L, L, L