From: Chip Salzenberg Date: Tue, 3 Mar 1998 03:12:16 +0000 (+0000) Subject: [win32] another toke.c maintpatch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fdfe84d0a51eeabebf130edcd52d004ffe42d773;p=p5sagit%2Fp5-mst-13.2.git [win32] another toke.c maintpatch #28: "Don't warn on $x{shift}, ne => 1, or -f => 1" Files: toke.c p4raw-id: //depot/win32/perl@632 --- diff --git a/toke.c b/toke.c index 4fee674..ef2ace0 100644 --- a/toke.c +++ b/toke.c @@ -2007,9 +2007,6 @@ yylex(void) s++; if (strnEQ(s,"=>",2)) { - if (dowarn) - warn("Ambiguous use of -%c => resolved to \"-%c\" =>", - (int)tmp, (int)tmp); s = force_word(bufptr,WORD,FALSE,FALSE,FALSE); OPERATOR('-'); /* unary minus */ } @@ -2211,12 +2208,6 @@ yylex(void) d++; if (*d == '}') { char minus = (tokenbuf[0] == '-'); - if (dowarn && - (keyword(tokenbuf + 1, len) || - (minus && len == 1 && isALPHA(tokenbuf[1])) || - perl_get_cv(tokenbuf + 1, FALSE) )) - warn("Ambiguous use of {%s} resolved to {\"%s\"}", - tokenbuf + !minus, tokenbuf + !minus); s = force_word(s + minus, WORD, FALSE, TRUE, FALSE); if (minus) force_next('-'); @@ -2812,9 +2803,6 @@ yylex(void) /* Is this a word before a => operator? */ if (strnEQ(d,"=>",2)) { CLINE; - if (dowarn && (tmp || perl_get_cv(tokenbuf, FALSE))) - warn("Ambiguous use of %s => resolved to \"%s\" =>", - tokenbuf, tokenbuf); yylval.opval = (OP*)newSVOP(OP_CONST, 0, newSVpv(tokenbuf,0)); yylval.opval->op_private = OPpCONST_BARE; TERM(WORD);