From: Rafael Kitover Date: Wed, 1 Jul 2009 14:03:22 +0000 (+0000) Subject: use ->do instead of ->prepare_cached in oracle's connected() too X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2932b9a6f512f0cd98712bfd7b7117f8675f0076;p=dbsrgits%2FDBIx-Class-Historic.git use ->do instead of ->prepare_cached in oracle's connected() too --- diff --git a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm index 7eadf44..ee356aa 100644 --- a/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm +++ b/lib/DBIx/Class/Storage/DBI/Oracle/Generic.pm @@ -99,16 +99,13 @@ sub connected { if (not $self->next::method(@_)) { return 0; - } - else { + } else { my $dbh = $self->_dbh; local $dbh->{RaiseError} = 1; eval { - my $ping_sth = $dbh->prepare_cached("select 1 from dual"); - $ping_sth->execute; - $ping_sth->finish; + $dbh->do("select 1 from dual"); }; return $@ ? 0 : 1; diff --git a/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm b/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm index 4dcea42..e1ebe88 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase/Base.pm @@ -6,7 +6,7 @@ use warnings; =head1 NAME DBIx::Class::Storage::DBI::Sybase::Base - Common functionality for drivers using -L +DBD::Sybase =head1 METHODS