From: Peter Rabbitson Date: Tue, 27 May 2014 11:34:31 +0000 (+0200) Subject: Fix erroneous todoification in sqlite test X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=56270bba4fb06051ea5262d99f858920c796562e;p=dbsrgits%2FDBIx-Class-Historic.git Fix erroneous todoification in sqlite test --- diff --git a/lib/DBIx/Class/_Util.pm b/lib/DBIx/Class/_Util.pm index 3e3b68f..518457c 100644 --- a/lib/DBIx/Class/_Util.pm +++ b/lib/DBIx/Class/_Util.pm @@ -146,6 +146,9 @@ sub modver_gt_or_eq ($$) { local $SIG{__WARN__} = sigwarn_silencer( qr/\Qisn't numeric in subroutine entry/ ) if SPURIOUS_VERSION_CHECK_WARNINGS; + croak "$mod does not seem to provide a version (perhaps it never loaded)" + unless $mod->VERSION; + local $@; eval { $mod->VERSION($ver) } ? 1 : 0; } diff --git a/t/752sqlite.t b/t/752sqlite.t index 0fbad34..70bd612 100644 --- a/t/752sqlite.t +++ b/t/752sqlite.t @@ -53,6 +53,7 @@ use DBIx::Class::_Util qw(sigwarn_silencer modver_gt_or_eq); # However DBD::SQLite 1.38_02 seems to fix this, with an accompanying test: # https://metacpan.org/source/ADAMK/DBD-SQLite-1.38_02/t/54_literal_txn.t +require DBD::SQLite; my $lit_txn_todo = modver_gt_or_eq('DBD::SQLite', '1.38_02') ? undef : "DBD::SQLite before 1.38_02 is retarded wrt detecting literal BEGIN/COMMIT statements"