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