From: Peter Rabbitson Date: Fri, 9 Oct 2015 11:09:36 +0000 (+0200) Subject: Make sure $] checks run correctly (another thing my smokers didn't catch) X-Git-Tag: 0.27~11 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=006e9cb47357c9a0878feafbbb35df4f01cc0d09;p=p5sagit%2Fnamespace-clean.git Make sure $] checks run correctly (another thing my smokers didn't catch) --- diff --git a/Changes b/Changes index d284801..b456ebc 100644 --- a/Changes +++ b/Changes @@ -1,4 +1,5 @@ + - Work around P5#72210, resulting in fails on 5.8.8 -Duselongdouble - Fix incorrect name in META (RT#107813) 0.26 2015-10-07 17:43 (UTC) diff --git a/lib/namespace/clean.pm b/lib/namespace/clean.pm index 1aaf795..8d7a56f 100644 --- a/lib/namespace/clean.pm +++ b/lib/namespace/clean.pm @@ -16,7 +16,7 @@ use B::Hooks::EndOfScope 'on_scope_end'; BEGIN { my $provider; - if ( $] < 5.008007 ) { + if ( "$]" < 5.008007 ) { require Package::Stash::PP; $provider = 'Package::Stash::PP'; } diff --git a/lib/namespace/clean/_Util.pm b/lib/namespace/clean/_Util.pm index b1c149f..f2579a0 100644 --- a/lib/namespace/clean/_Util.pm +++ b/lib/namespace/clean/_Util.pm @@ -15,8 +15,8 @@ use strict; use base 'Exporter'; our @EXPORT_OK = qw( DEBUGGER_NEEDS_CV_RENAME DEBUGGER_NEEDS_CV_PIVOT ); -use constant DEBUGGER_NEEDS_CV_RENAME => ( ( $] > 5.008_008 ) and ( $] < 5.013_006 ) ); -use constant DEBUGGER_NEEDS_CV_PIVOT => ( ( ! DEBUGGER_NEEDS_CV_RENAME ) and ( $] < 5.015_005 ) ); +use constant DEBUGGER_NEEDS_CV_RENAME => ( ( "$]" > 5.008_008 ) and ( "$]" < 5.013_006 ) ); +use constant DEBUGGER_NEEDS_CV_PIVOT => ( ( ! DEBUGGER_NEEDS_CV_RENAME ) and ( "$]" < 5.015_005 ) ); # FIXME - ideally this needs to be provided by some abstraction lib # but we don't have that yet diff --git a/t/05-explicit-cleanee.t b/t/05-explicit-cleanee.t index 3cd3bd5..74e93eb 100644 --- a/t/05-explicit-cleanee.t +++ b/t/05-explicit-cleanee.t @@ -30,7 +30,7 @@ SKIP: { skip "This part of the test segfaults perl $] with both tie() and B::H::EOS." . ' Actual code (e.g. DBIx::Class) works fine so did not investigate further', - 2000 if $] < 5.008003; + 2000 if "$]" < 5.008003; local @INC = @INC; my @code; diff --git a/t/09-fiddle-hinthash.t b/t/09-fiddle-hinthash.t index bf7b075..6882db9 100644 --- a/t/09-fiddle-hinthash.t +++ b/t/09-fiddle-hinthash.t @@ -42,7 +42,7 @@ use Test::More 0.88; 'Tied hinthash values not present in extended caller() on perls older than 5.10' .', regardless of mode (PP or XS)', 1 - ) if ($] < 5.010_000); + ) if ("$]" < 5.010_000); package DB; Test::More::is( ( (caller(0))[10] || {} )->{foo}, 'bar', 'hinthash values visible in caller' ); }