Commit | Line | Data |
918432f9 |
1 | use strict; |
2 | use warnings FATAL => 'all'; |
3 | use 5.006; |
0bede633 |
4 | |
918432f9 |
5 | my %META = ( |
6 | name => 'Catalyst-Plugin-Session-State-Cookie', |
7 | license => 'perl_5', |
8 | prereqs => { |
9 | configure => { requires => { |
10 | 'ExtUtils::MakeMaker' => 0, |
11 | } }, |
12 | build => { requires => { |
13 | } }, |
14 | test => { |
15 | requires => { |
92927909 |
16 | 'Catalyst::Test' => 0, |
17 | 'HTTP::Cookies' => 0, |
18 | 'Test::More' => '0.88', |
918432f9 |
19 | }, |
20 | }, |
21 | runtime => { |
22 | requires => { |
23 | 'Catalyst' => '5.80005', |
24 | 'Catalyst::Plugin::Session' => '0.27', |
25 | 'MRO::Compat' => 0, |
26 | 'Moose' => 0, |
27 | 'namespace::autoclean' => 0, |
28 | }, |
29 | }, |
30 | develop => { |
31 | requires => { |
f04bb39a |
32 | 'Test::Pod' => '1.14', |
33 | 'Test::Pod::Coverage' => '1.04', |
918432f9 |
34 | }, |
35 | }, |
36 | }, |
37 | resources => { |
38 | repository => { |
39 | url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Plugin-Session-State-Cookie.git', |
40 | web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Plugin-Session-State-Cookie.git', |
41 | type => 'git', |
42 | }, |
43 | bugtracker => { |
44 | web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Plugin-Session-State-Cookie', |
45 | mailto => 'bug-Catalyst-Plugin-Session-State-Cookie@rt.cpan.org', |
46 | }, |
47 | license => [ 'http://dev.perl.org/licenses/' ], |
48 | }, |
49 | no_index => { |
50 | directory => [ 't', 'xt' ] |
51 | }, |
52 | x_authority => 'cpan:NUFFIN', |
53 | ); |
0bede633 |
54 | |
918432f9 |
55 | my %MM_ARGS = (); |
0bede633 |
56 | |
918432f9 |
57 | ## BOILERPLATE ############################################################### |
58 | require ExtUtils::MakeMaker; |
59 | (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
d4b0314d |
60 | |
918432f9 |
61 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
62 | my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; |
63 | my $mymeta = $eumm_version >= 6.57_02; |
64 | my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; |
65 | |
66 | ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; |
67 | ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; |
68 | $META{license} = [ $META{license} ] |
69 | if $META{license} && !ref $META{license}; |
70 | $MM_ARGS{LICENSE} = $META{license}[0] |
71 | if $META{license} && $eumm_version >= 6.30; |
72 | $MM_ARGS{NO_MYMETA} = 1 |
73 | if $mymeta_broken; |
74 | $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } |
75 | unless -f 'META.yml'; |
76 | $MM_ARGS{PL_FILES} ||= {}; |
77 | $MM_ARGS{NORECURS} = 1 |
78 | if not exists $MM_ARGS{NORECURS}; |
79 | |
80 | for (qw(configure build test runtime)) { |
81 | my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; |
82 | my $r = $MM_ARGS{$key} = { |
83 | %{$META{prereqs}{$_}{requires} || {}}, |
84 | %{delete $MM_ARGS{$key} || {}}, |
85 | }; |
86 | defined $r->{$_} or delete $r->{$_} for keys %$r; |
5aca1bdd |
87 | } |
88 | |
918432f9 |
89 | $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; |
90 | |
91 | delete $MM_ARGS{MIN_PERL_VERSION} |
92 | if $eumm_version < 6.47_01; |
93 | $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} |
94 | if $eumm_version < 6.63_03; |
95 | $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} |
96 | if $eumm_version < 6.55_01; |
97 | delete $MM_ARGS{CONFIGURE_REQUIRES} |
98 | if $eumm_version < 6.51_03; |
99 | |
100 | ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); |
101 | ## END BOILERPLATE ########################################################### |