X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSQLite.pm;h=82c0f1764720beb9293691ca2954a846ace9a37c;hb=b1dbf7164ee06fa23aef5a799dd57df0357514ba;hp=72146dbfef4bbc44236ac39819653b8c83b90127;hpb=735f190ce9798b79ae0608b62087cdd1d3c0b47e;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/SQLite.pm b/lib/DBIx/Class/Storage/DBI/SQLite.pm index 72146db..82c0f17 100644 --- a/lib/DBIx/Class/Storage/DBI/SQLite.pm +++ b/lib/DBIx/Class/Storage/DBI/SQLite.pm @@ -6,6 +6,7 @@ use warnings; use base qw/DBIx::Class::Storage::DBI/; use mro 'c3'; +use DBIx::Class::_Util 'modver_gt_or_eq'; use DBIx::Class::Carp; use Try::Tiny; use namespace::clean; @@ -152,11 +153,7 @@ sub _ping { # older DBD::SQLite does not properly synchronize commit state between # the libsqlite and the $dbh unless (defined $DBD::SQLite::__DBIC_TXN_SYNC_SANE__) { - local $@; - $DBD::SQLite::__DBIC_TXN_SYNC_SANE__ = eval { DBD::SQLite->VERSION(1.38_02); 1 } - ? 1 - : 0 - ; + $DBD::SQLite::__DBIC_TXN_SYNC_SANE__ = modver_gt_or_eq('DBD::SQLite', '1.38_02'); } # fallback to travesty