9ce130f13ff9973ee197af05d62390be73656096
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / Sybase / Base.pm
1 package # hide from PAUSE
2     DBIx::Class::Storage::DBI::Sybase::Base;
3
4 use strict;
5 use warnings;
6
7 =head1 NAME
8
9 DBIx::Class::Storage::DBI::Sybase::Base - Common functionality for drivers using
10 DBD::Sybase
11
12 =cut
13
14 sub _ping {
15   my $self = shift;
16
17   my $dbh = $self->_dbh or return 0;
18
19   local $dbh->{RaiseError} = 1;
20   eval {
21     $dbh->do('select 1');
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