Fix bug [perl #41234] : the tokenizer understands "=cute"
Rafael Garcia-Suarez [Thu, 11 Jan 2007 17:12:08 +0000 (17:12 +0000)]
or other words that begin with "cut" as synonyms for "=cut"

p4raw-id: //depot/perl@29761

toke.c

diff --git a/toke.c b/toke.c
index 4d5d9c2..57fb8a0 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3674,7 +3674,7 @@ Perl_yylex(pTHX)
                if (PL_madskills)
                    sv_catsv(PL_thiswhite, PL_linestr);
 #endif
-               if (*s == '=' && strnEQ(s, "=cut", 4)) {
+               if (*s == '=' && strnEQ(s, "=cut", 4) && !isALPHA(s[4])) {
                    sv_setpvn(PL_linestr, "", 0);
                    PL_oldoldbufptr = PL_oldbufptr = s = PL_linestart = SvPVX(PL_linestr);
                    PL_bufend = SvPVX(PL_linestr) + SvCUR(PL_linestr);