#moose, repository metadata
[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.04,
14   'strictures' => 1.001001,
15   'Module::Runtime' => 0.012,
16   'Role::Tiny' => 1.001003,
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
23 my %extra_info = (
24   resources => {
25     repository => 'git://git.shadowcat.co.uk/gitmo/Moo.git'
26   }
27 );
28
29 WriteMakefile(
30   NAME => 'Moo',
31   VERSION_FROM => 'lib/Moo.pm',
32   PREREQ_PM => {
33     %RUN_DEPS,
34     ($] >= 5.010 ? () : ('MRO::Compat' => 0)),
35     ($mymeta_works ? () : (%BUILD_DEPS)),
36   },
37   ($mymeta_works
38     ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong
39         BUILD_REQUIRES => \%BUILD_DEPS,
40         META_ADD => { requires => \%RUN_DEPS, %extra_info }
41       )
42     : ( # META_ADD both to get META right - only Makefile written
43         META_ADD => {
44           requires => \%RUN_DEPS,
45           build_requires => \%BUILD_DEPS,
46           %extra_info,
47         }
48       )
49   ),
50   ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()),
51   LICENSE => 'perl',
52 );