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 | requires 'Carp'; |
137beb98 | 14 | requires 'Class::MOP' => '0.92_01'; |
6a461fc0 | 15 | requires 'Data::OptList' => '0'; |
e8d6f353 | 16 | requires 'List::MoreUtils' => '0.12'; |
6a461fc0 | 17 | requires 'Scalar::Util' => '1.19'; |
091ac4b7 | 18 | requires 'Sub::Exporter' => '0.980'; |
9f2230e9 | 19 | requires 'Sub::Name' => '0'; |
6a461fc0 | 20 | requires 'Task::Weaken' => '0'; |
6c01c148 | 21 | requires 'Try::Tiny' => '0.02'; |
25374f01 | 22 | |
3d28060b | 23 | test_requires 'Test::More' => '0.77'; |
c0026a42 | 24 | test_requires 'Test::Exception' => '0.27'; |
db90f764 | 25 | |
de341d84 | 26 | if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) { |
c3ad9761 | 27 | system( $^X, 'author/extract-inline-tests' ); |
de341d84 | 28 | } |
29 | ||
c93fa627 | 30 | extra_tests(); |
6fb58c0d | 31 | tests_recursive(); |
29772efc | 32 | |
db90f764 | 33 | WriteAll(); |
34 | ||
0161e7d4 | 35 | # Use the cpan-smolder-stable script in the Moose svn root to figure |
36 | # out what on CPAN will break with the latest Moose, then update this | |
37 | # before a release. | |
38 | sub check_conflicts { | |
39 | my %conflicts = ( | |
e7e33216 | 40 | 'MooseX::ClassAttribute' => '0.09', |
60dcd0cf | 41 | 'MooseX::Singleton' => '0.19', |
22161b6c | 42 | 'MooseX::StrictConstructor' => '0.07', |
43 | 'MooseX::Params::Validate' => '0.05', | |
ecba226c | 44 | 'Fey::ORM' => '0.23', |
0161e7d4 | 45 | ); |
46 | ||
47 | my $found = 0; | |
48 | for my $mod ( sort keys %conflicts ) { | |
49 | eval "require $mod"; | |
50 | next if $@; | |
51 | ||
52 | my $installed = $mod->VERSION(); | |
53 | if ( $installed le $conflicts{$mod} ) { | |
54 | ||
55 | print <<"EOF"; | |
56 | ||
57 | *** | |
58 | This version of Moose conflicts with the version of | |
59 | $mod ($installed) you have installed. | |
60 | ||
61 | You will need to upgrade $mod after installing | |
62 | this version of Moose. | |
63 | *** | |
64 | ||
65 | EOF | |
66 | ||
67 | $found = 1; | |
68 | } | |
69 | } | |
70 | ||
7aaa2004 | 71 | return unless $found; |
72 | ||
0161e7d4 | 73 | # More or less copied from Module::Build |
74 | return if $ENV{PERL_MM_USE_DEFAULT}; | |
75 | return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); | |
76 | ||
7aaa2004 | 77 | sleep 4; |
0161e7d4 | 78 | } |