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