diff options
author | Nicholas Clark <nick@ccl4.org> | 2007-01-15 14:38:58 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2007-01-15 14:38:58 +0000 |
commit | 780a5241a93925d81e932db73df46ee749b203b9 (patch) | |
tree | 5d2b5e37c760af0191c2ced00c015d067dd9736a /toke.c | |
parent | d1144667a1a63a59aa92742530166e5d3591539f (diff) | |
download | perl-780a5241a93925d81e932db73df46ee749b203b9.tar.gz |
Add get_cvn_flags(), which is like get_cv() but takes a length. This
allows symbolic code references with embeded NULs to work.
p4raw-id: //depot/perl@29830
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -4795,12 +4795,12 @@ Perl_yylex(pTHX) t++; } while (isSPACE(*t)); if (isIDFIRST_lazy_if(t,UTF)) { - STRLEN dummylen; + STRLEN len; t = scan_word(t, tmpbuf, sizeof tmpbuf, TRUE, - &dummylen); + &len); while (isSPACE(*t)) t++; - if (*t == ';' && get_cv(tmpbuf, FALSE)) + if (*t == ';' && get_cvn_flags(tmpbuf, len, 0)) Perl_warner(aTHX_ packWARN(WARN_SYNTAX), "You need to quote \"%s\"", tmpbuf); @@ -10738,7 +10738,8 @@ S_scan_ident(pTHX_ register char *s, register const char *send, char *dest, STRL } if (PL_lex_state == LEX_NORMAL) { if (ckWARN(WARN_AMBIGUOUS) && - (keyword(dest, d - dest, 0) || get_cv(dest, FALSE))) + (keyword(dest, d - dest, 0) + || get_cvn_flags(dest, d - dest, 0))) { if (funny == '#') funny = '@'; |