disable warnings inside generated version sub (RT#89282)
[p5sagit/Module-Metadata.git] / lib / Module / Metadata.pm
index e8d6856..60f17e8 100644 (file)
@@ -12,7 +12,7 @@ package Module::Metadata;
 use strict;
 use warnings;
 
-our $VERSION = '1.000016';
+our $VERSION = '1.000018';
 $VERSION = eval $VERSION;
 
 use Carp qw/croak/;
@@ -654,6 +654,7 @@ sub _evaluate_version_line {
     #; package Module::Metadata::_version::p$pn;
     use version;
     no strict;
+    no warnings;
 
       \$vsub = sub {
         local $sigil$var;
@@ -663,6 +664,8 @@ sub _evaluate_version_line {
       };
   }};
 
+  $eval = $1 if $eval =~ m{^(.+)}s;
+
   local $^W;
   # Try to get the $VERSION
   eval $eval;