2 delete $ENV{DBICTEST_VERSION_WARNS_INDISCRIMINATELY};
3 do "./t/lib/ANFANG.pm" or die ( $@ || $! )
9 use DBIx::Class::_Util 'sigwarn_silencer';
10 use if DBIx::Class::_ENV_::BROKEN_FORK, 'threads';
18 if (my @offenders = grep { $_ !~ m{DBIx/Class/(?:_Util|Carp|Exception|StartupCheck)\.pm} } grep { $_ =~ /(^|\/)DBI/ } keys %INC) {
19 die "Wtf - DBI* modules present in %INC: @offenders";
22 local $SIG{__WARN__} = sigwarn_silencer( qr/\bdeprecated\b/i );
23 require( ( $fn =~ m| t/lib/ (.+) |x )[0] ); # untaint and strip lib-part (. is unavailable under -T)
32 return unless ( -f $_ and $_ =~ /\.pm$/ );
34 if (DBIx::Class::_ENV_::BROKEN_FORK) {
35 # older perls crash if threads are spawned way too quickly, sleep for 100 msecs
36 my $t = threads->create(sub { $worker->($_) });
37 select( undef, undef, undef, 0.1);
38 is ($t->join, 42, "Thread loading $_ did not finish successfully")
39 || diag ($t->can('error') ? $t->error : 'threads.pm too old to retrieve the error :(' );
51 is ( waitpid($pid, 0), $pid, "Fork $pid terminated sucessfully");
53 is ( $ex, 0, "Loading $_ ($pid) exitted with $ex" );
58 }, 't/lib/DBICTest/Schema/');