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