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