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'; |
f84e487d |
17 | requires 'Class::MOP' => '1.09'; |
40cb86f7 |
18 | requires 'Data::OptList' => '0'; |
19 | requires 'List::MoreUtils' => '0.12'; |
ec1ee84b |
20 | requires 'Package::DeprecationManager' => '0.04'; |
88e88a7b |
21 | requires 'Params::Util' => '0'; |
40cb86f7 |
22 | requires 'Scalar::Util' => '1.19'; |
23 | requires 'Sub::Exporter' => '0.980'; |
24 | requires 'Sub::Name' => '0'; |
25 | requires 'Task::Weaken' => '0'; |
26 | requires 'Try::Tiny' => '0.02'; |
25374f01 |
27 | |
87f55e33 |
28 | test_requires 'Test::More' => '0.88'; |
c0026a42 |
29 | test_requires 'Test::Exception' => '0.27'; |
4d438a84 |
30 | test_requires 'Test::Requires' => '0.05'; |
db90f764 |
31 | |
4dd99a55 |
32 | author_requires 'DateTime'; |
33 | author_requires 'DateTime::Calendar::Mayan'; |
34 | author_requires 'DateTime::Format::MySQL'; |
35 | author_requires 'Declare::Constraints::Simple'; |
36 | author_requires 'DBM::Deep'; |
2e503ae9 |
37 | author_requires 'File::Find::Rule'; |
4dd99a55 |
38 | author_requires 'HTTP::Headers'; |
39 | author_requires 'IO::File'; |
40 | author_requires 'IO::String'; |
41 | author_requires 'Locale::US'; |
2e503ae9 |
42 | author_requires 'Module::Info'; |
4dd99a55 |
43 | author_requires 'Module::Refresh'; |
44 | author_requires 'Params::Coerce'; |
45 | author_requires 'Regexp::Common'; |
46 | author_requires 'Test::Deep'; |
c7885929 |
47 | author_requires 'Test::Inline'; |
d68b5280 |
48 | author_requires 'Test::NoTabs'; |
c7885929 |
49 | author_requires 'Test::Output'; |
50 | author_requires 'Test::Pod::Coverage'; |
51 | author_requires 'Test::Spelling'; |
4dd99a55 |
52 | author_requires 'URI'; |
2e503ae9 |
53 | |
4ff140fe |
54 | if ( is_maintainer() ) { |
c3ad9761 |
55 | system( $^X, 'author/extract-inline-tests' ); |
de341d84 |
56 | } |
57 | |
6fb58c0d |
58 | tests_recursive(); |
29772efc |
59 | |
6ee1960e |
60 | repository 'git://git.moose.perl.org/Moose.git'; |
f0374fd6 |
61 | add_metadata(x_authority => 'cpan:STEVAN'); |
6ee1960e |
62 | |
73885d7d |
63 | extra_tests(); |
64 | |
db90f764 |
65 | WriteAll(); |
66 | |
f967037b |
67 | # Use the xt/author/test-my-dependents.t test to figure |
68 | # out what on CPAN will break with the latest Moose, then update this |
69 | # before a release. |
70 | sub check_conflicts { |
71 | my %conflicts = ( |
69fdd97d |
72 | 'Catalyst' => '5.80028', |
f967037b |
73 | 'Devel::REPL' => '1.003008', |
4df593bb |
74 | 'Fey' => '0.36', |
173cb840 |
75 | 'Fey::ORM' => '0.34', |
f967037b |
76 | 'File::ChangeNotify' => '0.15', |
77 | 'KiokuDB' => '0.41', |
64d27dc3 |
78 | 'Markdent' => '0.16', |
f967037b |
79 | 'MooseX::Aliases' => '0.07', |
80 | 'MooseX::AlwaysCoerce' => '0.05', |
81 | 'MooseX::AttributeHelpers' => '0.22', |
82 | 'MooseX::AttributeInflate' => '0.02', |
83 | 'MooseX::Attribute::Prototype' => '0.10', |
325e94a3 |
84 | 'MooseX::ClassAttribute' => '0.16', |
f967037b |
85 | 'MooseX::FollowPBP' => '0.02', |
86 | 'MooseX::HasDefaults' => '0.02', |
87 | 'MooseX::InstanceTracking' => '0.04', |
88 | 'MooseX::LazyRequire' => '0.05', |
89 | 'MooseX::MethodAttributes' => '0.22', |
5171f2e1 |
90 | 'MooseX::NonMoose' => '0.15', |
f967037b |
91 | 'MooseX::Params::Validate' => '0.05', |
92 | 'MooseX::POE' => '0.205', |
93 | 'MooseX::Role::Cmd' => '0.06', |
94 | 'MooseX::Role::WithOverloading' => '0.07', |
95 | 'MooseX::SemiAffordanceAccessor' => '0.05', |
96 | 'MooseX::Singleton' => '0.24', |
97 | 'MooseX::StrictConstructor' => '0.08', |
98 | 'MooseX::Types' => '0.19', |
99 | 'MooseX::UndefTolerant' => '0.04', |
100 | 'namespace::autoclean' => '0.08', |
101 | 'Pod::Elemental' => '0.093280', |
102 | ); |
103 | |
104 | my $found = 0; |
105 | for my $mod ( sort keys %conflicts ) { |
106 | eval "require $mod"; |
107 | next if $@; |
108 | |
109 | my $installed = $mod->VERSION(); |
110 | if ( $installed le $conflicts{$mod} ) { |
111 | |
112 | print <<"EOF"; |
113 | |
114 | *** |
115 | This version of Moose conflicts with the version of |
116 | $mod ($installed) you have installed. |
117 | |
118 | You will need to upgrade $mod after installing |
119 | this version of Moose. |
120 | *** |
121 | |
122 | EOF |
123 | |
124 | $found = 1; |
125 | } |
126 | } |
127 | |
128 | return unless $found; |
129 | |
130 | # More or less copied from Module::Build |
131 | return if $ENV{PERL_MM_USE_DEFAULT}; |
132 | return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); |
133 | |
134 | sleep 4; |
135 | } |
136 | |
4ff140fe |
137 | sub is_maintainer { |
138 | return $Module::Install::AUTHOR || $ENV{IS_MAINTAINER}; |
139 | } |
140 | |
141 | sub check_broken_extratests { |
142 | return unless is_maintainer(); |
143 | |
144 | if ( exists $Module::Install::ExtraTests::{VERSION} && Module::Install::ExtraTests->VERSION < 0.007 ) { |
145 | print STDERR <<'EOR'; |
146 | You have a broken version of Module::Install::ExtraTests installed. |
147 | Please upgrade to version 0.007 or newer and re-run Makefile.PL |
148 | EOR |
149 | exit 0; |
150 | } |
151 | } |