6 plan skip_all => "PP tests already executed"
7 if $ENV{NAMESPACE_CLEAN_USE_PP};
9 plan skip_all => "B::Hooks::EndOfScope ($INC{'B/Hooks/EndOfScope.pm'}) loaded before the test even started >.<"
10 if $INC{'B/Hooks/EndOfScope.pm'};
12 eval { require Variable::Magic }
13 or plan skip_all => "PP tests already executed";
15 $ENV{B_HOOKS_ENDOFSCOPE_IMPLEMENTATION} = 'PP';
18 use B::Hooks::EndOfScope 0.12;
21 ($INC{'B/Hooks/EndOfScope/PP.pm'} && ! $INC{'B/Hooks/EndOfScope/XS.pm'}),
22 'PP BHEOS loaded properly'
24 map { sprintf '%s => %s', $_, $INC{"B/Hooks/$_"} || 'undef' }
25 qw|EndOfScope.pm EndOfScope/XS.pm EndOfScope/PP.pm|
30 use IPC::Open2 qw(open2);
31 use File::Glob 'bsd_glob';
34 $ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
37 # rerun the tests under the assumption of pure-perl
38 my $this_file = quotemeta(__FILE__);
40 for my $fn (bsd_glob("$Bin/*.t")) {
41 next if $fn =~ /${this_file}$/;
45 # this is cheating, and may even hang here and there (testing on windows passed fine)
46 # if it does - will have to fix it somehow (really *REALLY* don't want to pull
47 # in IPC::Cmd just for a fucking test)
48 # the alternative would be to have an ENV check in each test to force a subtest
49 open2(my $out, my $in, @cmd);
50 while (my $ln = <$out>) {
55 ok (! $?, "Exit $? from: @cmd");