summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-13 11:17:10 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-11-13 11:17:10 +0000
commit3cd0a11a1a8c5cc6b632f666275eeafcb6f5c950 (patch)
treeef5cb137d86c08beb687f51c2676780541be79de /perly.y
parent0d520e8e301fa0eda31a3f68440e7e9b426a290f (diff)
downloadperl-3cd0a11a1a8c5cc6b632f666275eeafcb6f5c950.tar.gz
Parsing fix: it wasn't possible to call a function with a (_) prototype
(that is, a function mimicing an unary op) without parentheses. Bug reported by Ævar Arnfjörð Bjarmason. p4raw-id: //depot/perl@29258
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/perly.y b/perly.y
index 99493cec44..77caeb6892 100644
--- a/perly.y
+++ b/perly.y
@@ -711,6 +711,8 @@ term : termbinop
{ $$ = newOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0); }
| REQUIRE term /* require Foo */
{ $$ = newUNOP(OP_REQUIRE, $1 ? OPf_SPECIAL : 0, $2); }
+ | UNIOPSUB
+ { $$ = newUNOP(OP_ENTERSUB, OPf_STACKED, scalar($1)); }
| UNIOPSUB term /* Sub treated as unop */
{ $$ = newUNOP(OP_ENTERSUB, OPf_STACKED,
append_elem(OP_LIST, $2, scalar($1))); }