5 plan skip_all => "PP tests already executed"
6 if $ENV{NAMESPACE_CLEAN_USE_PP};
8 eval { require Variable::Magic }
9 or plan skip_all => "PP tests already executed";
11 $ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION} = 'PP';
12 require B::Hooks::EndOfScope;
13 ok( ($INC{'B/Hooks/EndOfScope/PP.pm'} && ! $INC{'B/Hooks/EndOfScope/XS.pm'}),
14 'PP BHEOS loaded properly');
18 use IPC::Open2 qw(open2);
19 use File::Glob 'bsd_glob';
22 $ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
25 # rerun the tests under the assumption of pure-perl
26 my $this_file = quotemeta(__FILE__);
28 for my $fn (bsd_glob("$Bin/*.t")) {
29 next if $fn =~ /${this_file}$/;
33 # this is cheating, and may even hang here and there (testing on windows passed fine)
34 # if it does - will have to fix it somehow (really *REALLY* don't want to pull
35 # in IPC::Cmd just for a fucking test)
36 # the alternative would be to have an ENV check in each test to force a subtest
37 open2(my $out, my $in, @cmd);
38 while (my $ln = <$out>) {
43 ok (! $?, "Exit $? from: @cmd");