summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--t/op/attrs.t5
-rw-r--r--xsutils.c2
2 files changed, 5 insertions, 2 deletions
diff --git a/t/op/attrs.t b/t/op/attrs.t
index dc91438d0a..2169e3cd7c 100644
--- a/t/op/attrs.t
+++ b/t/op/attrs.t
@@ -8,7 +8,7 @@ BEGIN {
require './test.pl';
}
-plan tests => 95;
+plan 'no_plan';
$SIG{__WARN__} = sub { die @_ };
@@ -147,7 +147,8 @@ eval 'my $$foo : bar = 1';
like $@, qr/Can't declare scalar dereference in my/;
-my @code = qw(assertion lvalue locked method);
+my @code = qw(lvalue locked method);
+unshift @code, 'assertion' if $] >= 5.009;
my @other = qw(shared unique);
my %valid;
$valid{CODE} = {map {$_ => 1} @code};
diff --git a/xsutils.c b/xsutils.c
index 2dc0d7ab1a..c09a376b98 100644
--- a/xsutils.c
+++ b/xsutils.c
@@ -71,6 +71,7 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs)
switch (SvTYPE(sv)) {
case SVt_PVCV:
switch ((int)len) {
+#ifdef CVf_ASSERTION
case 9:
if (memEQ(name, "assertion", 9)) {
if (negated)
@@ -80,6 +81,7 @@ modify_SV_attributes(pTHX_ SV *sv, SV **retlist, SV **attrlist, int numattrs)
continue;
}
break;
+#endif
case 6:
switch (name[3]) {
case 'l':