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