This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Regenerate Changes.
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index b1e7f90..63210ae 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -404,8 +404,6 @@ subbody     :       block   { $$ = $1; }
 
 package :      PACKAGE WORD ';'
                        { package($2); }
-       |       PACKAGE ';'
-                       { package(Nullop); }
        ;
 
 use    :       USE startsub
@@ -479,7 +477,8 @@ method      :       METHOD
 subscripted:    star '{' expr ';' '}'        /* *main::{something} */
                         /* In this and all the hash accessors, ';' is
                          * provided by the tokeniser */
-                       { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3)); }
+                       { $$ = newBINOP(OP_GELEM, 0, $1, scalar($3));
+                           PL_expect = XOPERATOR; }
        |       scalar '[' expr ']'          /* $array[$element] */
                        { $$ = newBINOP(OP_AELEM, 0, oopsAV($1), scalar($3)); }
        |       term ARROW '[' expr ']'      /* somearef->[$element] */