summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-26 14:21:39 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-03-26 14:21:39 +0000
commitb14399855b4df2051e11477e4e745c80bb82b015 (patch)
tree077f7b47e5c6da7fa5e83f5972ce319640ef8ef1 /toke.c
parent3ef1310e8095f478a1ddff6a842410f27b75e186 (diff)
downloadperl-b14399855b4df2051e11477e4e745c80bb82b015.tar.gz
Make the warning "interpreted as function" a bit less annoying,
and test it properly p4raw-id: //depot/perl@30761
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 935a32a6be..96b33cbf61 100644
--- a/toke.c
+++ b/toke.c
@@ -10444,7 +10444,11 @@ S_checkcomma(pTHX_ const char *s, const char *name, const char *what)
}
while (isSPACE(*w))
++w;
- if (!*w || !strchr(";|})]oaiuw!=", *w)) /* an advisory hack only... */
+ /* the list of chars below is for end of statements or
+ * block / parens, boolean operators (&&, ||, //) and branch
+ * constructs (or, and, if, until, unless, while, err, for).
+ * Not a very solid hack... */
+ if (!*w || !strchr(";&/|})]oaiuwef!=", *w))
Perl_warner(aTHX_ packWARN(WARN_SYNTAX),
"%s (...) interpreted as function",name);
}