summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-12-08 13:09:39 -0800
committerFather Chrysostomos <sprout@cpan.org>2011-12-08 13:51:19 -0800
commit240d1b6fec0bdaf633ffc53476ade6401c251270 (patch)
tree6102f34b2533211749560b6cd954c3ee48a56641 /toke.c
parent564cd6cb6e72228304bae646ccbe28cff6136367 (diff)
downloadperl-240d1b6fec0bdaf633ffc53476ade6401c251270.tar.gz
Don’t warn for open local *FH
There is this ancient ‘Precedence problem’ warning that warns for open followed by a bareword and then an operator that would have made open into a unary-precedence operator in Perl 4. It was not taking into account that the bareword might be a Perl keyword. In that case it shouldn’t be warning.
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index e5da941510..2c29c582e2 100644
--- a/toke.c
+++ b/toke.c
@@ -7672,6 +7672,7 @@ Perl_yylex(pTHX)
if ( *t && strchr("|&*+-=!?:.", *t) && ckWARN_d(WARN_PRECEDENCE)
/* [perl #16184] */
&& !(t[0] == '=' && t[1] == '>')
+ && !keyword(s, d-s, 0)
) {
int parms_len = (int)(d-s);
Perl_warner(aTHX_ packWARN(WARN_PRECEDENCE),