remove MooseX::Types prereq
[catagits/Catalyst-Plugin-Static-Simple.git] / Makefile.PL
CommitLineData
aa5935f1 1use strict;
2use warnings;
0f4cdbe7 3use 5.006;
370d2d1f 4
0f4cdbe7 5my %META = (
6 name => 'Catalyst-Plugin-Static-Simple',
7 license => 'perl_5',
8 prereqs => {
9 configure => { requires => {
10 'ExtUtils::MakeMaker' => 0,
11 } },
12 test => {
13 requires => {
14 'Test::More' => 0,
15 },
16 },
17 runtime => {
18 requires => {
19 'Catalyst::Runtime' => '5.80008',
20 'MIME::Types' => '2.03',
21 'Moose' => 0,
0f4cdbe7 22 'namespace::autoclean' => 0,
23 },
24 },
25 develop => {
26 requires => {
27 'Test::NoTabs' => 0,
28 'Test::Pod' => '1.14',
29 'Test::Pod::Coverage' => '1.04',
30 },
31 },
32 },
33 resources => {
34 repository => {
35 url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Static-Simple.git',
36 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Plugin-Static-Simple.git',
37 type => 'git',
38 },
39 bugtracker => {
40 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-Static-Simple',
41 mailto => 'bug-Catalyst-Plugin-Static-Simple@rt.cpan.org',
42 },
43 license => [ 'http://dev.perl.org/licenses/' ],
44 },
45 no_index => {
46 directory => [ 't', 'xt' ]
47 },
48);
370d2d1f 49
0f4cdbe7 50my %MM_ARGS = ();
99ce134b 51
0f4cdbe7 52if (
53 eval { require Catalyst::Plugin::SubRequest }
54 && !eval { Catalyst::Plugin::SubRequest->VERSION(0.08) }
55) {
56 print "** WARNING **\n"
57 . "You appear to have a version of Catalyst::Plugin::SubRequest "
58 . "older than 0.08.\n"
59 . "You must upgrade to SubRequest 0.08 or later if you use it "
60 . "in any applications with Static::Simple.\n";
61 $MM_ARGS{PREREQ_PM}{'Catalyst::Plugin::SubRequest'} = '0.08';
62}
99ce134b 63
0f4cdbe7 64## BOILERPLATE ###############################################################
65require ExtUtils::MakeMaker;
66(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
bcba5d8b 67
0f4cdbe7 68# have to do this since old EUMM dev releases miss the eval $VERSION line
69my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
70my $mymeta = $eumm_version >= 6.57_02;
71my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
bcba5d8b 72
0f4cdbe7 73($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
74($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
75$META{license} = [ $META{license} ]
76 if $META{license} && !ref $META{license};
77$MM_ARGS{LICENSE} = $META{license}[0]
78 if $META{license} && $eumm_version >= 6.30;
79$MM_ARGS{NO_MYMETA} = 1
80 if $mymeta_broken;
81$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
82 unless -f 'META.yml';
83$MM_ARGS{PL_FILES} ||= {};
84$MM_ARGS{NORECURS} = 1
85 if not exists $MM_ARGS{NORECURS};
bcba5d8b 86
0f4cdbe7 87for (qw(configure build test runtime)) {
88 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
89 my $r = $MM_ARGS{$key} = {
90 %{$META{prereqs}{$_}{requires} || {}},
91 %{delete $MM_ARGS{$key} || {}},
92 };
93 defined $r->{$_} or delete $r->{$_} for keys %$r;
99ce134b 94}
95
0f4cdbe7 96$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
97
98delete $MM_ARGS{MIN_PERL_VERSION}
99 if $eumm_version < 6.47_01;
100$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
101 if $eumm_version < 6.63_03;
102$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
103 if $eumm_version < 6.55_01;
104delete $MM_ARGS{CONFIGURE_REQUIRES}
105 if $eumm_version < 6.51_03;
ce4027b8 106
0f4cdbe7 107ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
108## END BOILERPLATE ###########################################################