5 use B::Hooks::EndOfScope::WithFallback;
7 plan skip_all => "Tests already executed without B::Hooks::EndOfScope"
8 unless B::Hooks::EndOfScope::WithFallback::__HAS_BHEOS;
10 plan skip_all => "Variable::Magic still required for this test"
11 unless B::Hooks::EndOfScope::WithFallback::__HAS_VM;
13 eval { require Devel::Hide }
14 or plan skip_all => "Devel::Hide required for this test in presence of B::Hooks::EndOfScope";
18 use IPC::Open2 qw(open2);
21 $ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
23 # rerun the tests under the assumption of no bheos but a present vm
25 for my $fn (glob("$Bin/*.t")) {
26 next if $fn =~ /test_without_/;
28 local $ENV{DEVEL_HIDE_VERBOSE} = 0;
30 my @cmd = ( $^X, '-MDevel::Hide=B::Hooks::EndOfScope', $fn );
32 # this is cheating, and may even hang here and there (testing on windows passed fine)
33 # if it does - will have to fix it somehow (really *REALLY* don't want to pull
34 # in IPC::Cmd just for a fucking test)
35 # the alternative would be to have an ENV check in each test to force a subtest
36 open2(my $out, my $in, @cmd);
37 while (my $ln = <$out>) {
42 ok (! $?, "Exit $? from: @cmd");