Support "package NAME BLOCK" and "package NAME VERSION BLOCK"
[p5sagit/Module-Metadata.git] / lib / Module / Metadata.pm
index 514dd1c..bac040a 100644 (file)
@@ -36,7 +36,7 @@ my $PKG_REGEXP  = qr{   # match a package declaration
   \s*                   # optional whitespace
   ($V_NUM_REGEXP)?        # optional version number
   \s*                   # optional whitesapce
-  ;                     # semicolon line terminator
+  [;\{]                 # semicolon line terminator or block start (since 5.16)
 }x;
 
 my $VARNAME_REGEXP = qr{ # match fully-qualified VERSION name