X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FModule%2FMetadata.pm;h=a92d05f9385c769f4562c2a26d0ec230d527b001;hb=64b280a1965113e929771eb6c614c3f52dfc6ad2;hp=77458e42d8b4613cd4ed6a47b6a2e50de8aca8fb;hpb=c0278e58ecbced5d852526c1c5d088c8df6ba618;p=p5sagit%2FModule-Metadata.git diff --git a/lib/Module/Metadata.pm b/lib/Module/Metadata.pm index 77458e4..a92d05f 100644 --- a/lib/Module/Metadata.pm +++ b/lib/Module/Metadata.pm @@ -10,8 +10,9 @@ package Module::Metadata; # parrot future to look at other types of modules). use strict; -use vars qw($VERSION); -$VERSION = '1.000014'; +use warnings; + +our $VERSION = '1.000018'; $VERSION = eval $VERSION; use Carp qw/croak/; @@ -649,7 +650,7 @@ sub _evaluate_version_line { # compiletime/runtime issues with local() my $vsub; $pn++; # everybody gets their own package - my $eval = qq{BEGIN { q# Hide from _packages_inside() + my $eval = qq{BEGIN { my \$dummy = q# Hide from _packages_inside() #; package Module::Metadata::_version::p$pn; use version; no strict; @@ -662,6 +663,8 @@ sub _evaluate_version_line { }; }}; + $eval = $1 if $eval =~ m{^(.+)}s; + local $^W; # Try to get the $VERSION eval $eval;