Commit | Line | Data |
9a2055d7 |
1 | use strict; |
2 | use warnings; |
807303a1 |
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, |
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 => { |
807303a1 |
87 | 'CatalystX::LeakChecker' => '0.05', |
88 | 'Catalyst::Devel' => '1.0', # For http server test |
807303a1 |
89 | 'Test::WWW::Mechanize::Catalyst' => '0.51', |
90 | 'Test::TCP' => '2.00', # ditto, ships Net::EmptyPort |
c2eac008 |
91 | 'File::Copy::Recursive' => '0.40', |
807303a1 |
92 | 'Starman' => 0, |
93 | 'MooseX::Daemonize' => 0, |
94 | 'Test::NoTabs' => 0, |
95 | 'Test::Pod' => 0, |
96 | 'Test::Pod::Coverage' => 0, |
97 | 'Test::Spelling' => 0, |
98 | 'Pod::Coverage::TrustPod' => 0, |
99 | 'Catalyst::Plugin::Params::Nested' => 0, |
100 | 'Catalyst::Plugin::ConfigLoader' => 0, |
919758f4 |
101 | 'Compress::Zlib' => 0, |
102 | 'Catalyst::Action::REST' => 0, |
103 | 'Type::Tiny' => 0, |
104 | 'Proc::ProcessTable' => 0, |
807303a1 |
105 | }, |
106 | }, |
107 | }, |
108 | resources => { |
109 | repository => { |
110 | # r/w: catagits@git.shadowcat.co.uk:Catalyst-Runtime.git |
111 | url => 'git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git', |
112 | web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits/Catalyst-Runtime.git;a=summary', |
113 | type => 'git', |
114 | }, |
115 | x_IRC => 'irc://irc.perl.org/#catalyst', |
116 | bugtracker => { |
117 | web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Catalyst-Runtime', |
118 | mailto => 'bug-Catalyst-Runtime@rt.cpan.org', |
119 | }, |
120 | license => [ 'http://dev.perl.org/licenses/' ], |
121 | x_MailingList => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst', |
122 | homepage => 'http://dev.catalyst.perl.org/', |
123 | }, |
124 | no_index => { |
125 | directory => [ 't', 'xt' ] |
126 | }, |
127 | x_breaks => { |
128 | 'Catalyst::Plugin::SubRequest' => '<= 0.14', |
129 | 'Catalyst::Model::Akismet' => '<= 0.02', |
130 | 'Catalyst::Component::ACCEPT_CONTEXT' => '<= 0.06', |
131 | 'Catalyst::Plugin::ENV' => 0, # This plugin is just stupid, full stop |
132 | # should have been a core fix. |
133 | 'Catalyst::Plugin::Unicode::Encoding' => '<= 0.2', |
134 | 'Catalyst::Plugin::Authentication' => '<= 0.10010', # _config accessor in ::Credential::Password |
135 | 'Catalyst::Authentication::Credential::HTTP' => '<= 1.009', |
136 | 'Catalyst::Plugin::Session::Store::File' => '<= 0.16', |
137 | 'Catalyst::Plugin::Session' => '<= 0.21', |
138 | 'Catalyst::Plugin::Session::State::Cookie' => '<= 0.10', |
139 | 'Catalyst::Plugin::Session::Store::FastMmap' => '<= 0.09', |
140 | 'Catalyst::Controller::AllowDisable' => '<= 0.03', |
141 | 'Reaction' => '<= 0.001999', |
142 | 'Catalyst::Plugin::Upload::Image::Magick' => '<= 0.03', |
143 | 'Catalyst::Plugin::ConfigLoader' => '<= 0.22', # Older versions work but |
144 | # throw Data::Visitor warns |
145 | 'Catalyst::Devel' => '<= 1.19', |
146 | 'Catalyst::Plugin::SmartURI' => '<= 0.032', |
147 | 'CatalystX::CRUD' => '<= 0.37', |
148 | 'Catalyst::Action::RenderView' => '<= 0.07', |
149 | 'Catalyst::Plugin::DebugCookie' => '<= 0.999002', |
150 | 'Catalyst::Plugin::Authentication' => '<= 0.100091', |
151 | 'CatalystX::Imports' => '<= 0.03', |
152 | 'Catalyst::Plugin::HashedCookies' => '<= 1.03', |
153 | 'Catalyst::Action::REST' => '<= 0.67', |
154 | 'CatalystX::CRUD' => '<= 0.42', |
155 | 'CatalystX::CRUD::Model::RDBO' => '<= 0.20', |
156 | 'Catalyst::View::Mason' => '<= 0.17', |
157 | # Note these are not actually needed - they fail tests against the |
158 | # new version, but still work fine.. |
159 | # 'Catalyst::ActionRole::ACL' => '<= 0.05', |
160 | # 'Catalyst::Plugin::Session::Store::DBIC' => '<= 0.11', |
161 | 'Test::WWW::Mechanize::Catalyst' => '<= 0.53', # Dep warnings unless upgraded. |
162 | }, |
163 | x_authority => 'cpan:MSTROUT', |
164 | ); |
212ba4ee |
165 | |
c2eac008 |
166 | my $tests = 't/*.t t/aggregate/*.t'; |
a06394ac |
167 | |
807303a1 |
168 | my %MM_ARGS = ( |
169 | test => { TESTS => $tests }, |
170 | EXE_FILES => [ glob 'script/*.pl' ], |
171 | PREREQ_PM => { |
172 | (eval { require Moose; Moose->VERSION('2.1300') } ? () : ( |
173 | 'MooseX::Role::WithOverloading' => '0.09' |
174 | )), |
175 | }, |
176 | ); |
a06394ac |
177 | |
807303a1 |
178 | ## BOILERPLATE ############################################################### |
179 | require ExtUtils::MakeMaker; |
180 | (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
181 | |
182 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
183 | my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; |
184 | my $mymeta = $eumm_version >= 6.57_02; |
185 | my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; |
186 | |
187 | ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; |
188 | ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; |
189 | $META{license} = [ $META{license} ] |
190 | if $META{license} && !ref $META{license}; |
191 | $MM_ARGS{LICENSE} = $META{license}[0] |
192 | if $META{license} && $eumm_version >= 6.30; |
193 | $MM_ARGS{NO_MYMETA} = 1 |
194 | if $mymeta_broken; |
195 | $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } |
196 | unless -f 'META.yml'; |
197 | |
198 | for (qw(configure build test runtime)) { |
199 | my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; |
200 | my $r = $MM_ARGS{$key} = { |
201 | %{$META{prereqs}{$_}{requires} || {}}, |
202 | %{delete $MM_ARGS{$key} || {}}, |
203 | }; |
204 | defined $r->{$_} or delete $r->{$_} for keys %$r; |
de925c79 |
205 | } |
206 | |
807303a1 |
207 | $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; |
697a1b1a |
208 | |
807303a1 |
209 | delete $MM_ARGS{MIN_PERL_VERSION} |
210 | if $eumm_version < 6.47_01; |
211 | $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} |
212 | if $eumm_version < 6.63_03; |
213 | $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} |
214 | if $eumm_version < 6.55_01; |
215 | delete $MM_ARGS{CONFIGURE_REQUIRES} |
216 | if $eumm_version < 6.51_03; |
697a1b1a |
217 | |
807303a1 |
218 | ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); |
219 | ## END BOILERPLATE ########################################################### |
614f3ad6 |
220 | |
614f3ad6 |
221 | print <<"EOF"; |
222 | |
223 | Important: |
a5b5152b |
224 | |
0187a79d |
225 | This library is for running Catalyst applications. |
226 | |
341d40d1 |
227 | For development and use of catalyst.pl and myapp_create.pl, make sure |
228 | you also install the development tools package Catalyst::Devel. |
f63c03e4 |
229 | |
ec0939b9 |
230 | perl -MCPAN -e 'install Catalyst::Devel' # or |
231 | cpanm Catalyst::Devel |
6bc14aef |
232 | |
f4c1afd4 |
233 | To get some commonly used plugins, as well as the TT view and DBIC |
6bc14aef |
234 | model, install Task::Catalyst in the same way. |
a5b5152b |
235 | |
a5b5152b |
236 | Have fun! |
614f3ad6 |
237 | EOF |