X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git;a=blobdiff_plain;f=Makefile.PL;h=a03232512a926f3f3a9089f121175949498cf1bf;hp=fc385abc80393a1d1e41d823e7bc80c4e7852d4f;hb=918432f960efb788d9e9ba67be874cba55fd7746;hpb=2b79283a8e04ad092d02776e23fdfce4d31e2595 diff --git a/Makefile.PL b/Makefile.PL index fc385ab..a032325 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -1,22 +1,97 @@ -use inc::Module::Install 0.87; +use strict; +use warnings FATAL => 'all'; +use 5.006; -name 'Catalyst-Plugin-Session-State-Cookie'; -all_from 'lib/Catalyst/Plugin/Session/State/Cookie.pm'; +my %META = ( + name => 'Catalyst-Plugin-Session-State-Cookie', + license => 'perl_5', + prereqs => { + configure => { requires => { + 'ExtUtils::MakeMaker' => 0, + } }, + build => { requires => { + } }, + test => { + requires => { + 'Test::More' => '0.88', + }, + }, + runtime => { + requires => { + 'Catalyst' => '5.80005', + 'Catalyst::Plugin::Session' => '0.27', + 'MRO::Compat' => 0, + 'Moose' => 0, + 'namespace::autoclean' => 0, + }, + }, + develop => { + requires => { + }, + }, + }, + resources => { + repository => { + url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Session-State-Cookie.git', + web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Plugin-Session-State-Cookie.git', + type => 'git', + }, + bugtracker => { + web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-Session-State-Cookie', + mailto => 'bug-Catalyst-Plugin-Session-State-Cookie@rt.cpan.org', + }, + license => [ 'http://dev.perl.org/licenses/' ], + }, + no_index => { + directory => [ 't', 'xt' ] + }, + x_authority => 'cpan:NUFFIN', +); -requires 'Catalyst' => '5.80005'; -requires 'Catalyst::Plugin::Session' => '0.27'; -requires 'MRO::Compat'; -requires 'Moose'; -requires 'namespace::autoclean'; -test_requires 'Moose'; -test_requires 'Test::More'; +my %MM_ARGS = (); -auto_install; -resources repository => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Session-State-Cookie.git'; +## BOILERPLATE ############################################################### +require ExtUtils::MakeMaker; +(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; -if ($Module::Install::AUTHOR) { - system("pod2text lib/Catalyst/Plugin/Session/State/Cookie.pm > README") - and die; +# have to do this since old EUMM dev releases miss the eval $VERSION line +my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; +my $mymeta = $eumm_version >= 6.57_02; +my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; + +($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; +($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; +$META{license} = [ $META{license} ] + if $META{license} && !ref $META{license}; +$MM_ARGS{LICENSE} = $META{license}[0] + if $META{license} && $eumm_version >= 6.30; +$MM_ARGS{NO_MYMETA} = 1 + if $mymeta_broken; +$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } + unless -f 'META.yml'; +$MM_ARGS{PL_FILES} ||= {}; +$MM_ARGS{NORECURS} = 1 + if not exists $MM_ARGS{NORECURS}; + +for (qw(configure build test runtime)) { + my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; + my $r = $MM_ARGS{$key} = { + %{$META{prereqs}{$_}{requires} || {}}, + %{delete $MM_ARGS{$key} || {}}, + }; + defined $r->{$_} or delete $r->{$_} for keys %$r; } -WriteAll; +$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; + +delete $MM_ARGS{MIN_PERL_VERSION} + if $eumm_version < 6.47_01; +$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} + if $eumm_version < 6.63_03; +$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} + if $eumm_version < 6.55_01; +delete $MM_ARGS{CONFIGURE_REQUIRES} + if $eumm_version < 6.51_03; + +ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); +## END BOILERPLATE ###########################################################