Commit | Line | Data |
6d71fae7 |
1 | use strict; |
2 | use warnings FATAL => 'all'; |
2215d4b9 |
3 | use 5.008001; |
6d71fae7 |
4 | use ExtUtils::MakeMaker; |
253d7c99 |
5 | (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
6d71fae7 |
6 | |
bb6d1b87 |
7 | my %BUILD_DEPS = ( |
8 | 'Test::More' => 0.96, |
9 | 'Test::Fatal' => 0.003, |
10 | ); |
11 | |
12 | my %RUN_DEPS = ( |
edb9977c |
13 | 'Class::Method::Modifiers' => 1.07, |
952460da |
14 | 'strictures' => 1.001001, |
cf62c989 |
15 | 'Module::Runtime' => 0.013, |
e0daf7da |
16 | 'Role::Tiny' => 1.001001, |
bb6d1b87 |
17 | ); |
18 | |
19 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
20 | my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 }; |
21 | my $mymeta = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5702 }; |
22 | |
6d71fae7 |
23 | WriteMakefile( |
24 | NAME => 'Moo', |
25 | VERSION_FROM => 'lib/Moo.pm', |
bb6d1b87 |
26 | PREREQ_PM => { |
27 | %RUN_DEPS, |
28 | ($] >= 5.010 ? () : ('MRO::Compat' => 0)), |
29 | ($mymeta_works ? () : (%BUILD_DEPS)), |
30 | }, |
31 | ($mymeta_works |
32 | ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong |
33 | BUILD_REQUIRES => \%BUILD_DEPS, |
34 | META_ADD => { requires => \%RUN_DEPS } |
35 | ) |
36 | : ( # META_ADD both to get META right - only Makefile written |
37 | META_ADD => { |
38 | requires => \%RUN_DEPS, |
39 | build_requires => \%BUILD_DEPS, |
40 | } |
41 | ) |
42 | ), |
43 | ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()), |
6d71fae7 |
44 | LICENSE => 'perl', |
45 | ); |