summaryrefslogtreecommitdiff
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
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.
-rw-r--r--dist/constant/lib/constant.pm4
-rw-r--r--dist/constant/t/constant.t11
-rw-r--r--ext/B/t/optree_constants.t6
-rw-r--r--ext/Devel-Peek/t/Peek.t12
4 files changed, 15 insertions, 18 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 = $_;
diff --git a/ext/B/t/optree_constants.t b/ext/B/t/optree_constants.t
index 71946ac08e..23ce6a3d00 100644
--- a/ext/B/t/optree_constants.t
+++ b/ext/B/t/optree_constants.t
@@ -177,7 +177,7 @@ EONT_EONT
my ($expect, $expect_nt) =
- $] >= 5.019002
+ $] >= 5.019003
? (" is a constant sub, optimized to a AV\n") x 2
: (<<'EOT_EOT', <<'EONT_EONT');
# 3 <1> leavesub[2 refs] K/REFC,1 ->(end)
@@ -351,8 +351,8 @@ checkOptree ( name => 'lc*,uc*,gt,lt,ge,le,cmp',
# n <$> const[PV "b-cmp-a"] s ->o
# p <;> nextstate(main 916 optree_constants.t:313) v:>,<,%,{ ->q
# q <$> const[PVNV 0] s/SHORT ->r < 5.017002
-# q <$> const[PVNV 0] s/FOLD,SHORT ->r >=5.017002 < 5.019001
-# q <$> const[SPECIAL sv_no] s/FOLD,SHORT ->r >=5.019001
+# q <$> const[PVNV 0] s/FOLD,SHORT ->r >=5.017002 < 5.019003
+# q <$> const[SPECIAL sv_no] s/FOLD,SHORT ->r >=5.019003
EOT_EOT
# r <1> leavesub[1 ref] K/REFC,1 ->(end)
# - <@> lineseq KP ->r
diff --git a/ext/Devel-Peek/t/Peek.t b/ext/Devel-Peek/t/Peek.t
index 32dc7a8669..3941c849ff 100644
--- a/ext/Devel-Peek/t/Peek.t
+++ b/ext/Devel-Peek/t/Peek.t
@@ -153,8 +153,8 @@ my $type = do_test('result of addition',
$c + $d,
'SV = ([NI])V\\($ADDR\\) at $ADDR
REFCNT = 1
- FLAGS = \\(PADTMP,\1OK,p\1OK\\) # $] < 5.019002
- FLAGS = \\(\1OK,p\1OK\\) # $] >=5.019002
+ FLAGS = \\(PADTMP,\1OK,p\1OK\\) # $] < 5.019003
+ FLAGS = \\(\1OK,p\1OK\\) # $] >=5.019003
\1V = 456');
($d = "789") += 0.1;
@@ -443,8 +443,8 @@ do_test('string with Unicode',
chr(256).chr(0).chr(512),
'SV = PV\\($ADDR\\) at $ADDR
REFCNT = 1
- FLAGS = \\((?:$PADTMP,)?POK,READONLY,pPOK,UTF8\\) # $] < 5.019002
- FLAGS = \\((?:$PADTMP,)?POK,pPOK,UTF8\\) # $] >=5.019002
+ FLAGS = \\((?:$PADTMP,)?POK,READONLY,pPOK,UTF8\\) # $] < 5.019003
+ FLAGS = \\((?:$PADTMP,)?POK,pPOK,UTF8\\) # $] >=5.019003
PV = $ADDR "\\\214\\\101\\\0\\\235\\\101"\\\0 \[UTF8 "\\\x\{100\}\\\x\{0\}\\\x\{200\}"\]
CUR = 5
LEN = \\d+');
@@ -453,8 +453,8 @@ do_test('string with Unicode',
chr(256).chr(0).chr(512),
'SV = PV\\($ADDR\\) at $ADDR
REFCNT = 1
- FLAGS = \\((?:$PADTMP,)?POK,READONLY,pPOK,UTF8\\) # $] < 5.019002
- FLAGS = \\((?:$PADTMP,)?POK,pPOK,UTF8\\) # $] >=5.019002
+ FLAGS = \\((?:$PADTMP,)?POK,READONLY,pPOK,UTF8\\) # $] < 5.019003
+ FLAGS = \\((?:$PADTMP,)?POK,pPOK,UTF8\\) # $] >=5.019003
PV = $ADDR "\\\304\\\200\\\0\\\310\\\200"\\\0 \[UTF8 "\\\x\{100\}\\\x\{0\}\\\x\{200\}"\]
CUR = 5
LEN = \\d+');