remove test using Params::Nested
[catagits/Catalyst-Runtime.git] / Makefile.PL
CommitLineData
9a2055d7 1use strict;
2use warnings;
807303a1 3use 5.008003;
4
5my %META = (
6 name => 'Catalyst-Runtime',
7 license => 'perl_5',
8 prereqs => {
9 configure => { requires => {
10 'ExtUtils::MakeMaker' => 0,
11 } },
12 build => { requires => {
13 } },
14 test => {
15 requires => {
16 'Test::Fatal' => 0,
17 'Test::More' => '0.88',
18 'HTTP::Request::Common' => 0,
807303a1 19 'HTTP::Status' => 0,
20 },
21 },
22 runtime => {
23 requires => {
24 'perl' => 5.008003,
25 'List::Util' => '1.45',
807303a1 26 'namespace::clean' => '0.23',
27 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903',
28 'Class::Load' => '0.12',
807303a1 29 'Moose' => '1.03',
30 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable' => '0.24',
31 'MooseX::Role::WithOverloading' => '0.09',
32 'Carp' => '1.25',
33 'Class::C3::Adopt::NEXT' => '0.07',
34 'CGI::Simple::Cookie' => '1.109',
35 'Data::Dump' => 0,
36 'Data::OptList' => 0,
37 'HTML::Entities' => 0,
38 'HTML::HeadParser' => 0,
39 'HTTP::Body' => '1.22',
40 'HTTP::Headers' => '1.64',
41 'HTTP::Request' => '5.814',
42 'HTTP::Response' => '5.813',
807303a1 43 'Module::Pluggable' => '4.7',
44 'Path::Class' => '0.09',
45 'Scalar::Util' => 0,
46 'Sub::Exporter' => 0,
47 'Text::SimpleTable' => '0.03',
48 'Time::HiRes' => 0,
49 'Tree::Simple' => '1.15',
43078f26 50 'Tree::Simple::Visitor::FindByUID' => 0,
807303a1 51 'Try::Tiny' => '0.17',
52 'Safe::Isa' => 0,
3b1178b0 53 'Socket' => '1.96',
807303a1 54 'Task::Weaken' => 0,
55 'Text::Balanced' => 0, # core in 5.8.x but mentioned for completeness
56 'MRO::Compat' => 0,
57 'MooseX::Getopt' => '0.48',
58 'String::RewritePrefix' => '0.004', # Catalyst::Utils::resolve_namespace
59 'Devel::InnerPackage' => 0, # No longer core in blead
60 'Plack' => '0.9991', # IIS6+7 fix middleware
61 'Plack::Middleware::ReverseProxy' => '0.04',
62 'Plack::Test::ExternalServer' => 0,
807303a1 63 'Encode' => '2.49',
64 'LWP' => '5.837', # LWP had unicode fail in 5.8.26
65 'URI' => '1.65',
66 'URI::ws' => '0.03',
67 'JSON::MaybeXS' => '1.000000',
68 'Stream::Buffered' => 0,
69 'Hash::MultiValue' => 0,
70 'Plack::Request::Upload' => 0,
71 'CGI::Struct' => 0,
72 "Plack::Middleware::Conditional" => 0,
73 "Plack::Middleware::IIS6ScriptNameFix" => 0,
74 "Plack::Middleware::IIS7KeepAliveFix" => 0,
75 "Plack::Middleware::LighttpdScriptNameFix" => 0,
76 "Plack::Middleware::ContentLength" => 0,
77 "Plack::Middleware::Head" => 0,
78 "Plack::Middleware::HTTPExceptions" => 0,
79 "Plack::Middleware::FixMissingBodyInRedirect" => '0.09',
80 "Plack::Middleware::MethodOverride" => '0.12',
81 "Plack::Middleware::RemoveRedundantBody" => '0.03',
da94772a 82 'PerlIO::utf8_strict' => 0,
807303a1 83 },
84 },
85 develop => {
86 requires => {
8ae46e98 87 'Test::TCP' => '2.00',
c2eac008 88 'File::Copy::Recursive' => '0.40',
807303a1 89 'Starman' => 0,
90 'MooseX::Daemonize' => 0,
91 'Test::NoTabs' => 0,
92 'Test::Pod' => 0,
93 'Test::Pod::Coverage' => 0,
94 'Test::Spelling' => 0,
95 'Pod::Coverage::TrustPod' => 0,
919758f4 96 'Compress::Zlib' => 0,
97 'Catalyst::Action::REST' => 0,
98 'Type::Tiny' => 0,
99 'Proc::ProcessTable' => 0,
807303a1 100 },
101 },
102 },
103 resources => {
104 repository => {
105 # r/w: catagits@git.shadowcat.co.uk:Catalyst-Runtime.git
106 url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git',
107 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Runtime.git;a=summary',
108 type => 'git',
109 },
110 x_IRC => 'irc://irc.perl.org/#catalyst',
111 bugtracker => {
112 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Runtime',
113 mailto => 'bug-Catalyst-Runtime@rt.cpan.org',
114 },
115 license => [ 'http://dev.perl.org/licenses/' ],
116 x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
117 homepage => 'http://dev.catalyst.perl.org/',
118 },
119 no_index => {
120 directory => [ 't', 'xt' ]
121 },
122 x_breaks => {
123 'Catalyst::Plugin::SubRequest' => '<= 0.14',
124 'Catalyst::Model::Akismet' => '<= 0.02',
125 'Catalyst::Component::ACCEPT_CONTEXT' => '<= 0.06',
126 'Catalyst::Plugin::ENV' => 0, # This plugin is just stupid, full stop
127 # should have been a core fix.
128 'Catalyst::Plugin::Unicode::Encoding' => '<= 0.2',
129 'Catalyst::Plugin::Authentication' => '<= 0.10010', # _config accessor in ::Credential::Password
130 'Catalyst::Authentication::Credential::HTTP' => '<= 1.009',
131 'Catalyst::Plugin::Session::Store::File' => '<= 0.16',
132 'Catalyst::Plugin::Session' => '<= 0.21',
133 'Catalyst::Plugin::Session::State::Cookie' => '<= 0.10',
134 'Catalyst::Plugin::Session::Store::FastMmap' => '<= 0.09',
135 'Catalyst::Controller::AllowDisable' => '<= 0.03',
136 'Reaction' => '<= 0.001999',
137 'Catalyst::Plugin::Upload::Image::Magick' => '<= 0.03',
138 'Catalyst::Plugin::ConfigLoader' => '<= 0.22', # Older versions work but
139 # throw Data::Visitor warns
140 'Catalyst::Devel' => '<= 1.19',
141 'Catalyst::Plugin::SmartURI' => '<= 0.032',
142 'CatalystX::CRUD' => '<= 0.37',
143 'Catalyst::Action::RenderView' => '<= 0.07',
144 'Catalyst::Plugin::DebugCookie' => '<= 0.999002',
145 'Catalyst::Plugin::Authentication' => '<= 0.100091',
146 'CatalystX::Imports' => '<= 0.03',
147 'Catalyst::Plugin::HashedCookies' => '<= 1.03',
148 'Catalyst::Action::REST' => '<= 0.67',
149 'CatalystX::CRUD' => '<= 0.42',
150 'CatalystX::CRUD::Model::RDBO' => '<= 0.20',
151 'Catalyst::View::Mason' => '<= 0.17',
152# Note these are not actually needed - they fail tests against the
153# new version, but still work fine..
154# 'Catalyst::ActionRole::ACL' => '<= 0.05',
155# 'Catalyst::Plugin::Session::Store::DBIC' => '<= 0.11',
156 'Test::WWW::Mechanize::Catalyst' => '<= 0.53', # Dep warnings unless upgraded.
157 },
158 x_authority => 'cpan:MSTROUT',
159);
212ba4ee 160
c2eac008 161my $tests = 't/*.t t/aggregate/*.t';
a06394ac 162
807303a1 163my %MM_ARGS = (
164 test => { TESTS => $tests },
165 EXE_FILES => [ glob 'script/*.pl' ],
166 PREREQ_PM => {
167 (eval { require Moose; Moose->VERSION('2.1300') } ? () : (
168 'MooseX::Role::WithOverloading' => '0.09'
169 )),
170 },
171);
a06394ac 172
807303a1 173## BOILERPLATE ###############################################################
174require ExtUtils::MakeMaker;
175(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
176
177# have to do this since old EUMM dev releases miss the eval $VERSION line
178my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
179my $mymeta = $eumm_version >= 6.57_02;
180my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
181
182($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
183($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
184$META{license} = [ $META{license} ]
185 if $META{license} && !ref $META{license};
186$MM_ARGS{LICENSE} = $META{license}[0]
187 if $META{license} && $eumm_version >= 6.30;
188$MM_ARGS{NO_MYMETA} = 1
189 if $mymeta_broken;
190$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
191 unless -f 'META.yml';
192
193for (qw(configure build test runtime)) {
194 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
195 my $r = $MM_ARGS{$key} = {
196 %{$META{prereqs}{$_}{requires} || {}},
197 %{delete $MM_ARGS{$key} || {}},
198 };
199 defined $r->{$_} or delete $r->{$_} for keys %$r;
de925c79 200}
201
807303a1 202$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
697a1b1a 203
807303a1 204delete $MM_ARGS{MIN_PERL_VERSION}
205 if $eumm_version < 6.47_01;
206$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
207 if $eumm_version < 6.63_03;
208$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
209 if $eumm_version < 6.55_01;
210delete $MM_ARGS{CONFIGURE_REQUIRES}
211 if $eumm_version < 6.51_03;
697a1b1a 212
807303a1 213ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
214## END BOILERPLATE ###########################################################
614f3ad6 215
614f3ad6 216print <<"EOF";
217
218 Important:
a5b5152b 219
0187a79d 220 This library is for running Catalyst applications.
221
341d40d1 222 For development and use of catalyst.pl and myapp_create.pl, make sure
223 you also install the development tools package Catalyst::Devel.
f63c03e4 224
ec0939b9 225 perl -MCPAN -e 'install Catalyst::Devel' # or
226 cpanm Catalyst::Devel
6bc14aef 227
f4c1afd4 228 To get some commonly used plugins, as well as the TT view and DBIC
6bc14aef 229 model, install Task::Catalyst in the same way.
a5b5152b 230
a5b5152b 231 Have fun!
614f3ad6 232EOF