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