1 package DBIx::Class::Storage::DBI::Sybase::Base;
8 DBIx::Class::Storage::DBI::Sybase::Base - Common functionality for drivers using
15 Returns true if we have an open (and working) database connection, false if it
16 is not (yet) open (or does not work). (Executes a simple SELECT to make sure it
19 The reason this is needed is that L<DBD::Sybase>'s ping() does not work with an
20 active statement handle, leading to masked database errors.
27 my $super = eval { $self->next::method(@_) };
29 return $super unless $@;
31 my $dbh = $self->_dbh;
32 local $dbh->{RaiseError} = 1;
35 my $ping_sth = $dbh->prepare_cached("select 1");
47 See L<DBIx::Class/CONTRIBUTORS>.
51 You may distribute this code under the same terms as Perl itself.