An old bug could cause $] to be initialized to a wrong decimal value.
Since its stringified value was always right, we use it instead.
Occurences of $^V were also replaced by $].
BEGIN {
$main_process = $$;
- if ($] >= 5.008 and $INC{'threads.pm'}) {
+ if ("$]" >= 5.008 and $INC{'threads.pm'}) {
my $use_ithreads = do {
require Config;
no warnings 'once';
'and' => 'and',
'||' => 'hor',
- ('//' => 'dor') x ($] >= 5.010),
+ ('//' => 'dor') x ("$]" >= 5.010),
'&&' => 'hand',
'|' => 'bor',
'=~' => 'like',
'!~' => 'unlike',
- ('~~' => 'smartmatch') x ($] >= 5.010),
+ ('~~' => 'smartmatch') x ("$]" >= 5.010),
'+' => 'add',
'-' => 'substract',
use warnings;
BEGIN {
- if ($^V ge v5.8.4 and $^V le v5.8.5) {
+ if ("$]" >= 5.008004 and "$]" <= 5.008005) {
require Test::More;
Test::More::plan(skip_all
=> 'goto may segfault randomly on perl 5.8.4 and 5.8.5');
skipall 'This perl wasn\'t built to support threads'
unless $Config{useithreads};
skipall 'perl 5.13.4 required to test thread safety'
- unless $force or $] >= 5.013004;
+ unless $force or "$]" >= 5.013004;
skipall "threads $t_v required to test thread safety"
unless eval "use threads $t_v; 1";
}
my $buf_ref;
sub capture_to_buffer {
- return unless $] >= 5.008;
+ return unless "$]" >= 5.008;
die "Can't call capture_to_buffer twice" if $memory_stream;
local $Test::Builder::Level = ($Test::Builder::Level || 0) + 1;
my $use_fallback = $ENV{PERL_TEST_LEANER_USES_TEST_MORE};
- if ($use_fallback and $^V ge v5.8.4 and $^V le v5.8.5) {
+ if ($use_fallback and "$]" >= 5.008004 and "$]" <= 5.008005) {
Test::More::plan(skip_all
=> 'goto may segfault randomly on perl 5.8.4 and 5.8.5');
} else {