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