Explain why we depend on Module::Install
[catagits/Catalyst-Devel.git] / Makefile.PL
CommitLineData
18c940b8 1use strict;
2use warnings;
693e890f 3use inc::Module::Install 0.91;
18c940b8 4use Module::Install::AuthorRequires;
54616d61 5
6name 'Catalyst-Devel';
c93c671b 7all_from 'lib/Catalyst/Devel.pm';
68ccb5e5 8
ee99bea5 9requires 'Moose';
dcc30470 10requires 'MooseX::Emulate::Class::Accessor::Fast';
5561a11e 11requires 'File::ShareDir';
4753780f 12requires 'namespace::clean';
cf042872 13requires 'namespace::autoclean';
94e57c33 14requires 'Catalyst' => '5.80015';
a2301033 15requires 'Catalyst::Action::RenderView' => '0.10';
13096aba 16requires 'Catalyst::Plugin::Static::Simple' => '0.28';
ac4a8fbe 17requires 'Catalyst::Plugin::ConfigLoader' => '0.30';
fa60b7ee 18requires 'Config::General' => '2.42'; # as of 1.07, we use .conf and not .yaml
396a43ae 19requires 'File::ChangeNotify' => '0.07';
fde6650e 20requires 'File::Copy::Recursive';
3d63fa09 21requires 'Path::Class' => '0.09';
22requires 'Template' => '2.14';
54616d61 23
8955c676 24# The Catalyst applications this module distribution have a Makefile.PL using
25# Module::Install as well as the Module::Install::Catalyst extension included in
26# this distribution. Therefore we really *depend* on Module::Install to be
27# installed, even though we also use it to build this distribution and include
28# it in its inc/ directory for releases.
29requires 'Module::Install' => '0.91';
30
18c940b8 31author_requires 'IPC::Run3';
09c03d31 32author_requires 'Module::Info';
33author_requires 'File::Find::Rule';
18c940b8 34
efc787e1 35test_requires 'Test::More' => '0.94';
91497b69 36
afd739f1 37install_share 'share';
38
2e9609df 39if ( $^O eq 'MSWin32' ) {
62cb5aed 40 # Proc::Background needs this on Win32 but doesn't actually
2e9609df 41 # require it, if it's missing it just dies in the Makefile.PL.
42 requires 'Win32::Process' => '0.04';
43 requires 'Proc::Background';
44}
45
1cbc4fbe 46if (!$ENV{CATALYST_DEVEL_NO_510_CHECK}) {
47 use Symbol 'gensym';
48 use IPC::Open3;
49 use File::Spec;
50 open NULL, '>', File::Spec->devnull;
51 my $err = gensym;
52 my $pid = open3(gensym, '&>NULL', $err, "$^X -It/lib -MUnknownError -e 1");
ee99bea5 53
1cbc4fbe 54 my $unknown_error = 0;
55
56 while (<$err>) {
57 $unknown_error = 1 if /^Unknown error/;
58 }
59
60 waitpid $pid, 0;
61
62 if ($unknown_error) {
63 warn <<EOE;
64############################### WARNING #################################
65# #
66# You are using perl 5.10.0 with the "Unknown error" bug. This can make #
ee99bea5 67# developing Catalyst applications much more painful, as it will come #
1cbc4fbe 68# up with no details every time you have a syntax error in a Controller.#
69# #
70# For more information see: #
71# #
72# * http://rt.perl.org/rt3/Public/Bug/Display.html?id=49472 #
73# #
68217a55 74# It is highly recommended that you use a different version of perl or #
75# compile a patched version for Catalyst development. #
1cbc4fbe 76# #
77# To skip this check, set the CATALYST_DEVEL_NO_510_CHECK environment #
78# variable. #
79# #
80#########################################################################
81
82EOE
83 my $ans = prompt('Do you want to continue?', 'no');
84 exit 0 unless $ans =~ /^y(es)?\z/i;
85 }
86}
87
d6c4f9a7 88# kill warning from older versions of Class::C3
89if ($] >= 5.009_005 && can_use('Class::C3') && !can_use('Class::C3', 0.20)) {
90 requires 'Class::C3' => '0.20';
91}
92
5539814d 93auto_install;
94
54616d61 95WriteAll;
d6c4f9a7 96
97if ($Module::Install::AUTHOR) {
98 Meta->{values}{resources} = [
99 [ 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst' ],
100 [ 'IRC' => 'irc://irc.perl.org/#catalyst' ],
101 [ 'license', => 'http://dev.perl.org/licenses/' ],
102 [ 'homepage', => 'http://dev.catalyst.perl.org/'],
fbfcf6c6 103 [ 'repository', => 'git://git.shadowcat.co.uk/catagits/Catalyst-Devel.git' ],
d6c4f9a7 104 ];
105
106 Meta->{values}{requires} = [ grep {
107 $_->[0] ne 'Class::C3'
108 } @{ Meta->{values}{requires} } ];
109
110 Meta->write;
111}