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