X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=48c1f088cd15f9acf8e332bb6585eb103f286de8;hb=c77791832473ac06c9114fd4dc620b07f8c1712f;hp=c99c9e7ff05ce333c79b016bb6bbf1caccfcd623;hpb=6d71fae7388c406fe3a6b6e0eefa478827841d00;p=gitmo%2FMoo.git diff --git a/Makefile.PL b/Makefile.PL index c99c9e7..48c1f08 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,11 +1,61 @@ use strict; use warnings FATAL => 'all'; +use 5.008001; use ExtUtils::MakeMaker; +(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; + +my %BUILD_DEPS = ( + 'Test::More' => 0.96, + 'Test::Fatal' => 0.003, +); + +my %RUN_DEPS = ( + 'Class::Method::Modifiers' => 1.10, + 'strictures' => 1.004003, + 'Module::Runtime' => 0.012, + 'Role::Tiny' => 1.002004, + 'Devel::GlobalDestruction' => 0.09, +); + +# have to do this since old EUMM dev releases miss the eval $VERSION line +my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 }; +my $mymeta = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5702 }; + +my %extra_info = ( + resources => { + repository => 'git://git.shadowcat.co.uk/gitmo/Moo.git', + IRC => 'irc://irc.perl.org/#moose', + bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Moo', + license => 'http://dev.perl.org/licenses/', + } +); WriteMakefile( NAME => 'Moo', VERSION_FROM => 'lib/Moo.pm', - ABSTRACT_FROM => 'lib/Moo.pm', - AUTHOR => 'Matt S Trout ', + PREREQ_PM => { + %RUN_DEPS, + ($] >= 5.010 ? () : ('MRO::Compat' => 0)), + ($mymeta_works ? () : (%BUILD_DEPS)), + }, + ($mymeta_works + ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong + BUILD_REQUIRES => \%BUILD_DEPS, + META_ADD => { requires => \%RUN_DEPS, %extra_info } + ) + : ( # META_ADD both to get META right - only Makefile written + META_ADD => { + requires => \%RUN_DEPS, + build_requires => \%BUILD_DEPS, + %extra_info, + } + ) + ), + META_MERGE => { + no_index => { + directory => [ 'xt' ] + } + }, + ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()), LICENSE => 'perl', );