Revert "Hash accessor should accept more than 2 arguments"
[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';
748de9dd 17requires 'Class::MOP' => '1.11';
40cb86f7 18requires 'Data::OptList' => '0';
19requires 'List::MoreUtils' => '0.12';
174ff38e 20requires 'Package::DeprecationManager' => '0.10';
524f93f4 21requires 'Params::Util' => '1.00';
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
478b11a9 28test_requires 'Test::More' => '0.88';
29test_requires 'Test::Fatal' => '0.001';
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';
ba796e8b 61add_metadata( x_authority => 'cpan:STEVAN' );
62add_metadata(
63 no_index => {
64 files => ['lib/Moose/Meta/Method/Accessor/Native.pm'],
65 directory => ['lib/Moose/Meta/Method/Accessor/Native'],
66 }
67);
6ee1960e 68
73885d7d 69extra_tests();
70
db90f764 71WriteAll();
72
f967037b 73# Use the xt/author/test-my-dependents.t test to figure
74# out what on CPAN will break with the latest Moose, then update this
75# before a release.
76sub check_conflicts {
77 my %conflicts = (
69fdd97d 78 'Catalyst' => '5.80028',
f967037b 79 'Devel::REPL' => '1.003008',
4df593bb 80 'Fey' => '0.36',
173cb840 81 'Fey::ORM' => '0.34',
f967037b 82 'File::ChangeNotify' => '0.15',
259b8c5a 83 'KiokuDB' => '0.49',
64d27dc3 84 'Markdent' => '0.16',
f967037b 85 'MooseX::Aliases' => '0.07',
86 'MooseX::AlwaysCoerce' => '0.05',
87 'MooseX::AttributeHelpers' => '0.22',
88 'MooseX::AttributeInflate' => '0.02',
89 'MooseX::Attribute::Prototype' => '0.10',
52e9d89e 90 'MooseX::ClassAttribute' => '0.17',
f967037b 91 'MooseX::FollowPBP' => '0.02',
92 'MooseX::HasDefaults' => '0.02',
93 'MooseX::InstanceTracking' => '0.04',
94 'MooseX::LazyRequire' => '0.05',
95 'MooseX::MethodAttributes' => '0.22',
5171f2e1 96 'MooseX::NonMoose' => '0.15',
f967037b 97 'MooseX::Params::Validate' => '0.05',
98 'MooseX::POE' => '0.205',
99 'MooseX::Role::Cmd' => '0.06',
100 'MooseX::Role::WithOverloading' => '0.07',
101 'MooseX::SemiAffordanceAccessor' => '0.05',
102 'MooseX::Singleton' => '0.24',
103 'MooseX::StrictConstructor' => '0.08',
104 'MooseX::Types' => '0.19',
105 'MooseX::UndefTolerant' => '0.04',
106 'namespace::autoclean' => '0.08',
107 'Pod::Elemental' => '0.093280',
108 );
109
110 my $found = 0;
111 for my $mod ( sort keys %conflicts ) {
112 eval "require $mod";
113 next if $@;
114
115 my $installed = $mod->VERSION();
116 if ( $installed le $conflicts{$mod} ) {
117
118 print <<"EOF";
119
120***
121 This version of Moose conflicts with the version of
122 $mod ($installed) you have installed.
123
124 You will need to upgrade $mod after installing
125 this version of Moose.
126***
127
128EOF
129
130 $found = 1;
131 }
132 }
133
134 return unless $found;
135
136 # More or less copied from Module::Build
137 return if $ENV{PERL_MM_USE_DEFAULT};
138 return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
139
140 sleep 4;
141}
142
4ff140fe 143sub is_maintainer {
144 return $Module::Install::AUTHOR || $ENV{IS_MAINTAINER};
145}
146
147sub check_broken_extratests {
148 return unless is_maintainer();
149
150 if ( exists $Module::Install::ExtraTests::{VERSION} && Module::Install::ExtraTests->VERSION < 0.007 ) {
151 print STDERR <<'EOR';
152You have a broken version of Module::Install::ExtraTests installed.
153Please upgrade to version 0.007 or newer and re-run Makefile.PL
154EOR
155 exit 0;
156 }
157}