From: Rafael Kitover Date: Thu, 25 Mar 2010 05:32:51 +0000 (+0000) Subject: minor fix for SQLite version check X-Git-Tag: v0.08121~32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d281af9790ee93a57352f4402dbe9bb4313077b9;p=dbsrgits%2FDBIx-Class.git minor fix for SQLite version check --- diff --git a/lib/DBIx/Class/Storage/DBI/SQLite.pm b/lib/DBIx/Class/Storage/DBI/SQLite.pm index c8461f6..30e7b2b 100644 --- a/lib/DBIx/Class/Storage/DBI/SQLite.pm +++ b/lib/DBIx/Class/Storage/DBI/SQLite.pm @@ -50,12 +50,13 @@ sub deployment_statements { $sqltargs ||= {}; - my $sqlite_version = $self->_server_info->{dbms_ver}; + my $sqlite_version = eval { $self->_server_info->{dbms_ver} }; + $sqlite_version ||= ''; # numify, SQLT does a numeric comparison $sqlite_version =~ s/^(\d+) \. (\d+) (?: \. (\d+))? .*/${1}.${2}/x; - $sqltargs->{producer_args}{sqlite_version} = $sqlite_version; + $sqltargs->{producer_args}{sqlite_version} = $sqlite_version if $sqlite_version; $self->next::method($schema, $type, $version, $dir, $sqltargs, @rest); }