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 | |
23f46d73 |
13 | requires 'Scalar::Util' => '1.19'; |
db90f764 |
14 | requires 'Carp'; |
ac53c013 |
15 | requires 'Class::MOP' => '0.81'; |
e8d6f353 |
16 | requires 'List::MoreUtils' => '0.12'; |
c373cc5c |
17 | requires 'Sub::Exporter' => '0.972'; |
477f1f61 |
18 | requires 'Task::Weaken' => '0'; |
28422aa4 |
19 | requires 'Data::OptList' => '0'; |
25374f01 |
20 | |
3d28060b |
21 | test_requires 'Test::More' => '0.77'; |
22 | test_requires 'Test::Exception' => '0.21'; |
db90f764 |
23 | |
de341d84 |
24 | if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) { |
c3ad9761 |
25 | system( $^X, 'author/extract-inline-tests' ); |
de341d84 |
26 | } |
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 = ( |
22161b6c |
37 | 'MooseX::ClassAttribute' => '0.07', |
38 | 'MooseX::Singleton' => '0.14', |
39 | 'MooseX::StrictConstructor' => '0.07', |
40 | 'MooseX::Params::Validate' => '0.05', |
41 | 'Fey::ORM' => '0.22', |
0161e7d4 |
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 | } |