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