remove perl requires, fix to use correct M::I syntax
[gitmo/Moose.git] / Makefile.PL
CommitLineData
db90f764 1use strict;
2use warnings;
47b19570 3use inc::Module::Install;
9dab3c32 4use 5.008;
db90f764 5
0161e7d4 6check_conflicts();
7
db90f764 8name 'Moose';
9dab3c32 9perl_version '5.008';
db90f764 10all_from 'lib/Moose.pm';
11license 'perl';
12
db90f764 13# prereqs
23f46d73 14requires 'Scalar::Util' => '1.19';
db90f764 15requires 'Carp';
c13a345b 16requires 'Class::MOP' => '0.75';
e8d6f353 17requires 'List::MoreUtils' => '0.12';
c373cc5c 18requires 'Sub::Exporter' => '0.972';
477f1f61 19requires 'Task::Weaken' => '0';
25374f01 20
21# only used by oose.pm, not Moose.pm :P
22requires 'Filter::Simple' => '0';
db90f764 23
24# things the tests need
9453df8f 25build_requires 'Test::More' => '0.77';
db90f764 26build_requires 'Test::Exception' => '0.21';
27build_requires 'Test::LongString';
28
6fb58c0d 29tests_recursive();
29772efc 30
db90f764 31WriteAll();
32
0161e7d4 33# Use the cpan-smolder-stable script in the Moose svn root to figure
34# out what on CPAN will break with the latest Moose, then update this
35# before a release.
36sub check_conflicts {
37 my %conflicts = (
74a90eea 38 'MooseX::Singleton' => '0.12',
0161e7d4 39 'MooseX::Params::Validate' => '0.05',
74a90eea 40 'Fey::ORM' => '0.12',
0161e7d4 41 );
42
43 my $found = 0;
44 for my $mod ( sort keys %conflicts ) {
45 eval "require $mod";
46 next if $@;
47
48 my $installed = $mod->VERSION();
49 if ( $installed le $conflicts{$mod} ) {
50
51 print <<"EOF";
52
53***
54 This version of Moose conflicts with the version of
55 $mod ($installed) you have installed.
56
57 You will need to upgrade $mod after installing
58 this version of Moose.
59***
60
61EOF
62
63 $found = 1;
64 }
65 }
66
7aaa2004 67 return unless $found;
68
0161e7d4 69 # More or less copied from Module::Build
70 return if $ENV{PERL_MM_USE_DEFAULT};
71 return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
72
7aaa2004 73 sleep 4;
0161e7d4 74}