We also need to explicitly ignore meta when applying a role to a class
[gitmo/Moose.git] / Makefile.PL
CommitLineData
db90f764 1use strict;
2use warnings;
47b19570 3use inc::Module::Install;
4a8035cf 4use 5.008001;
db90f764 5
0161e7d4 6check_conflicts();
7
db90f764 8name 'Moose';
4a8035cf 9perl_version '5.008001';
db90f764 10all_from 'lib/Moose.pm';
11license 'perl';
12
db90f764 13requires 'Carp';
88c6f7d8 14requires 'Class::MOP' => '0.93';
6a461fc0 15requires 'Data::OptList' => '0';
e8d6f353 16requires 'List::MoreUtils' => '0.12';
6a461fc0 17requires 'Scalar::Util' => '1.19';
091ac4b7 18requires 'Sub::Exporter' => '0.980';
9f2230e9 19requires 'Sub::Name' => '0';
6a461fc0 20requires 'Task::Weaken' => '0';
6c01c148 21requires 'Try::Tiny' => '0.02';
25374f01 22
87f55e33 23test_requires 'Test::More' => '0.88';
c0026a42 24test_requires 'Test::Exception' => '0.27';
db90f764 25
de341d84 26if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) {
c3ad9761 27 system( $^X, 'author/extract-inline-tests' );
de341d84 28}
29
c93fa627 30extra_tests();
6fb58c0d 31tests_recursive();
29772efc 32
db90f764 33WriteAll();
34
0161e7d4 35# Use the cpan-smolder-stable script in the Moose svn root to figure
36# out what on CPAN will break with the latest Moose, then update this
37# before a release.
38sub check_conflicts {
39 my %conflicts = (
c5d71e53 40 'MooseX::AttributeHelpers' => '0.21',
e7e33216 41 'MooseX::ClassAttribute' => '0.09',
60dcd0cf 42 'MooseX::Singleton' => '0.19',
22161b6c 43 'MooseX::StrictConstructor' => '0.07',
44 'MooseX::Params::Validate' => '0.05',
ecba226c 45 'Fey::ORM' => '0.23',
82e3badf 46 'MooseX::Types' => '0.19',
0161e7d4 47 );
48
49 my $found = 0;
50 for my $mod ( sort keys %conflicts ) {
51 eval "require $mod";
52 next if $@;
53
54 my $installed = $mod->VERSION();
55 if ( $installed le $conflicts{$mod} ) {
56
57 print <<"EOF";
58
59***
60 This version of Moose conflicts with the version of
61 $mod ($installed) you have installed.
62
63 You will need to upgrade $mod after installing
64 this version of Moose.
65***
66
67EOF
68
69 $found = 1;
70 }
71 }
72
7aaa2004 73 return unless $found;
74
0161e7d4 75 # More or less copied from Module::Build
76 return if $ENV{PERL_MM_USE_DEFAULT};
77 return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
78
7aaa2004 79 sleep 4;
0161e7d4 80}