spelling
[catagits/Catalyst-Runtime.git] / Makefile.PL
1 use strict;
2 use warnings;
3 use inc::Module::Install 0.91;
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.
7 if ($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 }
21
22 perl_version '5.008003';
23
24 name 'Catalyst-Runtime';
25 author 'Sebastian Riedel <sri@cpan.org>';
26 authority('cpan:MSTROUT');
27 all_from 'lib/Catalyst/Runtime.pm';
28
29 requires 'List::MoreUtils';
30 requires 'namespace::autoclean' => '0.09';
31 requires 'namespace::clean' => '0.23';
32 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
33 requires 'Class::Load' => '0.12';
34 requires 'Class::MOP' => '0.95';
35 requires 'Data::OptList';
36 requires 'Moose' => '1.03';
37 requires 'MooseX::MethodAttributes::Role::AttrContainer::Inheritable' => '0.24';
38 requires 'MooseX::Role::WithOverloading' => '0.09';
39 requires 'Carp';
40 requires 'Class::C3::Adopt::NEXT' => '0.07';
41 requires 'CGI::Simple::Cookie' => '1.109';
42 requires 'Data::Dump';
43 requires 'Data::OptList';
44 requires 'HTML::Entities';
45 requires 'HTML::HeadParser';
46 requires 'HTTP::Body'    => '1.06'; # ->cleanup(1)
47 requires 'HTTP::Headers' => '1.64';
48 requires 'HTTP::Request' => '5.814';
49 requires 'HTTP::Response' => '5.813';
50 requires 'HTTP::Request::AsCGI' => '1.0';
51 requires 'Module::Pluggable' => '3.9';
52 requires 'Path::Class' => '0.09';
53 requires 'Scalar::Util';
54 requires 'Sub::Exporter';
55 requires 'Text::SimpleTable' => '0.03';
56 requires 'Time::HiRes';
57 requires 'Tree::Simple' => '1.15';
58 requires 'Tree::Simple::Visitor::FindByPath';
59 requires 'Try::Tiny' => '0.17';
60 requires 'Safe::Isa';
61 requires 'Task::Weaken';
62 requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
63 requires 'MRO::Compat';
64 requires 'MooseX::Getopt' => '0.48';
65 requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
66 requires 'Devel::InnerPackage'; # No longer core in blead
67 requires 'Plack' => '0.9991'; # IIS6+7 fix middleware
68 requires 'Plack::Middleware::ReverseProxy' => '0.04';
69 requires 'Plack::Test::ExternalServer';
70 requires 'Class::Data::Inheritable';
71 requires 'Encode' => '2.49';
72 requires 'LWP' => '5.837'; # LWP had unicode fail in 5.8.26
73 requires 'URI' => '1.36';
74
75 # Install the standalone Regex dispatch modules in order to ease the
76 # deprecation transition
77 requires 'Catalyst::DispatchType::Regex' => '5.90021';
78
79 test_requires 'Test::Fatal';
80 test_requires 'Test::More' => '0.88';
81 test_requires 'Data::Dump';
82 test_requires 'HTTP::Request::Common';
83 test_requires 'IO::Scalar';
84 test_requires 'HTTP::Status';
85
86 # see also cpanfile for authordeps -- install via
87 # cpanm --installdeps --with-develop .
88
89 # aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
90 my @author_requires;
91 if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.364')) {
92     push(@author_requires, 'Test::Aggregate', '0.364');
93     push(@author_requires, 'Test::Simple', '0.88');
94     open my $fh, '>', '.aggregating';
95 }
96 else {
97     unlink '.aggregating';
98     tests 't/*.t t/aggregate/*.t';
99 }
100
101 push(@author_requires, 'CatalystX::LeakChecker', '0.05');
102 push(@author_requires, 'Catalyst::Devel', '1.0'); # For http server test
103 push(@author_requires, 'Test::WWW::Mechanize::Catalyst', '0.51');
104 push(@author_requires, 'Test::TCP', '2.00'); # ditto, ships Net::EmptyPort
105
106 author_tests('t/author');
107 author_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
115   Test::NoTabs
116   Test::Pod
117   Test::Pod::Coverage
118   Test::Spelling
119   Pod::Coverage::TrustPod
120   Catalyst::Plugin::Params::Nested
121   Catalyst::Plugin::ConfigLoader
122 ));
123
124 if ($Module::Install::AUTHOR) {
125     darwin_check_no_resource_forks();
126 }
127
128 resources(
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/',
133     # r/w: catagits@git.shadowcat.co.uk:Catalyst-Runtime.git
134     'repository', => 'git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git',
135 );
136
137 install_script glob('script/*.pl');
138 auto_install;
139 WriteAll;
140
141 print <<"EOF";
142
143  Important:
144
145     This library is for running Catalyst applications.
146
147     For development and use of catalyst.pl and myapp_create.pl, make sure
148     you also install the development tools package Catalyst::Devel.
149
150         perl -MCPANPLUS -e 'install Catalyst::Devel' # or
151         perl -MCPAN -e 'install Catalyst::Devel'     # or
152         cpanm Catalyst::Devel
153
154     To get some commonly used plugins, as well as the TT view and DBIC
155     model, install Task::Catalyst in the same way.
156
157  Have fun!
158 EOF
159
160 # NOTE - This is the version number of the _incompatible_ code,
161 #        not the version number of the fixed version.
162 my %conflicts = (
163     'Catalyst::Plugin::SubRequest' => '0.14',
164     'Catalyst::Model::Akismet' => '0.02',
165     'Catalyst::Component::ACCEPT_CONTEXT' => '0.06',
166     'Catalyst::Plugin::ENV' => '9999', # This plugin is just stupid, full stop
167                                        # should have been a core fix.
168     'Catalyst::Plugin::Unicode::Encoding' => '0.2',
169     'Catalyst::Plugin::Authentication' => '0.10010', # _config accessor in ::Credential::Password
170     'Catalyst::Authentication::Credential::HTTP' => '1.009',
171     'Catalyst::Plugin::Session::Store::File'     => '0.16',
172     'Catalyst::Plugin::Session'                  => '0.21',
173     'Catalyst::Plugin::Session::State::Cookie'   => '0.10',
174     'Catalyst::Plugin::Session::Store::FastMmap' => '0.09',
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
179                                                   # throw Data::Visitor warns
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',
196       'Test::WWW::Mechanize::Catalyst'            => '0.53', # Dep warnings unless upgraded.
197 );
198 check_conflicts(%conflicts);
199
200 # End of script, helper functions below.
201
202 sub 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
209         my $attr = $osx_ver =~ /^10.(5|6|7|8)/  ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
210
211         makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
212                                           qq{ echo "You must set the ENV variable $attr to 'true',"; }.
213                                           ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
214     }
215 }