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