diff options
Diffstat (limited to 'dist')
-rw-r--r-- | dist/constant/lib/constant.pm | 4 | ||||
-rw-r--r-- | dist/constant/t/constant.t | 11 |
2 files changed, 6 insertions, 9 deletions
diff --git a/dist/constant/lib/constant.pm b/dist/constant/lib/constant.pm index 378522a2d5..b8fa025180 100644 --- a/dist/constant/lib/constant.pm +++ b/dist/constant/lib/constant.pm @@ -27,7 +27,7 @@ BEGIN { # By doing this, we save 1 run time check for *every* call to import. my $const = $] > 5.009002; my $downgrade = $] < 5.015004; # && $] >= 5.008 - my $constarray = $] > 5.019001; + my $constarray = $] >= 5.019003; if ($const) { Internals::SvREADONLY($const, 1); Internals::SvREADONLY($downgrade, 1); @@ -366,7 +366,7 @@ used. =head1 CAVEATS -List constants were not inlined unless you are using Perl v5.20 or higher. +List constants are not inlined unless you are using Perl v5.20 or higher. It is not possible to have a subroutine or a keyword with the same name as a constant in the same package. This is probably a Good Thing. diff --git a/dist/constant/t/constant.t b/dist/constant/t/constant.t index 3a822713ea..129196aa60 100644 --- a/dist/constant/t/constant.t +++ b/dist/constant/t/constant.t @@ -360,9 +360,8 @@ eval q{ eval { for (immutable) { ${\$_} = 432 } }; SKIP: { require Config; - local $TODO; if ($Config::Config{useithreads}) { - skip "fails under threads", 1 if $] < 5.019001; + skip "fails under threads", 1 if $] < 5.019003; } like $@, qr/^Modification of a read-only value attempted at /, '... and immutable through refgen, too'; @@ -383,19 +382,17 @@ like $@, qr/^Modification of a read-only value attempted at /, 'constant created in existing stash slot is immutable'; eval { for (existing_stash_entry) { ${\$_} = 432 } }; SKIP: { - local $TODO; if ($Config::Config{useithreads}) { - skip "fails under threads", 1 if $] < 5.019001; + skip "fails under threads", 1 if $] < 5.019003; } like $@, qr/^Modification of a read-only value attempted at /, '... and immutable through refgen, too'; } # Test that list constants are also immutable. This only works under -# 5.19.2 and later (er, except it doesn’t work under that version yet, -# either, hence the to-do status). +# 5.19.3 and later. SKIP: { - skip "fails under 5.19.1 and earlier", 2 if $] < 5.019002; + skip "fails under 5.19.2 and earlier", 2 if $] < 5.019003; use constant constant_list => 1..2; for (constant_list) { my $num = $_; |