Skip to content

Commit a16bffc

Browse files
committed
fix string comparisons with $] to use numeric comparison instead
The fix follows Zefram's suggestion from https://www.nntp.perl.org/group/perl.perl5.porters/2012/05/msg186846.html > On older perls, however, $] had a numeric value that was built up using > floating-point arithmetic, such as 5+0.006+0.000002. This would not > necessarily match the conversion of the complete value from string form > [perl #72210]. You can work around that by explicitly stringifying > $] (which produces a correct string) and having *that* numify (to a > correctly-converted floating point value) for comparison. I cultivate > the habit of always stringifying $] to work around this, regardless of > the threshold where the bug was fixed. So I'd write > > use if "$]" >= 5.014, warnings => "non_unicode";
1 parent 332d97a commit a16bffc

File tree

50 files changed

+83
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+83
-83
lines changed

cpan/CPAN-Meta-Requirements/t/from-hash.t

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for my $string (10, '>= 2, <= 9, != 7') {
4343

4444
SKIP: {
4545
skip "Can't tell v-strings from strings until 5.8.1", 1
46-
unless $] gt '5.008';
46+
unless "$]" > '5.008';
4747
my $string_hash = {
4848
Left => 10,
4949
Shared => '= 2',
@@ -87,7 +87,7 @@ SKIP: {
8787

8888
SKIP: {
8989
skip "Can't tell v-strings from strings until 5.8.1", 2
90-
unless $] gt '5.008';
90+
unless "$]" > '5.008';
9191
my $string_hash = {
9292
Left => 10,
9393
Shared => v50.44.60,

cpan/CPAN-Meta-YAML/t/01_compile.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ BEGIN {
1111
use Test::More 0.88;
1212

1313
# Check their perl version
14-
ok( $] ge '5.008001', "Your perl is new enough" );
14+
ok( "$]" >= '5.008001', "Your perl is new enough" );
1515

1616
# Does the module load
1717
require_ok( 'CPAN::Meta::YAML' );

cpan/CPAN-Meta/lib/CPAN/Meta.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ sub save {
398398
my ($self, $file, $options) = @_;
399399

400400
my $version = $options->{version} || '2';
401-
my $layer = $] ge '5.008001' ? ':utf8' : '';
401+
my $layer = "$]" >= '5.008001' ? ':utf8' : '';
402402

403403
if ( $version ge '2' ) {
404404
carp "'$file' should end in '.json'"

cpan/HTTP-Tiny/lib/HTTP/Tiny.pm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ sub _prepare_headers_and_cb {
865865
}
866866
elsif ( length $args->{content} ) {
867867
my $content = $args->{content};
868-
if ( $] ge '5.008' ) {
868+
if ( "$]" >= '5.008' ) {
869869
utf8::downgrade($content, 1)
870870
or die(qq/Wide character in request message body\n/);
871871
}
@@ -1032,7 +1032,7 @@ my $unsafe_char = qr/[^A-Za-z0-9\-\._~]/;
10321032
sub _uri_escape {
10331033
my ($self, $str) = @_;
10341034
return "" if !defined $str;
1035-
if ( $] ge '5.008' ) {
1035+
if ( "$]" >= '5.008' ) {
10361036
utf8::encode($str);
10371037
}
10381038
else {
@@ -1189,7 +1189,7 @@ sub write {
11891189
@_ == 2 || die(q/Usage: $handle->write(buf)/ . "\n");
11901190
my ($self, $buf) = @_;
11911191

1192-
if ( $] ge '5.008' ) {
1192+
if ( "$]" >= '5.008' ) {
11931193
utf8::downgrade($buf, 1)
11941194
or die(qq/Wide character in write()\n/);
11951195
}
@@ -1474,7 +1474,7 @@ sub write_content_body {
14741474
defined $data && length $data
14751475
or last;
14761476

1477-
if ( $] ge '5.008' ) {
1477+
if ( "$]" >= '5.008' ) {
14781478
utf8::downgrade($data, 1)
14791479
or die(qq/Wide character in write_content()\n/);
14801480
}
@@ -1521,7 +1521,7 @@ sub write_chunked_body {
15211521
defined $data && length $data
15221522
or last;
15231523

1524-
if ( $] ge '5.008' ) {
1524+
if ( "$]" >= '5.008' ) {
15251525
utf8::downgrade($data, 1)
15261526
or die(qq/Wide character in write_chunked_body()\n/);
15271527
}

cpan/Pod-Simple/lib/Pod/Simple.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ BEGIN {
3333
die "MANY_LINES is too small (", MANY_LINES(), ")!\nAborting";
3434
}
3535
if(defined &UNICODE) { }
36-
elsif($] >= 5.008) { *UNICODE = sub() {1} }
36+
elsif("$]" >= 5.008) { *UNICODE = sub() {1} }
3737
else { *UNICODE = sub() {''} }
3838
}
3939
if(DEBUG > 2) {
@@ -42,7 +42,7 @@ if(DEBUG > 2) {
4242
}
4343

4444
# The NO BREAK SPACE and SOFT HYHPEN are used in several submodules.
45-
if ($] ge 5.007_003) { # On sufficiently modern Perls we can handle any
45+
if ("$]" >= 5.007_003) { # On sufficiently modern Perls we can handle any
4646
# character set
4747
$Pod::Simple::nbsp = chr utf8::unicode_to_native(0xA0);
4848
$Pod::Simple::shy = chr utf8::unicode_to_native(0xAD);

cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ sub my_qr ($$) {
3535
my ($input_re, $should_match) = @_;
3636
# XXX could have a third parameter $shouldnt_match for extra safety
3737

38-
my $use_utf8 = ($] le 5.006002) ? 'use utf8;' : "";
38+
my $use_utf8 = ("$]" <= 5.006002) ? 'use utf8;' : "";
3939

4040
my $re = eval "no warnings; $use_utf8 qr/$input_re/";
4141
#print STDERR __LINE__, ": $input_re: $@\n" if $@;
@@ -93,7 +93,7 @@ my $deprecated_re = my_qr('\p{IsDeprecated}', "\x{149}");
9393
$deprecated_re = qr/\x{149}/ unless $deprecated_re;
9494

9595
my $utf8_bom;
96-
if (($] ge 5.007_003)) {
96+
if (("$]" >= 5.007_003)) {
9797
$utf8_bom = "\x{FEFF}";
9898
utf8::encode($utf8_bom);
9999
} else {
@@ -266,13 +266,13 @@ sub parse_lines { # Usage: $parser->parse_lines(@lines)
266266
# XXX probably if the line has E<foo> that evaluates to illegal CP1252,
267267
# then it is UTF-8. But we haven't processed E<> yet.
268268

269-
goto set_1252 if $] lt 5.006_000; # No UTF-8 on very early perls
269+
goto set_1252 if "$]" <= 5.006_000; # No UTF-8 on very early perls
270270

271271
my $copy;
272272

273273
no warnings 'utf8';
274274

275-
if ($] ge 5.007_003) {
275+
if ("$]" >= 5.007_003) {
276276
$copy = $line;
277277

278278
# On perls that have this function, we can use it to easily see if the
@@ -286,7 +286,7 @@ sub parse_lines { # Usage: $parser->parse_lines(@lines)
286286
}
287287
else { # ASCII, no decode(): do it ourselves using the fundamental
288288
# characteristics of UTF-8
289-
use if $] le 5.006002, 'utf8';
289+
use if "$]" <= 5.006002, 'utf8';
290290

291291
my $char_ord;
292292
my $needed; # How many continuation bytes to gobble up

cpan/Pod-Simple/lib/Pod/Simple/DumpAsXML.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ sub _handle_element_end {
6767
sub _xml_escape {
6868
foreach my $x (@_) {
6969
# Escape things very cautiously:
70-
if ($] ge 5.007_003) {
70+
if ("$]" >= 5.007_003) {
7171
$x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(utf8::native_to_unicode(ord($1))).';'/eg;
7272
} else { # Is broken for non-ASCII platforms on early perls
7373
$x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg;

cpan/Pod-Simple/lib/Pod/Simple/HTML.pm

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ sub section_name_tidy {
701701
$section =~ s/^\s+//;
702702
$section =~ s/\s+$//;
703703
$section =~ tr/ /_/;
704-
if ($] ge 5.006) {
704+
if ("$]" >= 5.006) {
705705
$section =~ s/[[:cntrl:][:^ascii:]]//g; # drop crazy characters
706706
} elsif ('A' eq chr(65)) { # But not on early EBCDIC
707707
$section =~ tr/\x00-\x1F\x80-\x9F//d;
@@ -724,7 +724,7 @@ sub general_url_escape {
724724
# A pretty conservative escaping, behoovey even for query components
725725
# of a URL (see RFC 2396)
726726

727-
if ($] ge 5.007_003) {
727+
if ("$]" >= 5.007_003) {
728728
$string =~ s/([^-_\.!~*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/sprintf('%%%02X',utf8::native_to_unicode(ord($1)))/eg;
729729
} else { # Is broken for non-ASCII platforms on early perls
730730
$string =~ s/([^-_\.!~*()abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/sprintf('%%%02X',ord($1))/eg;
@@ -862,7 +862,7 @@ sub esc { # a function.
862862
@_ = splice @_; # break aliasing
863863
} else {
864864
my $x = shift;
865-
if ($] ge 5.007_003) {
865+
if ("$]" >= 5.007_003) {
866866
$x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(utf8::native_to_unicode(ord($1))).';'/eg;
867867
} else { # Is broken for non-ASCII platforms on early perls
868868
$x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg;
@@ -873,7 +873,7 @@ sub esc { # a function.
873873
foreach my $x (@_) {
874874
# Escape things very cautiously:
875875
if (defined $x) {
876-
if ($] ge 5.007_003) {
876+
if ("$]" >= 5.007_003) {
877877
$x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(utf8::native_to_unicode(ord($1))).';'/eg
878878
} else { # Is broken for non-ASCII platforms on early perls
879879
$x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg

cpan/Pod-Simple/lib/Pod/Simple/RTF.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ sub to_uni ($) { # Convert native code point to Unicode
1818
my $x = shift;
1919

2020
# Broken for early EBCDICs
21-
$x = chr utf8::native_to_unicode(ord $x) if $] ge 5.007_003
21+
$x = chr utf8::native_to_unicode(ord $x) if "$]" >= 5.007_003
2222
&& ord("A") != 65;
2323
return $x;
2424
}
@@ -549,7 +549,7 @@ my $other_unicode =
549549
Pod::Simple::BlackBox::my_qr('([\x{10000}-\x{10FFFF}])', "\x{10000}");
550550

551551
sub esc_uni($) {
552-
use if $] le 5.006002, 'utf8';
552+
use if "$]" >= 5.006002, 'utf8';
553553

554554
my $x = shift;
555555

cpan/Pod-Simple/lib/Pod/Simple/XMLOutStream.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ sub _handle_element_end {
7676
sub _xml_escape {
7777
foreach my $x (@_) {
7878
# Escape things very cautiously:
79-
if ($] ge 5.007_003) {
79+
if ("$]" >= 5.007_003) {
8080
$x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(utf8::native_to_unicode(ord($1))).';'/eg;
8181
} else { # Is broken for non-ASCII platforms on early perls
8282
$x =~ s/([^-\n\t !\#\$\%\(\)\*\+,\.\~\/\:\;=\?\@\[\\\]\^_\`\{\|\}abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789])/'&#'.(ord($1)).';'/eg;

cpan/Pod-Simple/t/ascii_order.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ($)
55
my $string = shift;
66

77
return $string if ord("A") == 65
8-
|| $] lt 5.007_003; # Doesn't work on early EBCDIC Perls
8+
|| "$]" < 5.007_003; # Doesn't work on early EBCDIC Perls
99
my $output = "";
1010
for my $i (0 .. length($string) - 1) {
1111
$output .= chr(utf8::native_to_unicode(ord(substr($string, $i, 1))));

cpan/Pod-Simple/t/encod04.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use Pod::Simple::XMLOutStream;
1818
my $x97;
1919
my $x91;
2020
my $dash;
21-
if ($] ge 5.007_003) {
21+
if ("$]" >= 5.007_003) {
2222
$x97 = chr utf8::unicode_to_native(0x97);
2323
$x91 = chr utf8::unicode_to_native(0x91);
2424
$dash = '&#8212';

cpan/Scalar-List-Utils/t/stack-corruption.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!./perl
22

33
BEGIN {
4-
if ($] eq "5.008009" or $] eq "5.010000" or $] le "5.006002") {
4+
if ("$]" == "5.008009" or "$]" == "5.010000" or "$]" <= "5.006002") {
55
print "1..0 # Skip: known to fail on $]\n";
66
exit 0;
77
}

cpan/Scalar-List-Utils/t/sum.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ SKIP: {
9898
cmp_ok($t, 'gt', 1152921504606846976, 'sum uses IV where it can'); # string comparison because Perl 5.6 does not compare it numerically correctly
9999

100100
SKIP: {
101-
skip "known to fail on $]", 1 if $] le "5.006002";
101+
skip "known to fail on $]", 1 if "$]" <= "5.006002";
102102
$t = sum(1<<60, 1);
103103
cmp_ok($t, '>', 1<<60, 'sum uses IV where it can');
104104
}

cpan/Scalar-List-Utils/t/uniq.t

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ is_deeply( [ uniqstr qw( 1 1.0 1E0 ) ],
4444
}
4545

4646
SKIP: {
47-
skip 'Perl 5.007003 with utf8::encode is required', 3 if $] lt "5.007003";
47+
skip 'Perl 5.007003 with utf8::encode is required', 3 if "$]" < "5.007003";
4848
my $warnings = "";
4949
local $SIG{__WARN__} = sub { $warnings .= join "", @_ };
5050

@@ -99,7 +99,7 @@ is_deeply( [ uniqint 6.1, 6.2, 6.3 ],
9999
}
100100

101101
SKIP: {
102-
skip('UVs are not reliable on this perl version', 2) unless $] ge "5.008000";
102+
skip('UVs are not reliable on this perl version', 2) unless "$]" >= "5.008000";
103103

104104
my $maxbits = $Config{ivsize} * 8 - 1;
105105

@@ -153,7 +153,7 @@ is( scalar( uniqstr qw( a b c d a b e ) ), 5, 'uniqstr() in scalar context' );
153153
}
154154

155155
SKIP: {
156-
skip('int overload requires perl version 5.8.0', 1) unless $] ge "5.008000";
156+
skip('int overload requires perl version 5.8.0', 1) unless "$]" >= "5.008000";
157157

158158
package Googol;
159159

cpan/Scalar-List-Utils/t/uniqnum.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ SKIP: {
296296
# uniqnum not confused by IV'ified floats
297297
SKIP: {
298298
# This fails on 5.6 and isn't fixable without breaking a lot of other tests
299-
skip 'This perl version gets confused by IVNV dualvars', 1 if $] lt '5.008000';
299+
skip 'This perl version gets confused by IVNV dualvars', 1 if "$]" <= '5.008000';
300300
my @nums = ( 2.1, 2.2, 2.3 );
301301
my $dummy = sprintf "%d", $_ for @nums;
302302

cpan/Test-Harness/lib/TAP/Harness.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ Any keys for which the value is C<undef> will be ignored.
494494
warn "CPAN::Meta::YAML required to process $rulesfile" ;
495495
return;
496496
}
497-
my $layer = $] lt "5.008" ? "" : ":encoding(UTF-8)";
497+
my $layer = "$]" < "5.008" ? "" : ":encoding(UTF-8)";
498498
open my $fh, "<$layer", $rulesfile
499499
or die "Couldn't open $rulesfile: $!";
500500
my $yaml_text = do { local $/; <$fh> };

cpan/Test-Simple/lib/Test2/API.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ sub CLONE {
7474

7575
BEGIN {
7676
no warnings 'once';
77-
if($] ge '5.014' || $ENV{T2_CHECK_DEPTH} || $Test2::API::DO_DEPTH_CHECK) {
77+
if("$]" >= '5.014' || $ENV{T2_CHECK_DEPTH} || $Test2::API::DO_DEPTH_CHECK) {
7878
*DO_DEPTH_CHECK = sub() { 1 };
7979
}
8080
else {

cpan/Test-Simple/lib/Test2/Formatter/TAP.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ sub _open_handles {
6666
sub encoding {
6767
my $self = shift;
6868

69-
if ($] ge "5.007003" and @_) {
69+
if ("$]" >= "5.007003" and @_) {
7070
my ($enc) = @_;
7171
my $handles = $self->{+HANDLES};
7272

cpan/Test-Simple/lib/Test2/Tools/Tiny.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use strict;
33
use warnings;
44

55
BEGIN {
6-
if ($] lt "5.008") {
6+
if ("$]" < "5.008") {
77
require Test::Builder::IO::Scalar;
88
}
99
}
@@ -260,7 +260,7 @@ sub capture(&) {
260260

261261
($ok, $e) = try {
262262
# Scalar refs as filehandles were added in 5.8.
263-
if ($] ge "5.008") {
263+
if ("$]" >= "5.008") {
264264
open($out_fh, '>', \$out) or die "Failed to open a temporary STDOUT: $!";
265265
open($err_fh, '>', \$err) or die "Failed to open a temporary STDERR: $!";
266266
}

cpan/Test-Simple/t/HashBase.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ is($pkg->do_it, 'const', "worked as expected");
8484
}
8585
ok(!$pkg->FOO, "overrode const sub");
8686
{
87-
local $TODO = "known to fail on $]" if $] le "5.006002";
87+
local $TODO = "known to fail on $]" if "$]" <= "5.006002";
8888
is($pkg->do_it, 'const', "worked as expected, const was constant");
8989
}
9090

cpan/Test-Simple/t/Legacy/Regression/736_use_ok.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sub capture(&) {
1919
}
2020

2121
{
22-
local $TODO = "known to fail on $]" if $] le "5.006002";
22+
local $TODO = "known to fail on $]" if "$]" <= "5.006002";
2323
my $file = __FILE__;
2424
my $line = __LINE__ + 4;
2525
like(

cpan/Test-Simple/t/Legacy/overload_threads.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ BEGIN {
2020

2121
use Test::More;
2222

23-
plan skip_all => "known to crash on $]" if $] le "5.006002";
23+
plan skip_all => "known to crash on $]" if "$]" <= "5.006002";
2424

2525
plan tests => 5;
2626

cpan/Test-Simple/t/Legacy_And_Test2/preload_diag_note.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use strict;
22
use warnings;
33

4-
if ($] lt "5.008") {
4+
if ("$]" < "5.008") {
55
print "1..0 # SKIP Test cannot run on perls below 5.8.0\n";
66
exit 0;
77
}

cpan/Test-Simple/t/Test2/behavior/init_croak.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BEGIN {
1414
}
1515
}
1616

17-
skip_all("known to fail on $]") if $] le "5.006002";
17+
skip_all("known to fail on $]") if "$]" <= "5.006002";
1818

1919
$@ = "";
2020
my ($file, $line) = (__FILE__, __LINE__ + 1);

cpan/Test-Simple/t/Test2/behavior/nested_context_exception.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use Test2::Tools::Tiny;
55

66
use Test2::API qw/context/;
77

8-
skip_all("known to fail on $]") if $] le "5.006002";
8+
skip_all("known to fail on $]") if "$]" <= "5.006002";
99

1010
sub outer {
1111
my $code = shift;

cpan/Test-Simple/t/Test2/modules/API.t

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ like(
114114
"got warning about adding driver too late"
115115
);
116116
};
117-
if ($] le "5.006002") {
117+
if ("$]" <= "5.006002") {
118118
todo("TODO known to fail on $]", $sub1);
119119
} else {
120120
$sub1->();

0 commit comments

Comments
 (0)