|int allow_package|NN STRLEN *slp
sR |char* |skipspace |NN char *s
sR |char* |swallow_bom |NN U8 *s
-s |void |checkcomma |NN char *s|NN const char *name|NN const char *what
+s |void |checkcomma |NN const char *s|NN const char *name \
+ |NN const char *what
s |bool |feature_is_enabled|NN char* name|STRLEN namelen
s |void |force_ident |NN const char *s|int kind
s |void |incline |NN char *s
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
-STATIC void S_checkcomma(pTHX_ char *s, const char *name, const char *what)
+STATIC void S_checkcomma(pTHX_ const char *s, const char *name, const char *what)
__attribute__nonnull__(pTHX_1)
__attribute__nonnull__(pTHX_2)
__attribute__nonnull__(pTHX_3);
}
STATIC void
-S_checkcomma(pTHX_ register char *s, const char *name, const char *what)
+S_checkcomma(pTHX_ const char *s, const char *name, const char *what)
{
dVAR;
const char *w;
while (s < PL_bufend && isSPACE(*s))
s++;
if (*s == ',') {
- I32 kw;
- CV *cv;
- *s = '\0'; /* XXX If we didn't do this, we could const a lot of toke.c */
- kw = keyword(w, s - w);
- *s = ',';
- if (kw)
+ GV* gv;
+ if (keyword(w, s - w))
return;
- *s = '\0';
- cv = get_cv(w, FALSE);
- *s = ',';
- if (cv)
+
+ gv = gv_fetchpvn_flags(w, s - w, 0, SVt_PVCV);
+ if (gv && GvCVu(gv))
return;
Perl_croak(aTHX_ "No comma allowed after %s", what);
}