BEGIN {
if ($ENV{DEVEL_GLOBALDESTRUCTION_PP_TEST}) {
- require DynaLoader;
- no warnings 'redefine';
- my $orig = \&DynaLoader::bootstrap;
- *DynaLoader::bootstrap = sub {
- die 'no XS' if $_[0] eq 'Devel::GlobalDestruction';
- goto $orig;
+ unshift @INC, sub {
+ die 'no XS' if $_[1] eq 'Devel/GlobalDestruction/XS.pm';
};
}
}