summaryrefslogtreecommitdiff
path: root/op.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2016-05-22 23:45:45 -0700
committerFather Chrysostomos <sprout@cpan.org>2016-07-17 11:24:07 -0700
commit37690136cd4c7fd68adf555398dac9fea74bb54f (patch)
treee6b3ca8414080be96e1b552dc708760fc2f0bfb2 /op.c
parent82d83da3ceaec700e85d7b7369710491e390fe97 (diff)
downloadperl-37690136cd4c7fd68adf555398dac9fea74bb54f.tar.gz
Make my\ experimental
Diffstat (limited to 'op.c')
-rw-r--r--op.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/op.c b/op.c
index fdf41a7e51..412578d8bc 100644
--- a/op.c
+++ b/op.c
@@ -3193,6 +3193,13 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
case OP_SREFGEN:
if (type == OP_NULL) { /* local */
local_refgen:
+ if (!FEATURE_MYREF_IS_ENABLED)
+ Perl_croak(aTHX_ "The experimental declared_refs "
+ "feature is not enabled");
+ Perl_ck_warner_d(aTHX_
+ packWARN(WARN_EXPERIMENTAL__DECLARED_REFS),
+ "Reference constructors after declarators are "
+ "experimental");
op_lvalue(cUNOPo->op_first, OP_NULL);
return o;
}
@@ -3773,6 +3780,13 @@ S_my_kid(pTHX_ OP *o, OP *attrs, OP **imopsp)
return o;
}
else if (type == OP_REFGEN || type == OP_SREFGEN) {
+ if (!FEATURE_MYREF_IS_ENABLED)
+ Perl_croak(aTHX_ "The experimental declared_refs "
+ "feature is not enabled");
+ Perl_ck_warner_d(aTHX_
+ packWARN(WARN_EXPERIMENTAL__DECLARED_REFS),
+ "Reference constructors after declarators are "
+ "experimental");
/* Kid is a nulled OP_LIST, handled above. */
my_kid(cUNOPo->op_first, attrs, imopsp);
return o;