From: Peter Rabbitson Date: Thu, 22 Dec 2011 11:20:59 +0000 (+0100) Subject: Run the PP tests with or without Devek::Hide X-Git-Tag: 0.22~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Fnamespace-clean.git;a=commitdiff_plain;h=fb070db23b3a9892f4e3a74c3bbf6f9a67098477 Run the PP tests with or without Devek::Hide --- diff --git a/t/10-pure-perl.t b/t/10-pure-perl.t index 0ba946b..825a899 100644 --- a/t/10-pure-perl.t +++ b/t/10-pure-perl.t @@ -8,8 +8,9 @@ plan skip_all => "PP tests already executed" eval { require B::Hooks::EndOfScope } or plan skip_all => "PP tests already executed"; -eval { require Devel::Hide } - or plan skip_all => "Devel::Hide required for this test in presence of B::Hooks::EndOfScope"; +# the PP tests will run either wih D::H (mainly on smokers) +# or by setting the envvar (for users) +my $has_d_h = eval { require Devel::Hide }; use Config; use FindBin qw($Bin); @@ -25,7 +26,12 @@ for my $fn (glob("$Bin/*.t")) { next if $fn =~ /${this_file}$/; local $ENV{DEVEL_HIDE_VERBOSE} = 0; - my @cmd = ( $^X, '-MDevel::Hide=B::Hooks::EndOfScope', $fn ); + local $ENV{NAMESPACE_CLEAN_USE_PP} = 1 unless $has_d_h; + my @cmd = ( + $^X, + $has_d_h ? '-MDevel::Hide=B::Hooks::EndOfScope' : (), + $fn + ); # this is cheating, and may even hang here and there (testing on windows passed fine) # if it does - will have to fix it somehow (really *REALLY* don't want to pull