sub connected {
my $self = shift;
- my $dbh = $self->_dbh;
+ my $super = eval { $self->next::method(@_) };
- local $dbh->{RaiseError} = 1;
+ return $super unless $@;
- my $ping_sth;
+ my $dbh = $self->_dbh;
+ local $dbh->{RaiseError} = 1;
eval {
my $ping_sth = $dbh->prepare_cached("select 1");
# start disconnected to test reconnection
$schema->storage->ensure_connected;
-$schema->storage->disconnect;
+$schema->storage->_dbh->disconnect;
isa_ok( $schema->storage, 'DBIx::Class::Storage::DBI::Sybase' );
# start disconnected to test reconnection
$schema->storage->ensure_connected;
-$schema->storage->disconnect;
+$schema->storage->_dbh->disconnect;
my $dbh = $schema->storage->dbh;