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