summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
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: