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