From: Rafael Kitover Date: Wed, 1 Jul 2009 13:45:05 +0000 (+0000) Subject: use dbh->do for connected instead of prepare_cached X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=283fb613d903a0b95e15ea26d248b7fd2ad81c6a;p=dbsrgits%2FDBIx-Class-Historic.git use dbh->do for connected instead of prepare_cached --- diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm b/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm index d4e287e..4dcea42 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm @@ -24,17 +24,10 @@ active statement handle, leading to masked database errors. sub connected { my $self = shift; - my $super = eval { $self->next::method(@_) }; - - return $super unless $@; - my $dbh = $self->_dbh; local $dbh->{RaiseError} = 1; - eval { - my $ping_sth = $dbh->prepare_cached("select 1"); - $ping_sth->execute; - $ping_sth->finish; + $dbh->do('select 1'); }; return $@ ? 0 : 1;