No need for ScalarRef when using Sub::Quote
[gitmo/Role-Tiny.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.07,
14   'strictures' => 1.001001,
15 );
16
17 # have to do this since old EUMM dev releases miss the eval $VERSION line
18 my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 };
19 my $mymeta = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5702 };
20
21 WriteMakefile(
22   NAME => 'Moo',
23   VERSION_FROM => 'lib/Moo.pm',
24   PREREQ_PM => {
25     %RUN_DEPS,
26     ($] >= 5.010 ? () : ('MRO::Compat' => 0)),
27     ($mymeta_works ? () : (%BUILD_DEPS)),
28   },
29   ($mymeta_works
30     ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong
31         BUILD_REQUIRES => \%BUILD_DEPS,
32         META_ADD => { requires => \%RUN_DEPS }
33       )
34     : ( # META_ADD both to get META right - only Makefile written
35         META_ADD => {
36           requires => \%RUN_DEPS,
37           build_requires => \%BUILD_DEPS,
38         }
39       )
40   ),
41   ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()),
42   LICENSE => 'perl',
43 );