This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Updated Changes file for Module::CoreList
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index df5cf46..5ec5845 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -633,14 +633,18 @@ subbody   :       block   { $$ = $1; }
                        }
        ;
 
-package :      PACKAGE WORD ';'
+package :      PACKAGE WORD WORD ';'
                        {
 #ifdef MAD
-                         $$ = package($2);
+                         $$ = package($3);
                          token_getmad($1,$$,'o');
-                         token_getmad($3,$$,';');
+                         if ($2)
+                             package_version($2);
+                         token_getmad($4,$$,';');
 #else
-                         package($2);
+                         package($3);
+                         if ($2)
+                             package_version($2);
                          $$ = (OP*)NULL;
 #endif
                        }