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