CAM-Session
view release on metacpan or search on metacpan
my $dbh = DBI->connect($config{dsn}, $config{user}, $config{pass},
{
RaiseError => 0,
PrintError => 0,
AutoCommit => 1,
});
SKIP: {
if (!$dbh)
{
diag("Use the following settings to permit connections\n" .
" setenv DBI_DSN DBI:mysql:database=test\n" .
" setenv DBI_USER testuser\n" .
" setenv DBI_PASS testpass\n");
skip("Failed to connect to database. See advice above.",
# Hack: get the number of tests we expect, skip all but one
# This hack relies on the soliton nature of Test::Builder
Test::Builder->new()->expected_tests() -
Test::Builder->new()->current_test());
}
$dbh->do("drop table $config{table}"); # don't care if it fails
( run in 0.362 second using v1.01-cache-2.11-cpan-3989ada0592 )