Test uri_for with path = 0
[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
05585938 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';
6640e166 34requires 'Data::OptList';
135e449a 35requires 'Moose' => '1.03';
a0c37f08 36requires 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable' => '0.24';
718e6314 37requires 'MooseX::Role::WithOverloading' => '0.09';
b3d3a175 38requires 'Carp' => '1.25';
269408a4 39requires 'Class::C3::Adopt::NEXT' => '0.07';
0319ec68 40requires 'CGI::Simple::Cookie' => '1.109';
f63c03e4 41requires 'Data::Dump';
62b6b631 42requires 'Data::OptList';
24b3262a 43requires 'HTML::Entities';
9c74923d 44requires 'HTML::HeadParser';
0d94e986 45requires 'HTTP::Body' => '1.22';
1e514a51 46requires 'HTTP::Headers' => '1.64';
582cd214 47requires 'HTTP::Request' => '5.814';
48requires 'HTTP::Response' => '5.813';
6cc3be54 49requires 'HTTP::Request::AsCGI' => '1.0';
e0931ee6 50requires 'Module::Pluggable' => '4.7';
1e514a51 51requires 'Path::Class' => '0.09';
24b3262a 52requires 'Scalar::Util';
64edd785 53requires 'Sub::Exporter';
1e514a51 54requires 'Text::SimpleTable' => '0.03';
24b3262a 55requires 'Time::HiRes';
1e514a51 56requires 'Tree::Simple' => '1.15';
24b3262a 57requires 'Tree::Simple::Visitor::FindByPath';
5a4ce75e 58requires 'Try::Tiny' => '0.17';
4995a5ce 59requires 'Safe::Isa';
5ad8be8c 60requires 'Task::Weaken';
ea0e58d9 61requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
6f1f968a 62requires 'MRO::Compat';
8ba29999 63requires 'MooseX::Getopt' => '0.48';
17b3d800 64requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
701e20e5 65requires 'Devel::InnerPackage'; # No longer core in blead
201e0a1f 66requires 'Plack' => '0.9991'; # IIS6+7 fix middleware
6db8aa1d 67requires 'Plack::Middleware::ReverseProxy' => '0.04';
555c9ff7 68requires 'Plack::Test::ExternalServer';
e3520cbf 69requires 'Class::Data::Inheritable';
70requires 'Encode' => '2.49';
71requires 'LWP' => '5.837'; # LWP had unicode fail in 5.8.26
cafe4c96 72requires 'URI' => '1.65';
bd4b086b 73requires 'URI::ws' => '0.03';
191665f3 74requires 'JSON::MaybeXS' => '1.000000';
75requires 'Stream::Buffered';
76requires 'Hash::MultiValue';
77requires 'Plack::Request::Upload';
2d802c4a 78requires 'CGI::Struct';
ecf903d0 79requires "Plack::Middleware::Conditional";
80requires "Plack::Middleware::IIS6ScriptNameFix";
81requires "Plack::Middleware::IIS7KeepAliveFix";
82requires "Plack::Middleware::LighttpdScriptNameFix";
83requires "Plack::Middleware::ContentLength";
84requires "Plack::Middleware::Head";
85requires "Plack::Middleware::HTTPExceptions";
132f8430 86requires "Plack::Middleware::FixMissingBodyInRedirect" => '0.09';
05585938 87requires "Plack::Middleware::MethodOverride" => '0.12';
bab53c3e 88requires "Plack::Middleware::RemoveRedundantBody" => '0.03';
65b708a6 89
2a56ace9 90test_requires 'Test::Fatal';
36c67dc1 91test_requires 'Test::More' => '0.88';
df1fa879 92test_requires 'Data::Dump';
da054c21 93test_requires 'HTTP::Request::Common';
e3520cbf 94test_requires 'IO::Scalar';
95test_requires 'HTTP::Status';
e2aa4a21 96test_requires 'JSON::MaybeXS';
1a667b7c 97
11d52bbd 98# see also cpanfile for authordeps -- install via
99# cpanm --installdeps --with-develop .
100
05b3a152 101# aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
4963dba2 102my @author_requires;
e8e8895a 103if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.364')) {
4963dba2 104 push(@author_requires, 'Test::Aggregate', '0.364');
105 push(@author_requires, 'Test::Simple', '0.88');
e8e8895a 106 open my $fh, '>', '.aggregating';
e262f38e 107}
108else {
e8e8895a 109 unlink '.aggregating';
a06394ac 110 tests 't/*.t t/aggregate/*.t';
bf6d41be 111}
a06394ac 112
4963dba2 113push(@author_requires, 'CatalystX::LeakChecker', '0.05');
114push(@author_requires, 'Catalyst::Devel', '1.0'); # For http server test
e3520cbf 115push(@author_requires, 'Test::WWW::Mechanize::Catalyst', '0.51');
310e2c0b 116push(@author_requires, 'Test::TCP', '2.00'); # ditto, ships Net::EmptyPort
e262f38e 117
4963dba2 118author_tests('t/author');
119author_requires(
120 @author_requires,
121 map {; $_ => 0 } qw(
122 File::Copy::Recursive
4963dba2 123 Test::Without::Module
124 Starman
125 MooseX::Daemonize
0a0c74aa 126 Test::NoTabs
127 Test::Pod
128 Test::Pod::Coverage
576de106 129 Test::Spelling
2a2c99c6 130 Pod::Coverage::TrustPod
e3520cbf 131 Catalyst::Plugin::Params::Nested
465e85c1 132 Catalyst::Plugin::ConfigLoader
64e88417 133));
621f279b 134
135if ($Module::Install::AUTHOR) {
c102399c 136 darwin_check_no_resource_forks();
de925c79 137}
138
697a1b1a 139resources(
140 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
141 'IRC' => 'irc://irc.perl.org/#catalyst',
142 'license', => 'http://dev.perl.org/licenses/',
143 'homepage', => 'http://dev.catalyst.perl.org/',
71dd05e8 144 # r/w: catagits@git.shadowcat.co.uk:Catalyst-Runtime.git
82e80cb1 145 'repository', => 'git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git',
697a1b1a 146);
147
24b3262a 148install_script glob('script/*.pl');
b6395bce 149auto_install;
24b3262a 150WriteAll;
614f3ad6 151
614f3ad6 152print <<"EOF";
153
154 Important:
a5b5152b 155
0187a79d 156 This library is for running Catalyst applications.
157
341d40d1 158 For development and use of catalyst.pl and myapp_create.pl, make sure
159 you also install the development tools package Catalyst::Devel.
f63c03e4 160
6bc14aef 161 perl -MCPANPLUS -e 'install Catalyst::Devel' # or
ec0939b9 162 perl -MCPAN -e 'install Catalyst::Devel' # or
163 cpanm Catalyst::Devel
6bc14aef 164
f4c1afd4 165 To get some commonly used plugins, as well as the TT view and DBIC
6bc14aef 166 model, install Task::Catalyst in the same way.
a5b5152b 167
a5b5152b 168 Have fun!
614f3ad6 169EOF
64d96919 170
d31581c6 171# NOTE - This is the version number of the _incompatible_ code,
172# not the version number of the fixed version.
173my %conflicts = (
69db240e 174 'Catalyst::Plugin::SubRequest' => '0.14',
68c660b5 175 'Catalyst::Model::Akismet' => '0.02',
33632a44 176 'Catalyst::Component::ACCEPT_CONTEXT' => '0.06',
d75b106e 177 'Catalyst::Plugin::ENV' => '9999', # This plugin is just stupid, full stop
178 # should have been a core fix.
71b46798 179 'Catalyst::Plugin::Unicode::Encoding' => '0.2',
d877f868 180 'Catalyst::Plugin::Authentication' => '0.10010', # _config accessor in ::Credential::Password
c49128b1 181 'Catalyst::Authentication::Credential::HTTP' => '1.009',
3d387aea 182 'Catalyst::Plugin::Session::Store::File' => '0.16',
183 'Catalyst::Plugin::Session' => '0.21',
184 'Catalyst::Plugin::Session::State::Cookie' => '0.10',
3db3a59f 185 'Catalyst::Plugin::Session::Store::FastMmap' => '0.09',
3d387aea 186 'Catalyst::Controller::AllowDisable' => '0.03',
187 'Reaction' => '0.001999',
188 'Catalyst::Plugin::Upload::Image::Magick' => '0.03',
189 'Catalyst::Plugin::ConfigLoader' => '0.22', # Older versions work but
d31581c6 190 # throw Data::Visitor warns
3d387aea 191 'Catalyst::Devel' => '1.19',
192 'Catalyst::Plugin::SmartURI' => '0.032',
193 'CatalystX::CRUD' => '0.37',
194 'Catalyst::Action::RenderView' => '0.07',
195 'Catalyst::Plugin::DebugCookie' => '0.999002',
196 'Catalyst::Plugin::Authentication' => '0.100091',
197 'CatalystX::Imports' => '0.03',
198 'Catalyst::Plugin::HashedCookies' => '1.03',
199 'Catalyst::Action::REST' => '0.67',
200 'CatalystX::CRUD' => '0.42',
201 'CatalystX::CRUD::Model::RDBO' => '0.20',
202 'Catalyst::View::Mason' => '0.17',
203# Note these are not actually needed - they fail tests against the
204# new version, but still work fine..
205# 'Catalyst::ActionRole::ACL' => '0.05',
206# 'Catalyst::Plugin::Session::Store::DBIC' => '0.11',
b9f72120 207 'Test::WWW::Mechanize::Catalyst' => '0.53', # Dep warnings unless upgraded.
d31581c6 208);
209check_conflicts(%conflicts);
210
c102399c 211# End of script, helper functions below.
212
213sub darwin_check_no_resource_forks {
214 if ($^O eq 'darwin') {
215 my $osx_ver = `/usr/bin/sw_vers -productVersion`;
216 chomp $osx_ver;
217
218 # TAR on 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE
219 # On 10.5 (Leopard) it wants COPYFILE_DISABLE
2c28a126 220 my $attr = $osx_ver =~ /^10.(5|6|7|8)/ ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
c102399c 221
222 makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
2373117d 223 qq{ echo "You must set the ENV variable $attr to 'true',"; }.
c102399c 224 ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
64d96919 225 }
64d96919 226}