fdc8ba73636164131fb3adfacf3cee0765c89209
[gitmo/Role-Tiny.git] / Makefile.PL
1 use strict;
2 use warnings FATAL => 'all';
3 use 5.008001;
4 use ExtUtils::MakeMaker;
5
6 unless (-e 'META.yml') {
7   warn "MYMETA.yml is going to be completely wrong. Sorry.\n";
8 }
9
10 my %BUILD_DEPS = (
11   'Test::More' => 0.96,
12   'Test::Fatal' => 0.003,
13 );
14
15 my %RUN_DEPS = (
16   'Class::Method::Modifiers' => 1.05,
17   'strictures' => 1,
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 WriteMakefile(
25   NAME => 'Moo',
26   VERSION_FROM => 'lib/Moo.pm',
27   ABSTRACT_FROM => 'lib/Moo.pm',
28   AUTHOR => 'Matt S Trout <mst@shadowcat.co.uk>',
29   PREREQ_PM => {
30     %RUN_DEPS,
31     ($] >= 5.010 ? () : ('MRO::Compat' => 0)),
32     ($mymeta_works ? () : (%BUILD_DEPS)),
33   },
34   ($mymeta_works
35     ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong
36         BUILD_REQUIRES => \%BUILD_DEPS,
37         META_ADD => { requires => \%RUN_DEPS }
38       )
39     : ( # META_ADD both to get META right - only Makefile written
40         META_ADD => {
41           requires => \%RUN_DEPS,
42           build_requires => \%BUILD_DEPS,
43         }
44       )
45   ),
46   ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()),
47   LICENSE => 'perl',
48 );