This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Parsing fix: it wasn't possible to call a function with a (_) prototype
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index 99493ce..77caeb6 100644 (file)
--- 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))); }