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