pTHX_ not pTHX,
[gitmo/Moose.git] / Makefile.PL
1 use strict;
2 use warnings;
3 use inc::Module::Install;
4 use 5.008001;
5
6 check_conflicts();
7
8 name 'Moose';
9 perl_version '5.008001';
10 all_from 'lib/Moose.pm';
11 license 'perl';
12
13 requires 'Scalar::Util'     => '1.19';
14 requires 'Carp';
15 requires 'Class::MOP'       => '0.77_01';
16 requires 'List::MoreUtils'  => '0.12';
17 requires 'Sub::Exporter'    => '0.972';
18 requires 'Task::Weaken'     => '0';
19
20 test_requires 'Test::More'      => '0.77';
21 test_requires 'Test::Exception' => '0.21';
22
23 if ( -d '.svn' || -d '.git' || $ENV{IS_MAINTAINER} ) {
24     system( $^X, 'author/extract-inline-tests' );
25 }
26
27 tests_recursive();
28
29 WriteAll();
30
31 # Use the cpan-smolder-stable script in the Moose svn root to figure
32 # out what on CPAN will break with the latest Moose, then update this
33 # before a release.
34 sub check_conflicts {
35     my %conflicts = (
36         'MooseX::Singleton'        => '0.12',
37         'MooseX::Params::Validate' => '0.05',
38         'Fey::ORM'                 => '0.12',
39         'MooseX::AttributeHelpers' => '0.14',
40     );
41
42     my $found = 0;
43     for my $mod ( sort keys %conflicts ) {
44         eval "require $mod";
45         next if $@;
46
47         my $installed = $mod->VERSION();
48         if ( $installed le $conflicts{$mod} ) {
49
50             print <<"EOF";
51
52 ***
53     This version of Moose conflicts with the version of
54     $mod ($installed) you have installed.
55
56     You will need to upgrade $mod after installing
57     this version of Moose.
58 ***
59
60 EOF
61
62             $found = 1;
63         }
64     }
65
66     return unless $found;
67
68     # More or less copied from Module::Build
69     return if  $ENV{PERL_MM_USE_DEFAULT};
70     return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT));
71
72     sleep 4;
73 }