Fix waiting for the server to start in t/author/http-server.t
[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';
9c74923d 37requires 'MooseX::MethodAttributes::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';
24b3262a 51requires 'LWP::UserAgent';
a134d05c 52requires 'Module::Pluggable' => '3.9';
1e514a51 53requires 'Path::Class' => '0.09';
24b3262a 54requires 'Scalar::Util';
64edd785 55requires 'Sub::Exporter';
1e514a51 56requires 'Text::SimpleTable' => '0.03';
24b3262a 57requires 'Time::HiRes';
1e514a51 58requires 'Tree::Simple' => '1.15';
24b3262a 59requires 'Tree::Simple::Visitor::FindByPath';
3640641e 60requires 'Try::Tiny';
4995a5ce 61requires 'Safe::Isa';
1e514a51 62requires 'URI' => '1.35';
5ad8be8c 63requires 'Task::Weaken';
ea0e58d9 64requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
6f1f968a 65requires 'MRO::Compat';
8ba29999 66requires 'MooseX::Getopt' => '0.48';
17b3d800 67requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
701e20e5 68requires 'Devel::InnerPackage'; # No longer core in blead
201e0a1f 69requires 'Plack' => '0.9991'; # IIS6+7 fix middleware
6db8aa1d 70requires 'Plack::Middleware::ReverseProxy' => '0.04';
555c9ff7 71requires 'Plack::Test::ExternalServer';
65b708a6 72
bc83a694 73# Install the standalone Regex dispatch modules in order to ease the
74# depreciation transition
75requires 'Catalyst::DispatchType::Regex' => '5.90021';
76
1a667b7c 77test_requires 'Class::Data::Inheritable';
cdc96667 78test_requires 'Test::Exception';
36c67dc1 79test_requires 'Test::More' => '0.88';
df1fa879 80test_requires 'Data::Dump';
da054c21 81test_requires 'HTTP::Request::Common';
1a667b7c 82
05b3a152 83# aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
4963dba2 84my @author_requires;
e8e8895a 85if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.364')) {
4963dba2 86 push(@author_requires, 'Test::Aggregate', '0.364');
87 push(@author_requires, 'Test::Simple', '0.88');
e8e8895a 88 open my $fh, '>', '.aggregating';
e262f38e 89}
90else {
e8e8895a 91 unlink '.aggregating';
a06394ac 92 tests 't/*.t t/aggregate/*.t';
bf6d41be 93}
a06394ac 94
4963dba2 95push(@author_requires, 'CatalystX::LeakChecker', '0.05');
96push(@author_requires, 'Catalyst::Devel', '1.0'); # For http server test
a526c982 97push(@author_requires, 'Test::TCP', '1.27'); # ditto, ships Net::EmptyPort
e262f38e 98
4963dba2 99author_tests('t/author');
100author_requires(
101 @author_requires,
102 map {; $_ => 0 } qw(
103 File::Copy::Recursive
104 Catalyst::Engine::PSGI
105 Test::Without::Module
106 Starman
107 MooseX::Daemonize
0a0c74aa 108 Test::NoTabs
109 Test::Pod
110 Test::Pod::Coverage
576de106 111 Test::Spelling
2a2c99c6 112 Pod::Coverage::TrustPod
64e88417 113));
621f279b 114
115if ($Module::Install::AUTHOR) {
c102399c 116 darwin_check_no_resource_forks();
de925c79 117}
118
697a1b1a 119resources(
120 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
121 'IRC' => 'irc://irc.perl.org/#catalyst',
122 'license', => 'http://dev.perl.org/licenses/',
123 'homepage', => 'http://dev.catalyst.perl.org/',
71dd05e8 124 # r/w: catagits@git.shadowcat.co.uk:Catalyst-Runtime.git
82e80cb1 125 'repository', => 'git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git',
697a1b1a 126);
127
24b3262a 128install_script glob('script/*.pl');
b6395bce 129auto_install;
24b3262a 130WriteAll;
614f3ad6 131
614f3ad6 132print <<"EOF";
133
134 Important:
a5b5152b 135
0187a79d 136 This library is for running Catalyst applications.
137
341d40d1 138 For development and use of catalyst.pl and myapp_create.pl, make sure
139 you also install the development tools package Catalyst::Devel.
f63c03e4 140
6bc14aef 141 perl -MCPANPLUS -e 'install Catalyst::Devel' # or
ec0939b9 142 perl -MCPAN -e 'install Catalyst::Devel' # or
143 cpanm Catalyst::Devel
6bc14aef 144
f4c1afd4 145 To get some commonly used plugins, as well as the TT view and DBIC
6bc14aef 146 model, install Task::Catalyst in the same way.
a5b5152b 147
a5b5152b 148 Have fun!
614f3ad6 149EOF
64d96919 150
d31581c6 151# NOTE - This is the version number of the _incompatible_ code,
152# not the version number of the fixed version.
153my %conflicts = (
69db240e 154 'Catalyst::Plugin::SubRequest' => '0.14',
68c660b5 155 'Catalyst::Model::Akismet' => '0.02',
33632a44 156 'Catalyst::Component::ACCEPT_CONTEXT' => '0.06',
d75b106e 157 'Catalyst::Plugin::ENV' => '9999', # This plugin is just stupid, full stop
158 # should have been a core fix.
71b46798 159 'Catalyst::Plugin::Unicode::Encoding' => '0.2',
d877f868 160 'Catalyst::Plugin::Authentication' => '0.10010', # _config accessor in ::Credential::Password
c49128b1 161 'Catalyst::Authentication::Credential::HTTP' => '1.009',
3d387aea 162 'Catalyst::Plugin::Session::Store::File' => '0.16',
163 'Catalyst::Plugin::Session' => '0.21',
164 'Catalyst::Plugin::Session::State::Cookie' => '0.10',
3db3a59f 165 'Catalyst::Plugin::Session::Store::FastMmap' => '0.09',
3d387aea 166 'Catalyst::Controller::AllowDisable' => '0.03',
167 'Reaction' => '0.001999',
168 'Catalyst::Plugin::Upload::Image::Magick' => '0.03',
169 'Catalyst::Plugin::ConfigLoader' => '0.22', # Older versions work but
d31581c6 170 # throw Data::Visitor warns
3d387aea 171 'Catalyst::Devel' => '1.19',
172 'Catalyst::Plugin::SmartURI' => '0.032',
173 'CatalystX::CRUD' => '0.37',
174 'Catalyst::Action::RenderView' => '0.07',
175 'Catalyst::Plugin::DebugCookie' => '0.999002',
176 'Catalyst::Plugin::Authentication' => '0.100091',
177 'CatalystX::Imports' => '0.03',
178 'Catalyst::Plugin::HashedCookies' => '1.03',
179 'Catalyst::Action::REST' => '0.67',
180 'CatalystX::CRUD' => '0.42',
181 'CatalystX::CRUD::Model::RDBO' => '0.20',
182 'Catalyst::View::Mason' => '0.17',
183# Note these are not actually needed - they fail tests against the
184# new version, but still work fine..
185# 'Catalyst::ActionRole::ACL' => '0.05',
186# 'Catalyst::Plugin::Session::Store::DBIC' => '0.11',
b9f72120 187 'Test::WWW::Mechanize::Catalyst' => '0.53', # Dep warnings unless upgraded.
d31581c6 188);
189check_conflicts(%conflicts);
190
c102399c 191# End of script, helper functions below.
192
193sub darwin_check_no_resource_forks {
194 if ($^O eq 'darwin') {
195 my $osx_ver = `/usr/bin/sw_vers -productVersion`;
196 chomp $osx_ver;
197
198 # TAR on 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE
199 # On 10.5 (Leopard) it wants COPYFILE_DISABLE
2c28a126 200 my $attr = $osx_ver =~ /^10.(5|6|7|8)/ ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
c102399c 201
202 makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
2373117d 203 qq{ echo "You must set the ENV variable $attr to 'true',"; }.
c102399c 204 ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
64d96919 205 }
64d96919 206}