From: Peter Rabbitson Date: Tue, 25 Jan 2011 12:20:42 +0000 (+0100) Subject: Stop eating syntax errors in ODBC drivers X-Git-Tag: v0.08191~105 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4888397f2f384216ccade72327ea1c2d31eb8885;p=dbsrgits%2FDBIx-Class.git Stop eating syntax errors in ODBC drivers --- diff --git a/lib/DBIx/Class/Storage/DBI/ODBC.pm b/lib/DBIx/Class/Storage/DBI/ODBC.pm index 7a20900..15fff7b 100644 --- a/lib/DBIx/Class/Storage/DBI/ODBC.pm +++ b/lib/DBIx/Class/Storage/DBI/ODBC.pm @@ -10,8 +10,7 @@ use namespace::clean; sub _rebless { my ($self) = @_; - try { - my $dbtype = $self->_get_dbh->get_info(17); + if (my $dbtype = try { $self->_get_dbh->get_info(17) }) { # Translate the backend name into a perl identifier $dbtype =~ s/\W/_/gi; @@ -21,7 +20,7 @@ sub _rebless { bless $self, $subclass; $self->_rebless; } - }; + } } 1;