Changelogging.
[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
4bfa5ddb 13my $ccflags = -d '.svn' || -d '.git' || $ENV{MAINTAINER_MODE} ? '-Wall' : '';
f125b31e 14
89dc39a9 15requires 'Carp';
16requires 'Devel::GlobalDestruction';
d065fbe6 17requires 'MRO::Compat' => '0.05';
18requires 'Scalar::Util' => '1.18';
19requires 'Sub::Name' => '0.04';
89dc39a9 20requires 'Task::Weaken';
21
22test_requires 'File::Spec';
23test_requires 'Test::More' => '0.77';
24test_requires 'Test::Exception' => '0.21';
25
26makemaker_args( CCFLAGS => $ccflags );
27
28WriteAll();
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.
33sub 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
56EOF
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}