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