Switch to C3 mro throughout the ::Storage hierarchy (DBIx::Class brings in MRO::Compa...
[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 use base qw/DBIx::Class::Storage::DBI/;
8 use mro 'c3';
9
10 =head1 NAME
11
12 DBIx::Class::Storage::DBI::Sybase::Base - Common functionality for drivers using
13 DBD::Sybase
14
15 =cut
16
17 sub _ping {
18   my $self = shift;
19
20   my $dbh = $self->_dbh or return 0;
21
22   local $dbh->{RaiseError} = 1;
23   eval {
24     $dbh->do('select 1');
25   };
26
27   return $@ ? 0 : 1;
28 }
29
30 1;
31
32 =head1 AUTHORS
33
34 See L<DBIx::Class/CONTRIBUTORS>.
35
36 =head1 LICENSE
37
38 You may distribute this code under the same terms as Perl itself.
39
40 =cut