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