This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Hash::Util::FieldHash: fix broken pod link
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index 0261c26..2d8b599 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -1120,49 +1120,6 @@ termdo   :       DO term %prec UNIOP                     /* do $filename */
                        { $$ = newUNOP(OP_NULL, OPf_SPECIAL, op_scope($2));
                          TOKEN_GETMAD($1,$$,'D');
                        }
-       |       DO subname '(' ')'                  /* do somesub() */
-                       { $$ = newUNOP(OP_ENTERSUB,
-                           OPf_SPECIAL|OPf_STACKED,
-                           op_prepend_elem(OP_LIST,
-                               scalar(newCVREF(
-                                   (OPpENTERSUB_AMPER<<8),
-                                   scalar($2)
-                               )),(OP*)NULL)); dep();
-                         TOKEN_GETMAD($1,$$,'o');
-                         TOKEN_GETMAD($3,$$,'(');
-                         TOKEN_GETMAD($4,$$,')');
-                       }
-       |       DO subname '(' expr ')'             /* do somesub(@args) */
-                       { $$ = newUNOP(OP_ENTERSUB,
-                           OPf_SPECIAL|OPf_STACKED,
-                           op_append_elem(OP_LIST,
-                               $4,
-                               scalar(newCVREF(
-                                   (OPpENTERSUB_AMPER<<8),
-                                   scalar($2)
-                               )))); dep();
-                         TOKEN_GETMAD($1,$$,'o');
-                         TOKEN_GETMAD($3,$$,'(');
-                         TOKEN_GETMAD($5,$$,')');
-                       }
-       |       DO scalar '(' ')'                /* do $subref () */
-                       { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
-                           op_prepend_elem(OP_LIST,
-                               scalar(newCVREF(0,scalar($2))), (OP*)NULL)); dep();
-                         TOKEN_GETMAD($1,$$,'o');
-                         TOKEN_GETMAD($3,$$,'(');
-                         TOKEN_GETMAD($4,$$,')');
-                       }
-       |       DO scalar '(' expr ')'           /* do $subref (@args) */
-                       { $$ = newUNOP(OP_ENTERSUB, OPf_SPECIAL|OPf_STACKED,
-                           op_prepend_elem(OP_LIST,
-                               $4,
-                               scalar(newCVREF(0,scalar($2))))); dep();
-                         TOKEN_GETMAD($1,$$,'o');
-                         TOKEN_GETMAD($3,$$,'(');
-                         TOKEN_GETMAD($5,$$,')');
-                       }
-
         ;
 
 term   :       termbinop
@@ -1491,6 +1448,10 @@ arylen   :       DOLSHARP indirob
                        { $$ = newAVREF($2);
                          TOKEN_GETMAD($1,$$,'l');
                        }
+       |       term ARROW DOLSHARP '*'
+                       { $$ = newAVREF($1);
+                         TOKEN_GETMAD($3,$$,'l');
+                       }
        ;
 
 star   :       '*' indirob