diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-26 14:21:39 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-03-26 14:21:39 +0000 |
commit | b14399855b4df2051e11477e4e745c80bb82b015 (patch) | |
tree | 077f7b47e5c6da7fa5e83f5972ce319640ef8ef1 /toke.c | |
parent | 3ef1310e8095f478a1ddff6a842410f27b75e186 (diff) | |
download | perl-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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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); } |