test for load_module fixes
[gitmo/Role-Tiny.git] / Makefile.PL
CommitLineData
6d71fae7 1use strict;
2use warnings FATAL => 'all';
253d7c99 3use 5.008003;
6d71fae7 4use ExtUtils::MakeMaker;
253d7c99 5(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
6d71fae7 6
bb6d1b87 7unless (-e 'META.yml') {
8 warn "MYMETA.yml is going to be completely wrong. Sorry.\n";
9}
10
11my %BUILD_DEPS = (
12 'Test::More' => 0.96,
13 'Test::Fatal' => 0.003,
14);
15
16my %RUN_DEPS = (
17 'Class::Method::Modifiers' => 1.05,
952460da 18 'strictures' => 1.001001,
bb6d1b87 19);
20
21# have to do this since old EUMM dev releases miss the eval $VERSION line
22my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 };
23my $mymeta = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5702 };
24
6d71fae7 25WriteMakefile(
26 NAME => 'Moo',
27 VERSION_FROM => 'lib/Moo.pm',
bb6d1b87 28 PREREQ_PM => {
29 %RUN_DEPS,
30 ($] >= 5.010 ? () : ('MRO::Compat' => 0)),
31 ($mymeta_works ? () : (%BUILD_DEPS)),
32 },
33 ($mymeta_works
34 ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong
35 BUILD_REQUIRES => \%BUILD_DEPS,
36 META_ADD => { requires => \%RUN_DEPS }
37 )
38 : ( # META_ADD both to get META right - only Makefile written
39 META_ADD => {
40 requires => \%RUN_DEPS,
41 build_requires => \%BUILD_DEPS,
42 }
43 )
44 ),
45 ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()),
6d71fae7 46 LICENSE => 'perl',
47);