re-apply my patch
[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';
8aef11e3 15requires 'Class::MOP' => '0.82_01';
e8d6f353 16requires 'List::MoreUtils' => '0.12';
c373cc5c 17requires 'Sub::Exporter' => '0.972';
477f1f61 18requires 'Task::Weaken' => '0';
28422aa4 19requires 'Data::OptList' => '0';
25374f01 20
3d28060b 21test_requires 'Test::More' => '0.77';
22test_requires 'Test::Exception' => '0.21';
8b23f9f8 23test_requires 'Test::Output' => '0.09';
db90f764 24
de341d84 25if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) {
c3ad9761 26 system( $^X, 'author/extract-inline-tests' );
de341d84 27}
28
6fb58c0d 29tests_recursive();
29772efc 30
db90f764 31WriteAll();
32
0161e7d4 33# Use the cpan-smolder-stable script in the Moose svn root to figure
34# out what on CPAN will break with the latest Moose, then update this
35# before a release.
36sub check_conflicts {
37 my %conflicts = (
22161b6c 38 'MooseX::ClassAttribute' => '0.07',
39 'MooseX::Singleton' => '0.14',
40 'MooseX::StrictConstructor' => '0.07',
41 'MooseX::Params::Validate' => '0.05',
42 'Fey::ORM' => '0.22',
0161e7d4 43 );
44
45 my $found = 0;
46 for my $mod ( sort keys %conflicts ) {
47 eval "require $mod";
48 next if $@;
49
50 my $installed = $mod->VERSION();
51 if ( $installed le $conflicts{$mod} ) {
52
53 print <<"EOF";
54
55***
56 This version of Moose conflicts with the version of
57 $mod ($installed) you have installed.
58
59 You will need to upgrade $mod after installing
60 this version of Moose.
61***
62
63EOF
64
65 $found = 1;
66 }
67 }
68
7aaa2004 69 return unless $found;
70
0161e7d4 71 # More or less copied from Module::Build
72 return if $ENV{PERL_MM_USE_DEFAULT};
73 return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
74
7aaa2004 75 sleep 4;
0161e7d4 76}