Commit | Line | Data |
db90f764 |
1 | use strict; |
2 | use warnings; |
f0374fd6 |
3 | use inc::Module::Install 0.98; |
2e503ae9 |
4 | use Module::Install::AuthorRequires; |
3be21337 |
5 | use Module::Install::ExtraTests; |
962d7364 |
6 | use 5.008003; |
db90f764 |
7 | |
4ff140fe |
8 | check_broken_extratests(); |
f967037b |
9 | check_conflicts(); |
0161e7d4 |
10 | |
db90f764 |
11 | name 'Moose'; |
962d7364 |
12 | perl_version '5.008003'; |
db90f764 |
13 | all_from 'lib/Moose.pm'; |
14 | license 'perl'; |
15 | |
db90f764 |
16 | requires 'Carp'; |
40e7fd16 |
17 | requires 'Class::MOP' => '1.05'; |
40cb86f7 |
18 | requires 'Data::OptList' => '0'; |
19 | requires 'List::MoreUtils' => '0.12'; |
ec1ee84b |
20 | requires 'Package::DeprecationManager' => '0.04'; |
40cb86f7 |
21 | requires 'Scalar::Util' => '1.19'; |
22 | requires 'Sub::Exporter' => '0.980'; |
23 | requires 'Sub::Name' => '0'; |
24 | requires 'Task::Weaken' => '0'; |
25 | requires 'Try::Tiny' => '0.02'; |
25374f01 |
26 | |
87f55e33 |
27 | test_requires 'Test::More' => '0.88'; |
c0026a42 |
28 | test_requires 'Test::Exception' => '0.27'; |
4d438a84 |
29 | test_requires 'Test::Requires' => '0.05'; |
db90f764 |
30 | |
2e503ae9 |
31 | author_requires 'File::Find::Rule'; |
32 | author_requires 'Module::Info'; |
c7885929 |
33 | author_requires 'Test::Inline'; |
d68b5280 |
34 | author_requires 'Test::NoTabs'; |
c7885929 |
35 | author_requires 'Test::Output'; |
36 | author_requires 'Test::Pod::Coverage'; |
37 | author_requires 'Test::Spelling'; |
2e503ae9 |
38 | |
4ff140fe |
39 | if ( is_maintainer() ) { |
c3ad9761 |
40 | system( $^X, 'author/extract-inline-tests' ); |
de341d84 |
41 | } |
42 | |
6fb58c0d |
43 | tests_recursive(); |
29772efc |
44 | |
6ee1960e |
45 | repository 'git://git.moose.perl.org/Moose.git'; |
f0374fd6 |
46 | add_metadata(x_authority => 'cpan:STEVAN'); |
6ee1960e |
47 | |
73885d7d |
48 | extra_tests(); |
49 | |
db90f764 |
50 | WriteAll(); |
51 | |
f967037b |
52 | # Use the xt/author/test-my-dependents.t test to figure |
53 | # out what on CPAN will break with the latest Moose, then update this |
54 | # before a release. |
55 | sub check_conflicts { |
56 | my %conflicts = ( |
57 | 'Catalyst' => '5.80017', |
58 | 'Devel::REPL' => '1.003008', |
59 | 'Fey::ORM' => '0.23', |
60 | 'File::ChangeNotify' => '0.15', |
61 | 'KiokuDB' => '0.41', |
62 | 'MooseX::Aliases' => '0.07', |
63 | 'MooseX::AlwaysCoerce' => '0.05', |
64 | 'MooseX::AttributeHelpers' => '0.22', |
65 | 'MooseX::AttributeInflate' => '0.02', |
66 | 'MooseX::Attribute::Prototype' => '0.10', |
67 | 'MooseX::ClassAttribute' => '0.13', |
68 | 'MooseX::FollowPBP' => '0.02', |
69 | 'MooseX::HasDefaults' => '0.02', |
70 | 'MooseX::InstanceTracking' => '0.04', |
71 | 'MooseX::LazyRequire' => '0.05', |
72 | 'MooseX::MethodAttributes' => '0.22', |
73 | 'MooseX::NonMoose' => '0.13', |
74 | 'MooseX::Params::Validate' => '0.05', |
75 | 'MooseX::POE' => '0.205', |
76 | 'MooseX::Role::Cmd' => '0.06', |
77 | 'MooseX::Role::WithOverloading' => '0.07', |
78 | 'MooseX::SemiAffordanceAccessor' => '0.05', |
79 | 'MooseX::Singleton' => '0.24', |
80 | 'MooseX::StrictConstructor' => '0.08', |
81 | 'MooseX::Types' => '0.19', |
82 | 'MooseX::UndefTolerant' => '0.04', |
83 | 'namespace::autoclean' => '0.08', |
84 | 'Pod::Elemental' => '0.093280', |
85 | ); |
86 | |
87 | my $found = 0; |
88 | for my $mod ( sort keys %conflicts ) { |
89 | eval "require $mod"; |
90 | next if $@; |
91 | |
92 | my $installed = $mod->VERSION(); |
93 | if ( $installed le $conflicts{$mod} ) { |
94 | |
95 | print <<"EOF"; |
96 | |
97 | *** |
98 | This version of Moose conflicts with the version of |
99 | $mod ($installed) you have installed. |
100 | |
101 | You will need to upgrade $mod after installing |
102 | this version of Moose. |
103 | *** |
104 | |
105 | EOF |
106 | |
107 | $found = 1; |
108 | } |
109 | } |
110 | |
111 | return unless $found; |
112 | |
113 | # More or less copied from Module::Build |
114 | return if $ENV{PERL_MM_USE_DEFAULT}; |
115 | return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); |
116 | |
117 | sleep 4; |
118 | } |
119 | |
4ff140fe |
120 | sub is_maintainer { |
121 | return $Module::Install::AUTHOR || $ENV{IS_MAINTAINER}; |
122 | } |
123 | |
124 | sub check_broken_extratests { |
125 | return unless is_maintainer(); |
126 | |
127 | if ( exists $Module::Install::ExtraTests::{VERSION} && Module::Install::ExtraTests->VERSION < 0.007 ) { |
128 | print STDERR <<'EOR'; |
129 | You have a broken version of Module::Install::ExtraTests installed. |
130 | Please upgrade to version 0.007 or newer and re-run Makefile.PL |
131 | EOR |
132 | exit 0; |
133 | } |
134 | } |