X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FADO.pm;h=c7c0621fd0f793ba17198789319669291add8378;hb=HEAD;hp=db8517dc30a26184a02ab4f8bae7006001b7ddb1;hpb=052a832c5f6fe0f82a4db48e176525f700c44159;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/ADO.pm b/lib/DBIx/Class/Storage/DBI/ADO.pm index db8517d..c7c0621 100644 --- a/lib/DBIx/Class/Storage/DBI/ADO.pm +++ b/lib/DBIx/Class/Storage/DBI/ADO.pm @@ -6,9 +6,7 @@ use strict; use base 'DBIx::Class::Storage::DBI'; use mro 'c3'; -use Sub::Name; -use Try::Tiny; -use DBIx::Class::_Util 'sigwarn_silencer'; +use DBIx::Class::_Util qw( sigwarn_silencer modver_gt_or_eq set_subname ); use namespace::clean; =head1 NAME @@ -45,11 +43,11 @@ sub _init { unless ($DBD::ADO::__DBIC_MONKEYPATCH_CHECKED__) { require DBD::ADO; - unless (try { DBD::ADO->VERSION('2.99'); 1 }) { + unless ( modver_gt_or_eq( 'DBD::ADO', '2.99' ) ) { no warnings 'redefine'; my $disconnect = *DBD::ADO::db::disconnect{CODE}; - *DBD::ADO::db::disconnect = subname 'DBD::ADO::db::disconnect' => sub { + *DBD::ADO::db::disconnect = set_subname 'DBD::ADO::db::disconnect' => sub { local $SIG{__WARN__} = sigwarn_silencer( qr/Not a Win32::OLE object|uninitialized value/ ); @@ -75,15 +73,19 @@ sub _init { # $sth; #} -1; - -=head1 AUTHOR +=head1 FURTHER QUESTIONS? -See L and L. +Check the list of L. -=head1 LICENSE +=head1 COPYRIGHT AND LICENSE -You may distribute this code under the same terms as Perl itself. +This module is free software L +by the L. You can +redistribute it and/or modify it under the same terms as the +L. =cut + +1; + # vim:sts=2 sw=2: