use Sub::Name;
use Try::Tiny;
+use DBIx::Class::_Util 'sigwarn_silencer';
use namespace::clean;
=head1 NAME
sub _dbh_get_info {
my $self = shift;
- my $warn_handler = $SIG{__WARN__} || sub { warn @_ };
-
- local $SIG{__WARN__} = sub {
- $warn_handler->(@_)
- unless $_[0] =~ m{^Missing argument in sprintf at \S+/ADO/GetInfo\.pm};
- };
+ local $SIG{__WARN__} = sigwarn_silencer(
+ qr{^Missing argument in sprintf at \S+/ADO/GetInfo\.pm}
+ );
$self->next::method(@_);
}
my $disconnect = *DBD::ADO::db::disconnect{CODE};
*DBD::ADO::db::disconnect = subname 'DBD::ADO::db::disconnect' => sub {
- my $warn_handler = $SIG{__WARN__} || sub { warn @_ };
- local $SIG{__WARN__} = sub {
- $warn_handler->(@_)
- unless $_[0] =~ /Not a Win32::OLE object|uninitialized value/;
- };
+ local $SIG{__WARN__} = sigwarn_silencer(
+ qr/Not a Win32::OLE object|uninitialized value/
+ );
$disconnect->(@_);
};
}
# $sth;
#}
-1;
-
-=head1 AUTHOR
+=head1 FURTHER QUESTIONS?
-See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
+Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>.
-=head1 LICENSE
+=head1 COPYRIGHT AND LICENSE
-You may distribute this code under the same terms as Perl itself.
+This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE>
+by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can
+redistribute it and/or modify it under the same terms as the
+L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>.
=cut
+
+1;
+
# vim:sts=2 sw=2: