1 package # hide from PAUSE
12 use base qw(DBIx::Class::CDBICompat);
14 my @connect = (@ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/}, { PrintError => 0});
15 # this is only so we grab a lock on mysql
17 my $x = DBICTest::Schema->connect(@connect);
20 our $dbh = DBI->connect(@connect) or die DBI->errstr;
24 $dbh->do("DROP TABLE $_") for @table;
28 __PACKAGE__->connection(@connect);
32 $class->table($class->create_test_table);
35 sub create_test_table {
37 my $table = $self->next_available_table;
38 my $create = sprintf "CREATE TABLE $table ( %s )", $self->create_sql;
44 sub next_available_table {
47 $dbh->selectcol_arrayref(
53 my $table = $tables[-1] || "aaa";