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