Commit | Line | Data |
591a9381 |
1 | use strict; |
2 | use warnings; |
89dc39a9 |
3 | use inc::Module::Install; |
4 | use 5.008001; |
5 | |
6 | check_conflicts(); |
7 | |
8 | name 'Class-MOP'; |
9 | perl_version '5.008001'; |
10 | all_from 'lib/Class/MOP.pm'; |
11 | license 'perl'; |
591a9381 |
12 | |
4bfa5ddb |
13 | my $ccflags = -d '.svn' || -d '.git' || $ENV{MAINTAINER_MODE} ? '-Wall' : ''; |
f125b31e |
14 | |
89dc39a9 |
15 | requires 'Carp'; |
16 | requires 'Devel::GlobalDestruction'; |
d065fbe6 |
17 | requires 'MRO::Compat' => '0.05'; |
18 | requires 'Scalar::Util' => '1.18'; |
19 | requires 'Sub::Name' => '0.04'; |
89dc39a9 |
20 | requires 'Task::Weaken'; |
21 | |
22 | test_requires 'File::Spec'; |
23 | test_requires 'Test::More' => '0.77'; |
24 | test_requires 'Test::Exception' => '0.21'; |
25 | |
26 | makemaker_args( CCFLAGS => $ccflags ); |
27 | |
28 | WriteAll(); |
29 | |
30 | # Use the cpan-smolder-stable script in the Moose svn root to figure |
31 | # out what on CPAN will break with the latest Moose, then update this |
32 | # before a release. |
33 | sub check_conflicts { |
34 | my %conflicts = ( |
35 | 'Moose' => '0.71', |
36 | ); |
37 | |
38 | my $found = 0; |
39 | for my $mod ( sort keys %conflicts ) { |
40 | eval "require $mod"; |
41 | next if $@; |
42 | |
43 | my $installed = $mod->VERSION(); |
44 | if ( $installed le $conflicts{$mod} ) { |
45 | |
46 | print <<"EOF"; |
47 | |
48 | *** |
49 | This version of Class::MOP conflicts with the version of |
50 | $mod ($installed) you have installed. |
51 | |
52 | You will need to upgrade $mod after installing |
53 | this version of Class::MOP. |
54 | *** |
55 | |
56 | EOF |
57 | |
58 | $found = 1; |
59 | } |
60 | } |
61 | |
62 | return unless $found; |
63 | |
64 | # More or less copied from Module::Build |
d065fbe6 |
65 | return if $ENV{PERL_MM_USE_DEFAULT}; |
66 | return unless -t STDIN && ( -t STDOUT || !( -f STDOUT || -c STDOUT ) ); |
89dc39a9 |
67 | |
68 | sleep 4; |
69 | } |