Support fully qualified $Foo::Bar::VERSION expressions (rhbz#249135).

Patch from Ville Skyttä.
This commit is contained in:
Panu Matilainen 2007-07-21 15:48:03 +03:00
parent 0ef67980e8
commit 00b4b3a68a
1 changed files with 2 additions and 1 deletions

View File

@ -144,11 +144,12 @@ sub process_file {
#ExtUtils/Install.pm:$VERSION = substr q$Revision: 1.9 $, 10;
#CGI/Apache.pm:$VERSION = (qw$Revision: 1.9 $)[1];
#DynaLoader.pm:$VERSION = $VERSION = "1.03"; # avoid typo warning
#General.pm:$Config::General::VERSION = 2.33;
#
# or with the new "our" pragma you could (read will) see:
#
# our $VERSION = '1.00'
if (($package) && (m/^\s*(our\s+)?\$VERSION\s*=\s+/)) {
if (($package) && (m/^\s*(our\s+)?\$(\Q$package\E::)?VERSION\s*=\s+/)) {
# first see if the version string contains the string
# '$Revision' this often causes bizzare strings and is the most