Done
[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 use Module::Install::AuthorRequires;
8 use Module::Install::CheckConflicts;
9 use Module::Install::AuthorTests;
10
11 perl_version '5.008004';
12
13 name 'Catalyst-Runtime';
14 all_from 'lib/Catalyst/Runtime.pm';
15
16 requires 'List::MoreUtils';
17 requires 'namespace::autoclean' => '0.09';
18 requires 'namespace::clean' => '0.13';
19 requires 'B::Hooks::EndOfScope' => '0.08';
20 requires 'MooseX::Emulate::Class::Accessor::Fast' => '0.00903';
21 requires 'Class::MOP' => '0.95';
22 requires 'Data::OptList';
23 requires 'Moose' => '1.03';
24 requires 'MooseX::MethodAttributes::Inheritable' => '0.24';
25 requires 'MooseX::Role::WithOverloading' => '0.09';
26 requires 'MooseX::Types::LoadableClass' => '0.003';
27 requires 'Carp';
28 requires 'Class::C3::Adopt::NEXT' => '0.07';
29 requires 'CGI::Simple::Cookie' => '1.109';
30 requires 'Data::Dump';
31 requires 'Data::OptList';
32 requires 'HTML::Entities';
33 requires 'HTML::HeadParser';
34 requires 'HTTP::Body'    => '1.06'; # ->cleanup(1)
35 requires 'HTTP::Headers' => '1.64';
36 requires 'HTTP::Request' => '5.814';
37 requires 'HTTP::Response' => '5.813';
38 requires 'HTTP::Request::AsCGI' => '1.0';
39 requires 'LWP::UserAgent';
40 requires 'Module::Pluggable' => '3.9';
41 requires 'Path::Class' => '0.09';
42 requires 'Scalar::Util';
43 requires 'Sub::Exporter';
44 requires 'Text::SimpleTable' => '0.03';
45 requires 'Time::HiRes';
46 requires 'Tree::Simple' => '1.15';
47 requires 'Tree::Simple::Visitor::FindByPath';
48 requires 'Try::Tiny';
49 requires 'URI' => '1.35';
50 requires 'Task::Weaken';
51 requires 'Text::Balanced'; # core in 5.8.x but mentioned for completeness
52 requires 'MRO::Compat';
53 requires 'MooseX::Getopt' => '0.30';
54 requires 'MooseX::Types';
55 requires 'MooseX::Types::Common::Numeric';
56 requires 'String::RewritePrefix' => '0.004'; # Catalyst::Utils::resolve_namespace
57 requires 'Plack' => '0.9974'; # IIS6 fix middleware
58 requires 'Plack::Middleware::ReverseProxy' => '0.04';
59 requires 'Plack::Test::ExternalServer';
60
61 test_requires 'Class::Data::Inheritable';
62 test_requires 'Test::Exception';
63 test_requires 'Test::More' => '0.88';
64 test_requires 'Data::Dump';
65 test_requires 'HTTP::Request::Common';
66
67 # aggregate tests if AGGREGATE_TESTS is set and a recent Test::Aggregate and a Test::Simple it works with is available
68 if ($ENV{AGGREGATE_TESTS} && can_use('Test::Simple', '0.88') && can_use('Test::Aggregate', '0.364')) {
69     author_requires('Test::Aggregate', '0.364');
70     author_requires('Test::Simple', '0.88');
71     open my $fh, '>', '.aggregating';
72 }
73 else {
74     unlink '.aggregating';
75     tests 't/*.t t/aggregate/*.t';
76 }
77
78 author_requires 'CatalystX::LeakChecker', '0.05';
79 author_requires 'File::Copy::Recursive'; # For http server test
80 author_requires 'Catalyst::Devel', '1.0'; # For http server test
81 author_requires 'Catalyst::Engine::PSGI';
82 author_requires 'Test::Without::Module';
83 author_requires 'Starman';
84 author_requires 'MooseX::Daemonize';
85
86 author_tests 't/author';
87 author_requires(map {; $_ => 0 } qw(
88   Test::NoTabs
89   Test::Pod
90   Test::Pod::Coverage
91   Pod::Coverage::TrustPod
92 ));
93
94 if ($Module::Install::AUTHOR) {
95     darwin_check_no_resource_forks();
96 }
97
98 resources(
99     'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst',
100     'IRC'         => 'irc://irc.perl.org/#catalyst',
101     'license',    => 'http://dev.perl.org/licenses/',
102     'homepage',   => 'http://dev.catalyst.perl.org/',
103     'repository', => 'git://git.shadowcat.co.uk/catagits/Catalyst-Runtime.git',
104 );
105
106 install_script glob('script/*.pl');
107 auto_install;
108 WriteAll;
109
110 print <<"EOF";
111
112  Important:
113
114     This library is for running Catalyst applications.
115
116     For development and use of catalyst.pl and myapp_create.pl, make sure
117     you also install the development tools package Catalyst::Devel.
118
119         perl -MCPANPLUS -e 'install Catalyst::Devel' # or
120         perl -MCPAN -e 'install Catalyst::Devel'     # or
121         cpanm Catalyst::Devel
122
123     To get some commonly used plugins, as well as the TT view and DBIC
124     model, install Task::Catalyst in the same way.
125
126  Have fun!
127 EOF
128
129 # NOTE - This is the version number of the _incompatible_ code,
130 #        not the version number of the fixed version.
131 my %conflicts = (
132     'Catalyst::Plugin::SubRequest' => '0.14',
133     'Catalyst::Model::Akismet' => '0.02',
134     'Catalyst::Component::ACCEPT_CONTEXT' => '0.06',
135     'Catalyst::Plugin::ENV' => '9999', # This plugin is just stupid, full stop
136                                        # should have been a core fix.
137     'Catalyst::Plugin::Unicode::Encoding' => '0.2',
138     'Catalyst::Plugin::Authentication' => '0.10010', # _config accessor in ::Credential::Password
139     'Catalyst::Authentication::Credential::HTTP' => '1.009',
140     'Catalyst::Plugin::Session::Store::File' => '0.16',
141     'Catalyst::Plugin::Session' => '0.21',
142     'Catalyst::Plugin::Session::State::Cookie' => '0.10',
143     'Catalyst::Plugin::Session::Store::FastMmap' => '0.09',
144     'Catalyst::Controller::AllowDisable' => '0.03',
145     'Reaction' => '0.001999',
146     'Catalyst::Plugin::Upload::Image::Magick' => '0.03',
147     'Catalyst::Plugin::ConfigLoader'   => '0.22', # Older versions work but
148                                                   # throw Data::Visitor warns
149     'Catalyst::Devel'                  => '1.19',
150     'Catalyst::Plugin::SmartURI'       => '0.032',
151     'CatalystX::CRUD'                  => '0.37',
152     'Catalyst::Action::RenderView'     => '0.07',
153     'Catalyst::Plugin::DebugCookie'    => '0.999002',
154     'Catalyst::Plugin::Authentication' => '0.100091',
155     'CatalystX::Imports'               => '0.03',
156     'Catalyst::Plugin::HashedCookies'  => '1.03',
157     'Catalyst::Action::REST'           => '0.67',
158     'CatalystX::CRUD'                  => '0.42',
159     'CatalystX::CRUD::Model::RDBO'     => '0.20',
160     'Catalyst::View::Mason'            => '0.17',
161 );
162 check_conflicts(%conflicts);
163
164 # End of script, helper functions below.
165
166 sub darwin_check_no_resource_forks {
167     if ($^O eq 'darwin') {
168         my $osx_ver = `/usr/bin/sw_vers -productVersion`;
169         chomp $osx_ver;
170
171         # TAR on 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE
172         # On 10.5 (Leopard) it wants COPYFILE_DISABLE
173          die("Oh, you got Ceiling Cat, snazzy. Please read the man page for tar or Google to find out if Apple renamed COPYFILE_DISABLE (it was COPY_EXTENDED_ATTRIBUTES_DISABLE originally) again and fix this Makefile.PL please?\n") if $osx_ver =~ /^10.8/;
174         my $attr = $osx_ver =~ /^10.(5|6|7)/  ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
175
176         makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
177                                           qq{ echo "You must set the ENV variable $attr to 'true',"; }.
178                                           ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
179     }
180 }