Commit | Line | Data |
db90f764 |
1 | use strict; |
2 | use warnings; |
47b19570 |
3 | use inc::Module::Install; |
db90f764 |
4 | |
0161e7d4 |
5 | check_conflicts(); |
6 | |
db90f764 |
7 | name 'Moose'; |
8 | all_from 'lib/Moose.pm'; |
9 | license 'perl'; |
10 | |
db90f764 |
11 | # prereqs |
ecb1297a |
12 | requires 'perl' => '5.008'; |
23f46d73 |
13 | requires 'Scalar::Util' => '1.19'; |
db90f764 |
14 | requires 'Carp'; |
82750a8a |
15 | requires 'Class::MOP' => '0.71_01'; |
2c9c8797 |
16 | requires 'List::MoreUtils'; |
c373cc5c |
17 | requires 'Sub::Exporter' => '0.972'; |
477f1f61 |
18 | requires 'Task::Weaken' => '0'; |
25374f01 |
19 | |
20 | # only used by oose.pm, not Moose.pm :P |
21 | requires 'Filter::Simple' => '0'; |
db90f764 |
22 | |
23 | # things the tests need |
9453df8f |
24 | build_requires 'Test::More' => '0.77'; |
db90f764 |
25 | build_requires 'Test::Exception' => '0.21'; |
26 | build_requires 'Test::LongString'; |
27 | |
6fb58c0d |
28 | tests_recursive(); |
29772efc |
29 | |
db90f764 |
30 | WriteAll(); |
31 | |
0161e7d4 |
32 | # Use the cpan-smolder-stable script in the Moose svn root to figure |
33 | # out what on CPAN will break with the latest Moose, then update this |
34 | # before a release. |
35 | sub check_conflicts { |
36 | my %conflicts = ( |
74a90eea |
37 | 'MooseX::Singleton' => '0.12', |
0161e7d4 |
38 | 'MooseX::Params::Validate' => '0.05', |
74a90eea |
39 | 'Fey::ORM' => '0.12', |
0161e7d4 |
40 | ); |
41 | |
42 | my $found = 0; |
43 | for my $mod ( sort keys %conflicts ) { |
44 | eval "require $mod"; |
45 | next if $@; |
46 | |
47 | my $installed = $mod->VERSION(); |
48 | if ( $installed le $conflicts{$mod} ) { |
49 | |
50 | print <<"EOF"; |
51 | |
52 | *** |
53 | This version of Moose conflicts with the version of |
54 | $mod ($installed) you have installed. |
55 | |
56 | You will need to upgrade $mod after installing |
57 | this version of Moose. |
58 | *** |
59 | |
60 | EOF |
61 | |
62 | $found = 1; |
63 | } |
64 | } |
65 | |
7aaa2004 |
66 | return unless $found; |
67 | |
0161e7d4 |
68 | # More or less copied from Module::Build |
69 | return if $ENV{PERL_MM_USE_DEFAULT}; |
70 | return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); |
71 | |
7aaa2004 |
72 | sleep 4; |
0161e7d4 |
73 | } |