Fix Makefile.PL
[catagits/Catalyst-Devel.git] / Makefile.PL
CommitLineData
b432fb95 1use inc::Module::Install 0.87;
54616d61 2
3name 'Catalyst-Devel';
c93c671b 4all_from 'lib/Catalyst/Devel.pm';
68ccb5e5 5
ee99bea5 6requires 'Moose';
7requires 'namespace::autoclean';
8requires 'MooseX::Types';
5561a11e 9requires 'File::ShareDir';
2b6385ce 10requires 'Catalyst' => '5.8000';
2658a4db 11requires 'Catalyst::Action::RenderView' => '0.04';
2eea177a 12requires 'Catalyst::Plugin::Static::Simple' => '0.16';
e2a962e1 13requires 'Catalyst::Plugin::ConfigLoader';
3d63fa09 14requires 'Class::Accessor::Fast';
fa60b7ee 15requires 'Config::General' => '2.42'; # as of 1.07, we use .conf and not .yaml
c5818fd8 16requires 'File::ChangeNotify' => '0.03';
fde6650e 17requires 'File::Copy::Recursive';
3d63fa09 18requires 'Module::Install' => '0.64';
19requires 'parent'; # as of 1.04
20requires 'Path::Class' => '0.09';
21requires 'Template' => '2.14';
54616d61 22
afd739f1 23install_share 'share';
24
2e9609df 25if ( $^O eq 'MSWin32' ) {
62cb5aed 26 # Proc::Background needs this on Win32 but doesn't actually
2e9609df 27 # require it, if it's missing it just dies in the Makefile.PL.
28 requires 'Win32::Process' => '0.04';
29 requires 'Proc::Background';
30}
31
1cbc4fbe 32if (!$ENV{CATALYST_DEVEL_NO_510_CHECK}) {
33 use Symbol 'gensym';
34 use IPC::Open3;
35 use File::Spec;
36 open NULL, '>', File::Spec->devnull;
37 my $err = gensym;
38 my $pid = open3(gensym, '&>NULL', $err, "$^X -It/lib -MUnknownError -e 1");
ee99bea5 39
1cbc4fbe 40 my $unknown_error = 0;
41
42 while (<$err>) {
43 $unknown_error = 1 if /^Unknown error/;
44 }
45
46 waitpid $pid, 0;
47
48 if ($unknown_error) {
49 warn <<EOE;
50############################### WARNING #################################
51# #
52# You are using perl 5.10.0 with the "Unknown error" bug. This can make #
ee99bea5 53# developing Catalyst applications much more painful, as it will come #
1cbc4fbe 54# up with no details every time you have a syntax error in a Controller.#
55# #
56# For more information see: #
57# #
58# * http://rt.perl.org/rt3/Public/Bug/Display.html?id=49472 #
59# #
68217a55 60# It is highly recommended that you use a different version of perl or #
61# compile a patched version for Catalyst development. #
1cbc4fbe 62# #
63# To skip this check, set the CATALYST_DEVEL_NO_510_CHECK environment #
64# variable. #
65# #
66#########################################################################
67
68EOE
69 my $ans = prompt('Do you want to continue?', 'no');
70 exit 0 unless $ans =~ /^y(es)?\z/i;
71 }
72}
73
d6c4f9a7 74# kill warning from older versions of Class::C3
75if ($] >= 5.009_005 && can_use('Class::C3') && !can_use('Class::C3', 0.20)) {
76 requires 'Class::C3' => '0.20';
77}
78
5539814d 79auto_install;
80
54616d61 81WriteAll;
d6c4f9a7 82
83if ($Module::Install::AUTHOR) {
84 Meta->{values}{resources} = [
85 [ 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst' ],
86 [ 'IRC' => 'irc://irc.perl.org/#catalyst' ],
87 [ 'license', => 'http://dev.perl.org/licenses/' ],
88 [ 'homepage', => 'http://dev.catalyst.perl.org/'],
89 [ 'repository', => 'http://dev.catalyst.perl.org/repos/Catalyst/Catalyst-Devel/' ],
90 ];
91
92 Meta->{values}{requires} = [ grep {
93 $_->[0] ne 'Class::C3'
94 } @{ Meta->{values}{requires} } ];
95
96 Meta->write;
97}