[Module-build-checkins] Module-Build/lib/Module/Build ModuleInfo.pm,1.13,1.14
Status: Beta
Brought to you by:
kwilliams
From: Ken W. <kwi...@us...> - 2005-10-14 00:46:02
|
Update of /cvsroot/module-build/Module-Build/lib/Module/Build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18434/lib/Module/Build Modified Files: ModuleInfo.pm Log Message: Fix a $VERSION parsing edge case Index: ModuleInfo.pm =================================================================== RCS file: /cvsroot/module-build/Module-Build/lib/Module/Build/ModuleInfo.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- ModuleInfo.pm 4 Oct 2005 11:19:38 -0000 1.13 +++ ModuleInfo.pm 14 Oct 2005 00:45:52 -0000 1.14 @@ -10,7 +10,14 @@ use IO::File; -my $PKG_REGEXP = qr/^[\s\{;]*package\s+([\w:]+)/; +my $PKG_REGEXP = qr/ # match a package declaration + ^[\s\{;]* # intro chars on a line + package # the word 'package' + \s+ # whitespace + ([\w:]+) # a package name + \s* # optional whitespace + ; # semicolon line terminator +/x; my $VARNAME_REGEXP = qr/ # match fully-qualified VERSION name ([\$*]) # sigil - $ or * |