X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=a86586737462e0abaf4e6479c35bad0171b4dd93;hb=85de1ef9dedd1a60115e475036dabaed68dc6ae2;hp=4883b75f14bf4abf1fa6f42e1663ef9dea407301;hpb=952460dae0b8bf3ae22fe1235625e582ed893303;p=gitmo%2FMoo.git diff --git a/Makefile.PL b/Makefile.PL index 4883b75..a865867 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,27 +1,45 @@ use strict; use warnings FATAL => 'all'; -use 5.008003; +use 5.008001; use ExtUtils::MakeMaker; (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; -unless (-e 'META.yml') { - warn "MYMETA.yml is going to be completely wrong. Sorry.\n"; -} +my %BUILD_DEPS = (); -my %BUILD_DEPS = ( +my %TEST_DEPS = ( 'Test::More' => 0.96, 'Test::Fatal' => 0.003, ); my %RUN_DEPS = ( - 'Class::Method::Modifiers' => 1.05, - 'strictures' => 1.001001, + 'Class::Method::Modifiers' => 1.10, + 'strictures' => 1.004003, + 'Module::Runtime' => 0.012, + 'Role::Tiny' => 1.002004, + 'Devel::GlobalDestruction' => 0.11, ); # 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 $has_test_requires = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.63_03 }; + +if (not $has_test_requires) +{ + %BUILD_DEPS = (%BUILD_DEPS, %TEST_DEPS); + %TEST_DEPS = (); +} + +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', @@ -33,15 +51,24 @@ WriteMakefile( ($mymeta_works ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong BUILD_REQUIRES => \%BUILD_DEPS, - META_ADD => { requires => \%RUN_DEPS } + $has_test_requires ? ( TEST_REQUIRES => \%TEST_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, + test_requires => \%TEST_DEPS, + %extra_info, } ) ), + META_MERGE => { + no_index => { + directory => [ 'xt' ] + } + }, ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()), LICENSE => 'perl', ); +