Fix POD markup for default predicate names
[gitmo/Moo.git] / Makefile.PL
1 use strict;
2 use warnings FATAL => 'all';
3 use 5.008001;
4 use ExtUtils::MakeMaker;
5 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
6
7 my %BUILD_DEPS = (
8   'Test::More' => 0.96,
9   'Test::Fatal' => 0.003,
10 );
11
12 my %RUN_DEPS = (
13   'Class::Method::Modifiers' => 1.10,
14   'strictures' => 1.004003,
15   'Module::Runtime' => 0.012,
16   'Role::Tiny' => 1.002004,
17   'Devel::GlobalDestruction' => 0.09,
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
24 my %extra_info = (
25   resources => {
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/',
30   }
31 );
32
33 WriteMakefile(
34   NAME => 'Moo',
35   VERSION_FROM => 'lib/Moo.pm',
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,
44         META_ADD => { requires => \%RUN_DEPS, %extra_info }
45       )
46     : ( # META_ADD both to get META right - only Makefile written
47         META_ADD => {
48           requires => \%RUN_DEPS,
49           build_requires => \%BUILD_DEPS,
50           %extra_info,
51         }
52       )
53   ),
54   META_MERGE => {
55     no_index => {
56       directory => [ 'xt' ]
57     }
58   },
59   ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()),
60   LICENSE => 'perl',
61 );