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