X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Makefile.PL;h=af92644ddd0b4062dd8de50441034e4aeeb7bc99;hb=json_sugar;hp=4abb43d5c2f50546544b024eed937ebd9581ad99;hpb=b13ce12ed7ed1ececab9771f7d3f14b0038cfccf;p=catagits%2FWeb-Simple.git diff --git a/Makefile.PL b/Makefile.PL index 4abb43d..af92644 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,30 +1,22 @@ use strict; use warnings FATAL => 'all'; -use 5.008001; +use 5.006; use ExtUtils::MakeMaker; (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; -WriteMakefile( +my %WriteMakefileArgs = ( NAME => 'Web::Simple', VERSION_FROM => 'lib/Web/Simple.pm', - PREREQ_PM => { - 'Syntax::Keyword::Gather' => '1.001', - 'Plack' => '0.9968', - 'Moo' => '0.009014', - 'warnings::illegalproto' => '0.001', - 'Data::Dumper::Concise' => '2.020', - }, - MIN_PERL_VERSION => '5.006', META_MERGE => { 'meta-spec' => { version => 2 }, dynamic_config => 0, resources => { - # r/w: p5sagit@git.shadowcat.co.uk:Web-Simple.git + # r/w: catagits@git.shadowcat.co.uk:Web-Simple.git repository => { - url => 'git://git.shadowcat.co.uk/p5sagit/Web-Simple.git', - web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Web-Simple.git', + url => 'git://git.shadowcat.co.uk/catagits/Web-Simple.git', + web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Web-Simple.git', type => 'git', }, bugtracker => { @@ -34,5 +26,80 @@ WriteMakefile( }, }, - realclean => { FILES => [ 'Distar/', 'MANIFEST*' ] }, + META_ADD => { + prereqs => { + configure => { + requires => { + 'ExtUtils::MakeMaker' => 0, + }, + }, + runtime => { + requires => { + 'Encode' => '0', # not core in 5.6 + 'Exporter' => '5.57', # use Exporter 'import' + 'Moo' => '0.009014', + 'Plack' => '0.9968', + 'Scalar::Util' => '0', # not core in 5.6 + 'Syntax::Keyword::Gather' => '1.001', + 'strictures' => '1', + 'warnings::illegalproto' => '0', + 'perl' => '5.006', + }, + }, + test => { + requires => { + 'Data::Dumper::Concise' => '2.020', + 'Test::More' => '0.88', + }, + recommends => { + 'Devel::Cycle' => '0', + 'HTTP::Request::AsCGI' => '0', + }, + }, + }, + }, ); + +my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; + +for (qw(configure build test runtime)) { + my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; + next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_} + or exists $WriteMakefileArgs{$key}; + my $r = $WriteMakefileArgs{$key} = { + %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}}, + %{delete $WriteMakefileArgs{$key} || {}}, + }; + defined $r->{$_} or delete $r->{$_} for keys %$r; +} + +# dynamic prereqs get added here. + +$WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0; + +die 'attention developer: you need to do a sane meta merge here!' + if keys %{$WriteMakefileArgs{BUILD_REQUIRES}}; + +$WriteMakefileArgs{BUILD_REQUIRES} = { + %{$WriteMakefileArgs{BUILD_REQUIRES} || {}}, + %{delete $WriteMakefileArgs{TEST_REQUIRES}} +} if $eumm_version < 6.63_03; + +$WriteMakefileArgs{PREREQ_PM} = { + %{$WriteMakefileArgs{PREREQ_PM}}, + %{delete $WriteMakefileArgs{BUILD_REQUIRES}} +} if $eumm_version < 6.55_01; + +delete $WriteMakefileArgs{CONFIGURE_REQUIRES} + if $eumm_version < 6.51_03; + +delete $WriteMakefileArgs{MIN_PERL_VERSION} + if $eumm_version < 6.48; + +delete @WriteMakefileArgs{qw(META_ADD META_MERGE)} + if $eumm_version < 6.46; + +delete $WriteMakefileArgs{LICENSE} + if $eumm_version < 6.31; + +WriteMakefile(%WriteMakefileArgs);