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