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=5e384040c4358759c6ed87303b9fa03ff1ec6a49;hb=0ce0384feb1b3e58bcd4533de1de121e9826451b;hp=f332a9e468d6728935608963977803c03c8b9362;hpb=3b17d9885e593f0705e1e16360b816778d71ec95;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 f332a9e..5e38404 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.07007'; +our $VERSION = '0.07034_01'; =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