Win32 fixes
[catagits/Catalyst-Devel.git] / Makefile.PL
CommitLineData
18c940b8 1use strict;
2use warnings;
693e890f 3use inc::Module::Install 0.91;
18c940b8 4use Module::Install::AuthorRequires;
3260ae5d 5use Module::Install::AuthorTests;
54616d61 6
7name 'Catalyst-Devel';
c93c671b 8all_from 'lib/Catalyst/Devel.pm';
68ccb5e5 9
ee99bea5 10requires 'Moose';
dcc30470 11requires 'MooseX::Emulate::Class::Accessor::Fast';
5561a11e 12requires 'File::ShareDir';
4753780f 13requires 'namespace::clean';
cf042872 14requires 'namespace::autoclean';
727f14e9 15requires 'Catalyst' => '5.90001';
a2301033 16requires 'Catalyst::Action::RenderView' => '0.10';
13096aba 17requires 'Catalyst::Plugin::Static::Simple' => '0.28';
ac4a8fbe 18requires 'Catalyst::Plugin::ConfigLoader' => '0.30';
fa60b7ee 19requires 'Config::General' => '2.42'; # as of 1.07, we use .conf and not .yaml
396a43ae 20requires 'File::ChangeNotify' => '0.07';
fde6650e 21requires 'File::Copy::Recursive';
3d63fa09 22requires 'Path::Class' => '0.09';
23requires 'Template' => '2.14';
8527ca62 24
25if (!$Module::Install::AUTHOR && $^O ne 'MSWin32') {
26 requires 'MooseX::Daemonize'; # Optional in scripts
27 requires 'Starman'; # Optional in scripts
28}
54616d61 29
8955c676 30# The Catalyst applications this module distribution have a Makefile.PL using
31# Module::Install as well as the Module::Install::Catalyst extension included in
32# this distribution. Therefore we really *depend* on Module::Install to be
33# installed, even though we also use it to build this distribution and include
34# it in its inc/ directory for releases.
35requires 'Module::Install' => '0.91';
36
18c940b8 37author_requires 'IPC::Run3';
09c03d31 38author_requires 'Module::Info';
39author_requires 'File::Find::Rule';
18c940b8 40
efc787e1 41test_requires 'Test::More' => '0.94';
bc750d3b 42test_requires 'Test::Fatal' => '0.003';
91497b69 43
afd739f1 44install_share 'share';
45
3260ae5d 46author_tests 't/author';
47
1cbc4fbe 48if (!$ENV{CATALYST_DEVEL_NO_510_CHECK}) {
49 use Symbol 'gensym';
50 use IPC::Open3;
51 use File::Spec;
52 open NULL, '>', File::Spec->devnull;
53 my $err = gensym;
54 my $pid = open3(gensym, '&>NULL', $err, "$^X -It/lib -MUnknownError -e 1");
ee99bea5 55
1cbc4fbe 56 my $unknown_error = 0;
57
58 while (<$err>) {
59 $unknown_error = 1 if /^Unknown error/;
60 }
61
62 waitpid $pid, 0;
63
64 if ($unknown_error) {
65 warn <<EOE;
66############################### WARNING #################################
67# #
68# You are using perl 5.10.0 with the "Unknown error" bug. This can make #
ee99bea5 69# developing Catalyst applications much more painful, as it will come #
1cbc4fbe 70# up with no details every time you have a syntax error in a Controller.#
71# #
72# For more information see: #
73# #
74# * http://rt.perl.org/rt3/Public/Bug/Display.html?id=49472 #
75# #
68217a55 76# It is highly recommended that you use a different version of perl or #
77# compile a patched version for Catalyst development. #
1cbc4fbe 78# #
79# To skip this check, set the CATALYST_DEVEL_NO_510_CHECK environment #
80# variable. #
81# #
82#########################################################################
83
84EOE
85 my $ans = prompt('Do you want to continue?', 'no');
86 exit 0 unless $ans =~ /^y(es)?\z/i;
87 }
88}
89
d6c4f9a7 90# kill warning from older versions of Class::C3
91if ($] >= 5.009_005 && can_use('Class::C3') && !can_use('Class::C3', 0.20)) {
92 requires 'Class::C3' => '0.20';
93}
94
5539814d 95auto_install;
96
54616d61 97WriteAll;
d6c4f9a7 98
99if ($Module::Install::AUTHOR) {
100 Meta->{values}{resources} = [
101 [ 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst' ],
102 [ 'IRC' => 'irc://irc.perl.org/#catalyst' ],
103 [ 'license', => 'http://dev.perl.org/licenses/' ],
104 [ 'homepage', => 'http://dev.catalyst.perl.org/'],
fbfcf6c6 105 [ 'repository', => 'git://git.shadowcat.co.uk/catagits/Catalyst-Devel.git' ],
d6c4f9a7 106 ];
107
108 Meta->{values}{requires} = [ grep {
109 $_->[0] ne 'Class::C3'
110 } @{ Meta->{values}{requires} } ];
111
112 Meta->write;
113}