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=ce43f31c209ca4daad3037e0271f35f25b8820b0;hb=c52f11c91a8570f84daf2bfbbf60fa1ef3b32b5b;hp=401b0fdf69fe6ce91379b82ae5513089a8e6a54c;hpb=c34033b1f21ade200b20f78940c2c32a8843fd17;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 401b0fd..ce43f31 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.07032'; +use namespace::clean; + +our $VERSION = '0.07042'; =head1 NAME @@ -26,10 +29,7 @@ See L for usage information. # 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/; - }; + local $SIG{__WARN__} = sigwarn_silencer(qr/Changed database context/); return $self->next::method(@_); }