summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-18 17:40:57 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-10-18 17:40:57 +0000
commit8c28b960db3547273cd8c89c0eaafc8e99cf70c1 (patch)
treecd7dc978c1e8c46c475b5c26145c8c184fcd0502
parent29f4f0ab0cd22a86a6abeeb9b5de96d9506fd84a (diff)
downloadperl-8c28b960db3547273cd8c89c0eaafc8e99cf70c1.tar.gz
Functions with a (_) prototype should behave as unary operators
(which is not the case of functions with a (;$) prototype) p4raw-id: //depot/perl@29041
-rw-r--r--toke.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toke.c b/toke.c
index 062909932a..4158e328c3 100644
--- a/toke.c
+++ b/toke.c
@@ -5403,7 +5403,7 @@ Perl_yylex(pTHX)
const char *proto = SvPV_const((SV*)cv, protolen);
if (!protolen)
TERM(FUNC0SUB);
- if (*proto == '$' && proto[1] == '\0')
+ if ((*proto == '$' || *proto == '_') && proto[1] == '\0')
OPERATOR(UNIOPSUB);
while (*proto == ';')
proto++;