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