Standardize on 2-space tab
[p5sagit/Devel-GlobalDestruction.git] / t / 02_thread.t
CommitLineData
844f2408 1use Config;
2BEGIN {
3 unless ($Config{useithreads}) {
4 print "1..0 # SKIP your perl does not support ithreads\n";
5 exit 0;
6 }
7}
8
9BEGIN {
10 unless (eval { require threads }) {
11 print "1..0 # SKIP threads.pm not installed\n";
12 exit 0;
13 }
14}
15
16use threads;
17use warnings;
18use strict;
19
9aaf3646 20BEGIN {
53daa838 21 if ($ENV{DEVEL_GLOBALDESTRUCTION_PP_TEST}) {
22 require DynaLoader;
23 no warnings 'redefine';
24 my $orig = \&DynaLoader::bootstrap;
25 *DynaLoader::bootstrap = sub {
26 die 'no XS' if $_[0] eq 'Devel::GlobalDestruction';
27 goto $orig;
28 };
29 }
9aaf3646 30}
31
844f2408 32my $t = threads->create(sub { do 't/01_basic.t' });
33$t->join;
34
35exit 0;