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 $].
print $is_gcc_34 ? "yes\n" : "no\n";
# Threads, Windows and 5.8.x don't seem to be best friends
-if ($^O eq 'MSWin32' && $^V lt v5.9.0) {
+if ($^O eq 'MSWin32' && "$]" < 5.009) {
push @DEFINES, '-DA_MULTIPLICITY=0';
}
# Fork emulation got "fixed" in 5.10.1
-if ($^O eq 'MSWin32' && $^V lt v5.10.1) {
+if ($^O eq 'MSWin32' && "$]" < 5.010001) {
push @DEFINES, '-DA_FORKSAFE=0';
}
if (/\bplan\s*[\s\(]\s*tests\b/) {
s/\s*;?\s*$//;
s/^(\s*)//;
- $_ = "$1if (\$] >= 5.011) { $_ } else { plan skip_all => 'perl 5.11 required for keys/values \@array' }\n";
+ $_ = qq($1if ("\$]" >= 5.011) { $_ } else { plan skip_all => 'perl 5.11 required for keys/values \@array' }\n);
}
} else {
$_ = convert_testcase($_, 1);
use Test::Leaner;
BEGIN {
- if ($] >= 5.011) { plan tests => 9 * 3 * 64 } else { plan skip_all => 'perl 5.11 required for keys/values @array' }
+ if ("$]" >= 5.011) { plan tests => 9 * 3 * 64 } else { plan skip_all => 'perl 5.11 required for keys/values @array' }
}
use autovivification::TestCases;
is $@, '', 'second require test doesn\'t croak prematurely';
my $expect;
$expect = { r1_main => { }, r1_eval => { } };
- $expect->{r2_eval} = { } if $] < 5.009005;
+ $expect->{r2_eval} = { } if "$]" < 5.009005;
is_deeply $blurp, $expect, 'second require test didn\'t vivify';
}
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;
}
use threads;
SKIP:
{
skip 'Hints aren\'t propagated into eval STRING below perl 5.10' => 3 * 2
- unless $] >= 5.010;
+ unless "$]" >= 5.010;
{
my $x;
eval 'my $y = $x->{foo}';
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;
}
use threads;
SKIP:
{
- skip 'Fails on 5.8.2 and lower' => 1 if $] <= 5.008002;
+ skip 'Fails on 5.8.2 and lower' => 1 if "$]" <= 5.008002;
my $status = run_perl <<' RUN';
my $code = 1 + 2 + 4;