Add changes for hdp's inherited lazy_build fix
[gitmo/Moose.git] / Makefile.PL
CommitLineData
db90f764 1use strict;
2use warnings;
47b19570 3use inc::Module::Install;
4a8035cf 4use 5.008001;
db90f764 5
0161e7d4 6check_conflicts();
7
db90f764 8name 'Moose';
4a8035cf 9perl_version '5.008001';
db90f764 10all_from 'lib/Moose.pm';
11license 'perl';
12
23f46d73 13requires 'Scalar::Util' => '1.19';
db90f764 14requires 'Carp';
7e9900b6 15requires 'Class::MOP' => '0.77_01';
e8d6f353 16requires 'List::MoreUtils' => '0.12';
c373cc5c 17requires 'Sub::Exporter' => '0.972';
477f1f61 18requires 'Task::Weaken' => '0';
25374f01 19
3d28060b 20test_requires 'Test::More' => '0.77';
21test_requires 'Test::Exception' => '0.21';
db90f764 22
de341d84 23if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) {
c3ad9761 24 system( $^X, 'author/extract-inline-tests' );
de341d84 25}
26
6fb58c0d 27tests_recursive();
29772efc 28
db90f764 29WriteAll();
30
0161e7d4 31# Use the cpan-smolder-stable script in the Moose svn root to figure
32# out what on CPAN will break with the latest Moose, then update this
33# before a release.
34sub check_conflicts {
35 my %conflicts = (
74a90eea 36 'MooseX::Singleton' => '0.12',
0161e7d4 37 'MooseX::Params::Validate' => '0.05',
74a90eea 38 'Fey::ORM' => '0.12',
cca3dd5c 39 'MooseX::AttributeHelpers' => '0.14',
0161e7d4 40 );
41
42 my $found = 0;
43 for my $mod ( sort keys %conflicts ) {
44 eval "require $mod";
45 next if $@;
46
47 my $installed = $mod->VERSION();
48 if ( $installed le $conflicts{$mod} ) {
49
50 print <<"EOF";
51
52***
53 This version of Moose conflicts with the version of
54 $mod ($installed) you have installed.
55
56 You will need to upgrade $mod after installing
57 this version of Moose.
58***
59
60EOF
61
62 $found = 1;
63 }
64 }
65
7aaa2004 66 return unless $found;
67
0161e7d4 68 # More or less copied from Module::Build
69 return if $ENV{PERL_MM_USE_DEFAULT};
70 return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
71
7aaa2004 72 sleep 4;
0161e7d4 73}