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