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