Commit | Line | Data |
---|---|---|
6dc4be0f | 1 | package # hide from PAUSE |
2 | DBIx::Class::Storage::DBI::Sybase::Base; | |
eabab5d0 | 3 | |
4 | use strict; | |
5 | use warnings; | |
6 | ||
7 | =head1 NAME | |
8 | ||
9 | DBIx::Class::Storage::DBI::Sybase::Base - Common functionality for drivers using | |
2932b9a6 | 10 | DBD::Sybase |
eabab5d0 | 11 | |
eabab5d0 | 12 | =cut |
13 | ||
6dc4be0f | 14 | sub _ping { |
eabab5d0 | 15 | my $self = shift; |
16 | ||
d7ffa0ce | 17 | my $dbh = $self->_dbh or return 0; |
d7ffa0ce | 18 | |
526dc858 | 19 | local $dbh->{RaiseError} = 1; |
eabab5d0 | 20 | eval { |
283fb613 | 21 | $dbh->do('select 1'); |
eabab5d0 | 22 | }; |
23 | ||
24 | return $@ ? 0 : 1; | |
25 | } | |
26 | ||
27 | 1; | |
28 | ||
29 | =head1 AUTHORS | |
30 | ||
31 | See L<DBIx::Class/CONTRIBUTORS>. | |
32 | ||
33 | =head1 LICENSE | |
34 | ||
35 | You may distribute this code under the same terms as Perl itself. | |
36 | ||
37 | =cut |