summaryrefslogtreecommitdiff
path: root/toke.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 /toke.c
parent82d83da3ceaec700e85d7b7369710491e390fe97 (diff)
downloadperl-37690136cd4c7fd68adf555398dac9fea74bb54f.tar.gz
Make my\ experimental
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index efb834862a..8a84a5a48a 100644
--- a/toke.c
+++ b/toke.c
@@ -7807,6 +7807,15 @@ Perl_yylex(pTHX)
yyerror_pv(tmpbuf, UTF ? SVf_UTF8 : 0);
}
}
+ else if (*s == '\\') {
+ 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");
+ }
OPERATOR(MY);
case KEY_next: