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'; |
8aef11e3 | 15 | requires 'Class::MOP' => '0.82_01'; |
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'; |
9f2230e9 | 20 | requires 'Sub::Name' => '0'; |
25374f01 | 21 | |
3d28060b | 22 | test_requires 'Test::More' => '0.77'; |
23 | test_requires 'Test::Exception' => '0.21'; | |
8b23f9f8 | 24 | test_requires 'Test::Output' => '0.09'; |
db90f764 | 25 | |
de341d84 | 26 | if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) { |
c3ad9761 | 27 | system( $^X, 'author/extract-inline-tests' ); |
de341d84 | 28 | } |
29 | ||
6fb58c0d | 30 | tests_recursive(); |
29772efc | 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 = ( | |
22161b6c | 39 | 'MooseX::ClassAttribute' => '0.07', |
ecba226c | 40 | 'MooseX::Singleton' => '0.15', |
22161b6c | 41 | 'MooseX::StrictConstructor' => '0.07', |
42 | 'MooseX::Params::Validate' => '0.05', | |
ecba226c | 43 | 'Fey::ORM' => '0.23', |
0161e7d4 | 44 | ); |
45 | ||
46 | my $found = 0; | |
47 | for my $mod ( sort keys %conflicts ) { | |
48 | eval "require $mod"; | |
49 | next if $@; | |
50 | ||
51 | my $installed = $mod->VERSION(); | |
52 | if ( $installed le $conflicts{$mod} ) { | |
53 | ||
54 | print <<"EOF"; | |
55 | ||
56 | *** | |
57 | This version of Moose conflicts with the version of | |
58 | $mod ($installed) you have installed. | |
59 | ||
60 | You will need to upgrade $mod after installing | |
61 | this version of Moose. | |
62 | *** | |
63 | ||
64 | EOF | |
65 | ||
66 | $found = 1; | |
67 | } | |
68 | } | |
69 | ||
7aaa2004 | 70 | return unless $found; |
71 | ||
0161e7d4 | 72 | # More or less copied from Module::Build |
73 | return if $ENV{PERL_MM_USE_DEFAULT}; | |
74 | return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); | |
75 | ||
7aaa2004 | 76 | sleep 4; |
0161e7d4 | 77 | } |