From: Rafael Kitover Date: Wed, 1 Jul 2009 15:20:52 +0000 (+0000) Subject: fix segfault with old DBD::Sybase X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d7ffa0cef0cf0ed4bca219d37b6fa0707b87813d;p=dbsrgits%2FDBIx-Class-Historic.git fix segfault with old DBD::Sybase --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm b/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm index e1ebe88..29265fb 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm @@ -24,7 +24,9 @@ active statement handle, leading to masked database errors. sub connected { my $self = shift; - my $dbh = $self->_dbh; + my $dbh = $self->_dbh or return 0; + $dbh->FETCH('Active') or return 0; + local $dbh->{RaiseError} = 1; eval { $dbh->do('select 1');