Dancer-Plugin-Database-Core

 view release on metacpan or  search on metacpan

lib/Dancer/Plugin/Database/Core.pm  view on Meta::CPAN

    my $package = $handle_class;
    $package =~ s{::}{/}g;
    $package .= '.pm';
    require $package;

    return bless($dbh => $handle_class);
}



# Check the connection is alive
sub _check_connection {
    my $dbh = shift;
    return unless $dbh;
    if ($dbh->{Active}) { 
        my $result = eval { $dbh->ping };

        return 0 if $@;

	    if (int($result)) {
            # DB driver itself claims all is OK, trust it:



( run in 1.455 second using v1.01-cache-2.11-cpan-39bf76dae61 )