From: Rafael Kitover Date: Wed, 19 Oct 2011 20:52:06 +0000 (-0400) Subject: ignore type_info errors from DBD::Sybase+MSSQL X-Git-Tag: 0.07011~29 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=354b6942f6aa6330fdb859e9ad3eb894a94f715a;p=dbsrgits%2FDBIx-Class-Schema-Loader.git ignore type_info errors from DBD::Sybase+MSSQL When testing multi-database schemas on MSSQL, a weird error comes up from type_info_all in DBD::Sybase. This needs to be investigated further, but for now the call to type_info in ::DBI is wrapped in a try. --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI.pm b/lib/DBIx/Class/Schema/Loader/DBI.pm index e242655..c0042cf 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI.pm @@ -504,7 +504,9 @@ sub _columns_info_for { sub _dbh_type_info_type_name { my ($self, $type_num) = @_; - my $type_info = $self->dbh->type_info($type_num); + # We wrap it in a try block for MSSQL+DBD::Sybase, which can have issues. + # TODO investigate further + my $type_info = try { $self->dbh->type_info($type_num) }; return $type_info ? $type_info->{TYPE_NAME} : undef; }