From: Arthur Axel "fREW" Schmidt Date: Wed, 9 Dec 2009 23:32:55 +0000 (+0000) Subject: fail nicely if user doesn't have perms for xp_msver X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=097c51673186a12c2c216b19aeb464fba088bdbb;p=dbsrgits%2FDBIx-Class-Historic.git fail nicely if user doesn't have perms for xp_msver --- diff --git a/lib/DBIx/Class/Storage/DBI/MSSQL.pm b/lib/DBIx/Class/Storage/DBI/MSSQL.pm index dec843f..cc831e8 100644 --- a/lib/DBIx/Class/Storage/DBI/MSSQL.pm +++ b/lib/DBIx/Class/Storage/DBI/MSSQL.pm @@ -244,7 +244,7 @@ sub sql_maker { unless ($self->_sql_maker) { unless ($self->{_sql_maker_opts}{limit_dialect}) { - my $version = $self->_get_mssql_version; + my $version = eval { $self->_get_mssql_version; } || 0; $self->{_sql_maker_opts} = { limit_dialect => ($version >= 9 ? 'RowNumberOver' : 'Top'),