on_connect_call => 'datetime_setup',
});
- my $guard = Scope::Guard->new(\&cleanup);
+ my $guard = Scope::Guard->new(sub { cleanup($schema) } );
$schema->storage->ensure_connected;
# clean up our mess
sub cleanup {
+ my $schema = shift;
if (my $dbh = eval { $schema->storage->dbh }) {
$dbh->do('DROP TABLE track');
$dbh->do('DROP TABLE event_small_dt');