Conflict with MX::POE 0.205
[gitmo/Moose.git] / Makefile.PL
CommitLineData
db90f764 1use strict;
2use warnings;
f0374fd6 3use inc::Module::Install 0.98;
2e503ae9 4use Module::Install::AuthorRequires;
962d7364 5use 5.008003;
db90f764 6
4ff140fe 7check_broken_extratests();
0161e7d4 8check_conflicts();
9
db90f764 10name 'Moose';
962d7364 11perl_version '5.008003';
db90f764 12all_from 'lib/Moose.pm';
13license 'perl';
14
db90f764 15requires 'Carp';
40e7fd16 16requires 'Class::MOP' => '1.05';
40cb86f7 17requires 'Data::OptList' => '0';
18requires 'List::MoreUtils' => '0.12';
ec1ee84b 19requires 'Package::DeprecationManager' => '0.04';
40cb86f7 20requires 'Scalar::Util' => '1.19';
21requires 'Sub::Exporter' => '0.980';
22requires 'Sub::Name' => '0';
23requires 'Task::Weaken' => '0';
24requires 'Try::Tiny' => '0.02';
25374f01 25
87f55e33 26test_requires 'Test::More' => '0.88';
c0026a42 27test_requires 'Test::Exception' => '0.27';
db90f764 28
2e503ae9 29author_requires 'File::Find::Rule';
30author_requires 'Module::Info';
c7885929 31author_requires 'Test::Inline';
d68b5280 32author_requires 'Test::NoTabs';
c7885929 33author_requires 'Test::Output';
34author_requires 'Test::Pod::Coverage';
35author_requires 'Test::Spelling';
2e503ae9 36
4ff140fe 37if ( is_maintainer() ) {
c3ad9761 38 system( $^X, 'author/extract-inline-tests' );
de341d84 39}
40
6fb58c0d 41tests_recursive();
29772efc 42
6ee1960e 43repository 'git://git.moose.perl.org/Moose.git';
f0374fd6 44add_metadata(x_authority => 'cpan:STEVAN');
6ee1960e 45
db90f764 46WriteAll();
47
cc1d5453 48# Use the xt/author/test-my-dependents.t test to figure
0161e7d4 49# out what on CPAN will break with the latest Moose, then update this
50# before a release.
51sub check_conflicts {
52 my %conflicts = (
a713cb6e 53 'Catalyst' => '5.80017',
54 'Devel::REPL' => '1.003008',
55 'Fey::ORM' => '0.23',
56 'File::ChangeNotify' => '0.15',
57 'KiokuDB' => '0.41',
58 'MooseX::Aliases' => '0.07',
1e616ccd 59 'MooseX::AlwaysCoerce' => '0.05',
a713cb6e 60 'MooseX::AttributeHelpers' => '0.22',
e9ed2494 61 'MooseX::AttributeInflate' => '0.02',
a713cb6e 62 'MooseX::Attribute::Prototype' => '0.10',
3af3d884 63 'MooseX::ClassAttribute' => '0.13',
5c185d3c 64 'MooseX::FollowPBP' => '0.02',
576854ad 65 'MooseX::HasDefaults' => '0.02',
66 'MooseX::InstanceTracking' => '0.04',
3554ec63 67 'MooseX::LazyRequire' => '0.05',
e75362e6 68 'MooseX::MethodAttributes' => '0.22',
d7c4dde6 69 'MooseX::NonMoose' => '0.13,'
a713cb6e 70 'MooseX::Params::Validate' => '0.05',
d7c4dde6 71 'MooseX::POE' => '0.205',
a713cb6e 72 'MooseX::Role::Cmd' => '0.06',
bed5ad6f 73 'MooseX::Role::WithOverloading' => '0.07',
a713cb6e 74 'MooseX::SemiAffordanceAccessor' => '0.05',
b855f2e4 75 'MooseX::Singleton' => '0.22',
a713cb6e 76 'MooseX::StrictConstructor' => '0.08',
77 'MooseX::Types' => '0.19',
cea5d1c9 78 'MooseX::UndefTolerant' => '0.04',
a713cb6e 79 'namespace::autoclean' => '0.08',
80 'Pod::Elemental' => '0.093280',
0161e7d4 81 );
82
83 my $found = 0;
84 for my $mod ( sort keys %conflicts ) {
85 eval "require $mod";
86 next if $@;
87
88 my $installed = $mod->VERSION();
89 if ( $installed le $conflicts{$mod} ) {
90
91 print <<"EOF";
92
93***
94 This version of Moose conflicts with the version of
95 $mod ($installed) you have installed.
96
97 You will need to upgrade $mod after installing
98 this version of Moose.
99***
100
101EOF
102
103 $found = 1;
104 }
105 }
106
7aaa2004 107 return unless $found;
108
0161e7d4 109 # More or less copied from Module::Build
110 return if $ENV{PERL_MM_USE_DEFAULT};
111 return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
112
7aaa2004 113 sleep 4;
0161e7d4 114}
4ff140fe 115
116sub is_maintainer {
117 return $Module::Install::AUTHOR || $ENV{IS_MAINTAINER};
118}
119
120sub check_broken_extratests {
121 return unless is_maintainer();
122
123 if ( exists $Module::Install::ExtraTests::{VERSION} && Module::Install::ExtraTests->VERSION < 0.007 ) {
124 print STDERR <<'EOR';
125You have a broken version of Module::Install::ExtraTests installed.
126Please upgrade to version 0.007 or newer and re-run Makefile.PL
127EOR
128 exit 0;
129 }
130}