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 = ( |
cc1d7a92 |
13 | 'Class::Method::Modifiers' => 1.10, |
4a7640d1 |
14 | 'strictures' => 1.004003, |
8f7cf9cf |
15 | 'Module::Runtime' => 0.012, |
1159c8c2 |
16 | 'Role::Tiny' => 1.002004, |
e3797266 |
17 | 'Devel::GlobalDestruction' => 0.09, |
bb6d1b87 |
18 | ); |
19 | |
20 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
21 | my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 }; |
22 | my $mymeta = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5702 }; |
23 | |
627063f7 |
24 | my %extra_info = ( |
25 | resources => { |
072d158f |
26 | repository => 'git://git.shadowcat.co.uk/gitmo/Moo.git', |
27 | IRC => 'irc://irc.perl.org/#moose', |
28 | bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Moo', |
29 | license => 'http://dev.perl.org/licenses/', |
627063f7 |
30 | } |
31 | ); |
32 | |
6d71fae7 |
33 | WriteMakefile( |
34 | NAME => 'Moo', |
35 | VERSION_FROM => 'lib/Moo.pm', |
bb6d1b87 |
36 | PREREQ_PM => { |
37 | %RUN_DEPS, |
38 | ($] >= 5.010 ? () : ('MRO::Compat' => 0)), |
39 | ($mymeta_works ? () : (%BUILD_DEPS)), |
40 | }, |
41 | ($mymeta_works |
42 | ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong |
43 | BUILD_REQUIRES => \%BUILD_DEPS, |
627063f7 |
44 | META_ADD => { requires => \%RUN_DEPS, %extra_info } |
bb6d1b87 |
45 | ) |
46 | : ( # META_ADD both to get META right - only Makefile written |
47 | META_ADD => { |
48 | requires => \%RUN_DEPS, |
49 | build_requires => \%BUILD_DEPS, |
627063f7 |
50 | %extra_info, |
bb6d1b87 |
51 | } |
52 | ) |
53 | ), |
eb6fa3d7 |
54 | META_MERGE => { |
55 | no_index => { |
56 | directory => [ 'xt' ] |
57 | } |
58 | }, |
bb6d1b87 |
59 | ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()), |
6d71fae7 |
60 | LICENSE => 'perl', |
61 | ); |