reported errors
[catagits/Catalyst-Runtime.git] / Makefile.PL
1 use strict;
2 use warnings;
3 use 5.008003;
4
5 my %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 => {
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
96         'File::Copy::Recursive'   => '0.40',
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 );
166
167 my $tests = 't/*.t t/aggregate/*.t';
168
169 my %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 );
178
179 ## BOILERPLATE ###############################################################
180 require 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
184 my $eumm_version  = eval $ExtUtils::MakeMaker::VERSION;
185 my $mymeta        = $eumm_version >= 6.57_02;
186 my $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
199 for (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;
206 }
207
208 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
209
210 delete $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;
216 delete $MM_ARGS{CONFIGURE_REQUIRES}
217   if $eumm_version < 6.51_03;
218
219 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
220 ## END BOILERPLATE ###########################################################
221
222 print <<"EOF";
223
224  Important:
225
226     This library is for running Catalyst applications.
227
228     For development and use of catalyst.pl and myapp_create.pl, make sure
229     you also install the development tools package Catalyst::Devel.
230
231         perl -MCPANPLUS -e 'install Catalyst::Devel' # or
232         perl -MCPAN -e 'install Catalyst::Devel'     # or
233         cpanm Catalyst::Devel
234
235     To get some commonly used plugins, as well as the TT view and DBIC
236     model, install Task::Catalyst in the same way.
237
238  Have fun!
239 EOF