summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embed.fnc1
-rw-r--r--embed.h2
-rw-r--r--proto.h1
-rw-r--r--toke.c20
4 files changed, 14 insertions, 10 deletions
diff --git a/embed.fnc b/embed.fnc
index 7e4ce514f4..06927a822f 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -1812,6 +1812,7 @@ so |SV* |new_constant |NULLOK const char *s|STRLEN len \
|NN const char *key|STRLEN keylen|NN SV *sv \
|NULLOK SV *pv|NULLOK const char *type \
|STRLEN typelen
+s |int |deprecate_commaless_var_list
s |int |ao |int toketype
# if defined(PERL_CR_FILTER)
s |I32 |cr_textfilter |int idx|NULLOK SV *sv|int maxlen
diff --git a/embed.h b/embed.h
index 59e8174300..98215c2b5a 100644
--- a/embed.h
+++ b/embed.h
@@ -1593,6 +1593,7 @@
#define tokenize_use S_tokenize_use
#endif
#ifdef PERL_CORE
+#define deprecate_commaless_var_list S_deprecate_commaless_var_list
#define ao S_ao
#endif
# if defined(PERL_CR_FILTER)
@@ -3947,6 +3948,7 @@
#define filter_gets(a,b,c) S_filter_gets(aTHX_ a,b,c)
#define find_in_my_stash(a,b) S_find_in_my_stash(aTHX_ a,b)
#define tokenize_use(a,b) S_tokenize_use(aTHX_ a,b)
+#define deprecate_commaless_var_list() S_deprecate_commaless_var_list(aTHX)
#define ao(a) S_ao(aTHX_ a)
#endif
# if defined(PERL_CR_FILTER)
diff --git a/proto.h b/proto.h
index c99a25aad9..ae13a6fafc 100644
--- a/proto.h
+++ b/proto.h
@@ -5841,6 +5841,7 @@ STATIC SV* S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRL
#define PERL_ARGS_ASSERT_NEW_CONSTANT \
assert(key); assert(sv)
+STATIC int S_deprecate_commaless_var_list(pTHX);
STATIC int S_ao(pTHX_ int toketype);
# if defined(PERL_CR_FILTER)
STATIC I32 S_cr_textfilter(pTHX_ int idx, SV *sv, int maxlen);
diff --git a/toke.c b/toke.c
index 03cf6fd6e3..dc87f278db 100644
--- a/toke.c
+++ b/toke.c
@@ -100,7 +100,6 @@ static int
S_pending_ident(pTHX);
static const char ident_too_long[] = "Identifier too long";
-static const char commaless_variable_list[] = "comma-less variable list";
#ifndef PERL_NO_UTF16_FILTER
static I32 utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen);
@@ -451,6 +450,13 @@ S_printbuf(pTHX_ const char *const fmt, const char *const s)
#endif
+static int
+S_deprecate_commaless_var_list(pTHX) {
+ PL_expect = XTERM;
+ deprecate("comma-less variable list");
+ return REPORT(','); /* grandfather non-comma-format format */
+}
+
/*
* S_ao
*
@@ -4860,9 +4866,7 @@ Perl_yylex(pTHX)
if (PL_expect == XOPERATOR) {
if (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack) {
- PL_expect = XTERM;
- deprecate(commaless_variable_list);
- return REPORT(','); /* grandfather non-comma-format format */
+ return deprecate_commaless_var_list();
}
}
@@ -5118,9 +5122,7 @@ Perl_yylex(pTHX)
DEBUG_T( { printbuf("### Saw string before %s\n", s); } );
if (PL_expect == XOPERATOR) {
if (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack) {
- PL_expect = XTERM;
- deprecate(commaless_variable_list);
- return REPORT(','); /* grandfather non-comma-format format */
+ return deprecate_commaless_var_list();
}
else
no_op("String",s);
@@ -5135,9 +5137,7 @@ Perl_yylex(pTHX)
DEBUG_T( { printbuf("### Saw string before %s\n", s); } );
if (PL_expect == XOPERATOR) {
if (PL_lex_formbrack && PL_lex_brackets == PL_lex_formbrack) {
- PL_expect = XTERM;
- deprecate(commaless_variable_list);
- return REPORT(','); /* grandfather non-comma-format format */
+ return deprecate_commaless_var_list();
}
else
no_op("String",s);