depend on workaround for issue during global destruction in t/live_fork.t (see also...
[catagits/Catalyst-Runtime.git] / Makefile.PL
CommitLineData
9a2055d7 1use strict;
2use warnings;
bf32c83f 3use inc::Module::Install 0.91;
abc0ac29 4# Ensure that these get used - yes, M::I loads them for us, but if you're
5# in author mode and don't have them installed, then the error is tres
6# cryptic.
4963dba2 7if ($Module::Install::AUTHOR) { # We could just use them, but telling
8 my @fail; # people the set of things they need nicer
9 foreach my $module (qw/
10 Module::Install::AuthorRequires
11 Module::Install::CheckConflicts
12 Module::Install::AuthorTests
13 Module::Install::Authority
14 /) {
15 push(@fail, $module)
16 unless eval qq{require $module; 1;};
17 }
18 die("Module::Install extensions failed, not installed? \n"
19 . join("\n", map { " $_" } @fail) . "\n") if @fail;
20}
212ba4ee 21
0f6be50c 22perl_version '5.008003';
0ba80bce 23
341d40d1 24name 'Catalyst-Runtime';
57746b80 25author 'Sebastian Riedel <sri@cpan.org>';
fa33a3ea 26authority('cpan:MSTROUT');
341d40d1 27all_from 'lib/Catalyst/Runtime.pm';
24b3262a 28
196f06d1 29requires 'List::MoreUtils';
29d32d06 30requires 'namespace::autoclean' => '0.09';
be21bc19 31requires 'namespace::clean' => '0.23';
29d32d06 32requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
f53c5c12 33requires 'Class::Load' => '0.12';
6e0bebdc 34requires 'Class::MOP' => '0.95';
6640e166 35requires 'Data::OptList';
135e449a 36requires 'Moose' => '1.03';
a0c37f08 37requires 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable' => '0.24';
718e6314 38requires 'MooseX::Role::WithOverloading' => '0.09';
9ce44430 39requires 'Carp';
269408a4 40requires 'Class::C3::Adopt::NEXT' => '0.07';
0319ec68 41requires 'CGI::Simple::Cookie' => '1.109';
f63c03e4 42requires 'Data::Dump';
62b6b631 43requires 'Data::OptList';
24b3262a 44requires 'HTML::Entities';
9c74923d 45requires 'HTML::HeadParser';
671123ba 46requires 'HTTP::Body' => '1.06'; # ->cleanup(1)
1e514a51 47requires 'HTTP::Headers' => '1.64';
582cd214 48requires 'HTTP::Request' => '5.814';
49requires 'HTTP::Response' => '5.813';
6cc3be54 50requires 'HTTP::Request::AsCGI' => '1.0';
a134d05c 51requires 'Module::Pluggable' => '3.9';
1e514a51 52requires 'Path::Class' => '0.09';
24b3262a 53requires 'Scalar::Util';
64edd785 54requires 'Sub::Exporter';
1e514a51 55requires 'Text::SimpleTable' => '0.03';
24b3262a 56requires 'Time::HiRes';
1e514a51 57requires 'Tree::Simple' => '1.15';
24b3262a 58requires 'Tree::Simple::Visitor::FindByPath';
5a4ce75e 59requires 'Try::Tiny' => '0.17';
4995a5ce 60requires 'Safe::Isa';
5ad8be8c 61requires 'Task::Weaken';
ea0e58d9 62requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
6f1f968a 63requires 'MRO::Compat';
8ba29999 64requires 'MooseX::Getopt' => '0.48';
17b3d800 65requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
701e20e5 66requires 'Devel::InnerPackage'; # No longer core in blead
201e0a1f 67requires 'Plack' => '0.9991'; # IIS6+7 fix middleware
6db8aa1d 68requires 'Plack::Middleware::ReverseProxy' => '0.04';
555c9ff7 69requires 'Plack::Test::ExternalServer';
e3520cbf 70requires 'Class::Data::Inheritable';
71requires 'Encode' => '2.49';
72requires 'LWP' => '5.837'; # LWP had unicode fail in 5.8.26
73requires 'URI' => '1.36';
65b708a6 74
bc83a694 75# Install the standalone Regex dispatch modules in order to ease the
76# depreciation transition
77requires 'Catalyst::DispatchType::Regex' => '5.90021';
78
cdc96667 79test_requires 'Test::Exception';
36c67dc1 80test_requires 'Test::More' => '0.88';
df1fa879 81test_requires 'Data::Dump';
da054c21 82test_requires 'HTTP::Request::Common';
e3520cbf 83test_requires 'IO::Scalar';
84test_requires 'HTTP::Status';
1a667b7c 85
11d52bbd 86# see also cpanfile for authordeps -- install via
87# cpanm --installdeps --with-develop .
88
05b3a152 89# aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
4963dba2 90my @author_requires;
e8e8895a 91if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.364')) {
4963dba2 92 push(@author_requires, 'Test::Aggregate', '0.364');
93 push(@author_requires, 'Test::Simple', '0.88');
e8e8895a 94 open my $fh, '>', '.aggregating';
e262f38e 95}
96else {
e8e8895a 97 unlink '.aggregating';
a06394ac 98 tests 't/*.t t/aggregate/*.t';
bf6d41be 99}
a06394ac 100
4963dba2 101push(@author_requires, 'CatalystX::LeakChecker', '0.05');
102push(@author_requires, 'Catalyst::Devel', '1.0'); # For http server test
e3520cbf 103push(@author_requires, 'Test::WWW::Mechanize::Catalyst', '0.51');
5ac4489b 104push(@author_requires, 'Test::TCP', '2.00'); # ditto, ships Net::EmptyPort
e262f38e 105
4963dba2 106author_tests('t/author');
107author_requires(
108 @author_requires,
109 map {; $_ => 0 } qw(
110 File::Copy::Recursive
111 Catalyst::Engine::PSGI
112 Test::Without::Module
113 Starman
114 MooseX::Daemonize
0a0c74aa 115 Test::NoTabs
116 Test::Pod
117 Test::Pod::Coverage
576de106 118 Test::Spelling
2a2c99c6 119 Pod::Coverage::TrustPod
e3520cbf 120 Catalyst::Plugin::Params::Nested
465e85c1 121 Catalyst::Plugin::ConfigLoader
64e88417 122));
621f279b 123
124if ($Module::Install::AUTHOR) {
c102399c 125 darwin_check_no_resource_forks();
de925c79 126}
127
697a1b1a 128resources(
129 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
130 'IRC' => 'irc://irc.perl.org/#catalyst',
131 'license', => 'http://dev.perl.org/licenses/',
132 'homepage', => 'http://dev.catalyst.perl.org/',
71dd05e8 133 # r/w: catagits@git.shadowcat.co.uk:Catalyst-Runtime.git
82e80cb1 134 'repository', => 'git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git',
697a1b1a 135);
136
24b3262a 137install_script glob('script/*.pl');
b6395bce 138auto_install;
24b3262a 139WriteAll;
614f3ad6 140
614f3ad6 141print <<"EOF";
142
143 Important:
a5b5152b 144
0187a79d 145 This library is for running Catalyst applications.
146
341d40d1 147 For development and use of catalyst.pl and myapp_create.pl, make sure
148 you also install the development tools package Catalyst::Devel.
f63c03e4 149
6bc14aef 150 perl -MCPANPLUS -e 'install Catalyst::Devel' # or
ec0939b9 151 perl -MCPAN -e 'install Catalyst::Devel' # or
152 cpanm Catalyst::Devel
6bc14aef 153
f4c1afd4 154 To get some commonly used plugins, as well as the TT view and DBIC
6bc14aef 155 model, install Task::Catalyst in the same way.
a5b5152b 156
a5b5152b 157 Have fun!
614f3ad6 158EOF
64d96919 159
d31581c6 160# NOTE - This is the version number of the _incompatible_ code,
161# not the version number of the fixed version.
162my %conflicts = (
69db240e 163 'Catalyst::Plugin::SubRequest' => '0.14',
68c660b5 164 'Catalyst::Model::Akismet' => '0.02',
33632a44 165 'Catalyst::Component::ACCEPT_CONTEXT' => '0.06',
d75b106e 166 'Catalyst::Plugin::ENV' => '9999', # This plugin is just stupid, full stop
167 # should have been a core fix.
71b46798 168 'Catalyst::Plugin::Unicode::Encoding' => '0.2',
d877f868 169 'Catalyst::Plugin::Authentication' => '0.10010', # _config accessor in ::Credential::Password
c49128b1 170 'Catalyst::Authentication::Credential::HTTP' => '1.009',
3d387aea 171 'Catalyst::Plugin::Session::Store::File' => '0.16',
172 'Catalyst::Plugin::Session' => '0.21',
173 'Catalyst::Plugin::Session::State::Cookie' => '0.10',
3db3a59f 174 'Catalyst::Plugin::Session::Store::FastMmap' => '0.09',
3d387aea 175 'Catalyst::Controller::AllowDisable' => '0.03',
176 'Reaction' => '0.001999',
177 'Catalyst::Plugin::Upload::Image::Magick' => '0.03',
178 'Catalyst::Plugin::ConfigLoader' => '0.22', # Older versions work but
d31581c6 179 # throw Data::Visitor warns
3d387aea 180 'Catalyst::Devel' => '1.19',
181 'Catalyst::Plugin::SmartURI' => '0.032',
182 'CatalystX::CRUD' => '0.37',
183 'Catalyst::Action::RenderView' => '0.07',
184 'Catalyst::Plugin::DebugCookie' => '0.999002',
185 'Catalyst::Plugin::Authentication' => '0.100091',
186 'CatalystX::Imports' => '0.03',
187 'Catalyst::Plugin::HashedCookies' => '1.03',
188 'Catalyst::Action::REST' => '0.67',
189 'CatalystX::CRUD' => '0.42',
190 'CatalystX::CRUD::Model::RDBO' => '0.20',
191 'Catalyst::View::Mason' => '0.17',
192# Note these are not actually needed - they fail tests against the
193# new version, but still work fine..
194# 'Catalyst::ActionRole::ACL' => '0.05',
195# 'Catalyst::Plugin::Session::Store::DBIC' => '0.11',
b9f72120 196 'Test::WWW::Mechanize::Catalyst' => '0.53', # Dep warnings unless upgraded.
d31581c6 197);
198check_conflicts(%conflicts);
199
c102399c 200# End of script, helper functions below.
201
202sub darwin_check_no_resource_forks {
203 if ($^O eq 'darwin') {
204 my $osx_ver = `/usr/bin/sw_vers -productVersion`;
205 chomp $osx_ver;
206
207 # TAR on 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE
208 # On 10.5 (Leopard) it wants COPYFILE_DISABLE
2c28a126 209 my $attr = $osx_ver =~ /^10.(5|6|7|8)/ ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
c102399c 210
211 makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
2373117d 212 qq{ echo "You must set the ENV variable $attr to 'true',"; }.
c102399c 213 ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
64d96919 214 }
64d96919 215}