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