Issue deprecation warning on coerce => 1 without coercion, rather than dying
[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';
40cb86f7 16requires 'Class::MOP' => '1.02';
17requires 'Data::OptList' => '0';
18requires 'List::MoreUtils' => '0.12';
19requires 'Package::DeprecationManager' => '0.03';
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 'Test::Inline';
30author_requires 'File::Find::Rule';
31author_requires 'Module::Info';
d68b5280 32author_requires 'Test::Spelling';
33author_requires 'Test::Pod::Coverage';
34author_requires 'Test::NoTabs';
2e503ae9 35
4ff140fe 36if ( is_maintainer() ) {
c3ad9761 37 system( $^X, 'author/extract-inline-tests' );
de341d84 38}
39
6fb58c0d 40tests_recursive();
29772efc 41
6ee1960e 42repository 'git://git.moose.perl.org/Moose.git';
f0374fd6 43add_metadata(x_authority => 'cpan:STEVAN');
6ee1960e 44
db90f764 45WriteAll();
46
cc1d5453 47# Use the xt/author/test-my-dependents.t test to figure
0161e7d4 48# out what on CPAN will break with the latest Moose, then update this
49# before a release.
50sub check_conflicts {
51 my %conflicts = (
1f43f509 52 'Catalyst' => '5.80017',
a666d43a 53 'Devel::REPL' => '1.003008',
3e8684a5 54 'Fey::ORM' => '0.23',
28c143f3 55 'File::ChangeNotify' => '0.15',
1f43f509 56 'KiokuDB' => '0.41',
3e8684a5 57 'MooseX::Aliases' => '0.07',
58 'MooseX::AttributeHelpers' => '0.22',
92056b59 59 'MooseX::Attribute::Prototype' => '0.10',
3e8684a5 60 'MooseX::ClassAttribute' => '0.09',
61 'MooseX::MethodAttributes' => '0.18',
a19ae3d7 62 'MooseX::NonMoose' => '0.07',
3e8684a5 63 'MooseX::Params::Validate' => '0.05',
64 'MooseX::Role::Cmd' => '0.06',
65 'MooseX::Role::WithOverloading' => '0.04',
66 'MooseX::Singleton' => '0.19',
67 'MooseX::StrictConstructor' => '0.07',
68 'MooseX::Types' => '0.19',
69 'namespace::autoclean' => '0.08',
1f43f509 70 'Pod::Elemental' => '0.093280',
0161e7d4 71 );
72
73 my $found = 0;
74 for my $mod ( sort keys %conflicts ) {
75 eval "require $mod";
76 next if $@;
77
78 my $installed = $mod->VERSION();
79 if ( $installed le $conflicts{$mod} ) {
80
81 print <<"EOF";
82
83***
84 This version of Moose conflicts with the version of
85 $mod ($installed) you have installed.
86
87 You will need to upgrade $mod after installing
88 this version of Moose.
89***
90
91EOF
92
93 $found = 1;
94 }
95 }
96
7aaa2004 97 return unless $found;
98
0161e7d4 99 # More or less copied from Module::Build
100 return if $ENV{PERL_MM_USE_DEFAULT};
101 return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
102
7aaa2004 103 sleep 4;
0161e7d4 104}
4ff140fe 105
106sub is_maintainer {
107 return $Module::Install::AUTHOR || $ENV{IS_MAINTAINER};
108}
109
110sub check_broken_extratests {
111 return unless is_maintainer();
112
113 if ( exists $Module::Install::ExtraTests::{VERSION} && Module::Install::ExtraTests->VERSION < 0.007 ) {
114 print STDERR <<'EOR';
115You have a broken version of Module::Install::ExtraTests installed.
116Please upgrade to version 0.007 or newer and re-run Makefile.PL
117EOR
118 exit 0;
119 }
120}