1 package # hide from PAUSE
10 use base qw(DBIx::Class::CDBICompat);
12 my @connect = (@ENV{map { "DBICTEST_MYSQL_${_}" } qw/DSN USER PASS/}, { PrintError => 0});
13 # this is only so we grab a lock on mysql
15 my $x = DBICTest::Schema->connect(@connect);
18 our $dbh = DBI->connect(@connect) or die DBI->errstr;
22 $dbh->do("DROP TABLE $_") for @table;
26 __PACKAGE__->connection(@connect);
30 $class->table($class->create_test_table);
33 sub create_test_table {
35 my $table = $self->next_available_table;
36 my $create = sprintf "CREATE TABLE $table ( %s )", $self->create_sql;
42 sub next_available_table {
45 $dbh->selectcol_arrayref(
51 my $table = $tables[-1] || "aaa";