4 use base qw(DBIx::Class);
8 my @connect = ("dbi:mysql:test", "", "");
10 $dbh = DBI->connect(@connect) or die DBI->errstr;
13 END { $dbh->do("DROP TABLE $_") foreach @table }
15 __PACKAGE__->connection(@connect);
19 $class->table($class->create_test_table);
22 sub create_test_table {
24 my $table = $self->next_available_table;
25 my $create = sprintf "CREATE TABLE $table ( %s )", $self->create_sql;
31 sub next_available_table {
34 $dbh->selectcol_arrayref(
40 my $table = $tables[-1] || "aaa";