summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-07-25 21:56:18 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-07-25 23:48:03 -0700
commitf5b4a4128bbf937774d10d32dbddaae7fb2274fc (patch)
tree8d0a7a9f9264bf54846dd686ab8a0896f5dbf1b6 /dist
parentfb090176122b418ad8de1609f4202795ddc55d52 (diff)
downloadperl-f5b4a4128bbf937774d10d32dbddaae7fb2274fc.tar.gz
Version number tweaks in tests and other cleanup
I didn’t have this constant stuff ready as soon as I expected. I also left a comment and a couple of ‘local $TODO’s lying around that don’t need to be there. As a bonus, correct a typo in constant.pm’s docu- mentation.
Diffstat (limited to 'dist')
-rw-r--r--dist/constant/lib/constant.pm4
-rw-r--r--dist/constant/t/constant.t11
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 = $_;