5 plan skip_all => "PP tests already executed"
6 if $ENV{NAMESPACE_CLEAN_USE_PP};
8 eval { require B::Hooks::EndOfScope }
9 or plan skip_all => "PP tests already executed";
11 # the PP tests will run either wih D::H (mainly on smokers)
12 # or by setting the envvar (for users)
13 my $has_d_h = eval { require Devel::Hide };
17 use IPC::Open2 qw(open2);
18 use File::Glob 'bsd_glob';
21 $ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
23 # rerun the tests under the assumption of pure-perl
24 my $this_file = quotemeta(__FILE__);
26 for my $fn (bsd_glob("$Bin/*.t")) {
27 next if $fn =~ /${this_file}$/;
29 local $ENV{DEVEL_HIDE_VERBOSE} = 0;
30 local $ENV{NAMESPACE_CLEAN_USE_PP} = 1 unless $has_d_h;
33 $has_d_h ? '-MDevel::Hide=B::Hooks::EndOfScope' : (),
37 # this is cheating, and may even hang here and there (testing on windows passed fine)
38 # if it does - will have to fix it somehow (really *REALLY* don't want to pull
39 # in IPC::Cmd just for a fucking test)
40 # the alternative would be to have an ENV check in each test to force a subtest
41 open2(my $out, my $in, @cmd);
42 while (my $ln = <$out>) {
47 ok (! $?, "Exit $? from: @cmd");