X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F05_thread_clone.t;h=f2c939f9af5f5414d7eab1d24d77364707992d66;hb=b1bee216b13ba067c620587ce49899927e103970;hp=5c15ba7657c44097ed84bb5b7393df057653835a;hpb=6f93d768566ef08e28e5b1b732a63c0e04dfbf68;p=p5sagit%2FDevel-GlobalDestruction.git diff --git a/t/05_thread_clone.t b/t/05_thread_clone.t index 5c15ba7..f2c939f 100644 --- a/t/05_thread_clone.t +++ b/t/05_thread_clone.t @@ -18,19 +18,9 @@ BEGIN { BEGIN { if ($ENV{DEVEL_GLOBALDESTRUCTION_PP_TEST}) { - no strict 'refs'; - no warnings 'redefine'; - - for my $f (qw(DynaLoader::bootstrap XSLoader::load)) { - my ($mod) = $f =~ /^ (.+) \:\: [^:]+ $/x; - eval "require $mod" or die $@; - - my $orig = \&$f; - *$f = sub { - die 'no XS' if ($_[0]||'') eq 'Devel::GlobalDestruction'; - goto $orig; - }; - } + unshift @INC, sub { + die 'no XS' if $_[1] eq 'Devel/GlobalDestruction/XS.pm'; + }; } }