Use ->is_role to check if a package is a role
[gitmo/Role-Tiny.git] / Makefile.PL
index 3f6d42c..49d1ac2 100644 (file)
@@ -10,7 +10,8 @@ my %BUILD_DEPS = (
 );
 
 # have to do this since old EUMM dev releases miss the eval $VERSION line
-my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 };
+my $mymeta = eval($ExtUtils::MakeMaker::VERSION) >= 6.57_02;
+my $mymeta_works = eval($ExtUtils::MakeMaker::VERSION) >= 6.57_07;
 
 WriteMakefile(
   NAME => 'Role::Tiny',
@@ -21,8 +22,9 @@ WriteMakefile(
     ($mymeta_works ? () : (%BUILD_DEPS)),
   },
   $mymeta_works ? (BUILD_REQUIRES => \%BUILD_DEPS) : (),
+  ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()),
 
-  META_MERGE => {
+  -f 'META.yml' ? () : (META_MERGE => {
     'meta-spec' => { version => 2 },
     no_index => {
       directory => [ 'xt' ]
@@ -39,5 +41,5 @@ WriteMakefile(
           web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Role-Tiny',
       },
     },
-  },
+  }),
 );