summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2002-10-21 12:27:40 +0100
committerhv <hv@crypt.org>2002-10-21 09:20:54 +0000
commit66fbe8fb06e4bc8631604373e6a099f620f92dcf (patch)
tree6b817afef33138bb2e0cf8616effa5d66db1954b /toke.c
parentc152dc430a400da208b684f936f242f4a89972f4 (diff)
downloadperl-66fbe8fb06e4bc8631604373e6a099f620f92dcf.tar.gz
Re: [perl #16184] Unexpected warning when using C<< open FH => >>
Message-Id: <200210211027.g9LARef05722@crypt.compulink.co.uk> p4raw-id: //depot/perl@18042
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/toke.c b/toke.c
index d3bdf3945c..b4c886fd85 100644
--- a/toke.c
+++ b/toke.c
@@ -4648,10 +4648,14 @@ Perl_yylex(pTHX)
char *t;
for (d = s; isALNUM_lazy_if(d,UTF); d++) ;
t = skipspace(d);
- if (strchr("|&*+-=!?:.", *t) && ckWARN_d(WARN_PRECEDENCE))
+ if (strchr("|&*+-=!?:.", *t) && ckWARN_d(WARN_PRECEDENCE)
+ /* [perl #16184] */
+ && !(t[0] == '=' && t[1] == '>')
+ ) {
Perl_warner(aTHX_ packWARN(WARN_PRECEDENCE),
"Precedence problem: open %.*s should be open(%.*s)",
- d-s,s, d-s,s);
+ d - s, s, d - s, s);
+ }
}
LOP(OP_OPEN,XTERM);