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