1 BEGIN { do "./t/lib/ANFANG.pm" or die ( $@ || $! ) }
14 my $wait_for = 120; # how many seconds to wait
16 # don't lock anything - this is a tempfile anyway
17 $ENV{DBICTEST_LOCK_HOLDER} = -1;
21 my $tmp = File::Temp->new(
25 TEMPLATE => 'DBIxClass-XXXXXX',
26 EXLOCK => 0, # important for BSD and derivatives
29 my $tmp_fn = $tmp->filename;
32 local $SIG{ALRM} = sub { die sprintf (
33 "Timeout of %d seconds reached (tempfile still open: %s)",
34 $wait_for, $close ? 'No' : 'Yes'
40 my $schema = DBICTest::Schema->connect ("DBI:SQLite:$tmp_fn");
41 $schema->storage->dbh_do(sub { $_[1]->do('PRAGMA synchronous = OFF') });
42 DBICTest->deploy_schema ($schema);
43 DBICTest->populate_schema ($schema);