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'; |
748de9dd |
17 | requires 'Class::MOP' => '1.11'; |
40cb86f7 |
18 | requires 'Data::OptList' => '0'; |
19 | requires 'List::MoreUtils' => '0.12'; |
174ff38e |
20 | requires 'Package::DeprecationManager' => '0.10'; |
524f93f4 |
21 | requires 'Params::Util' => '1.00'; |
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 | |
478b11a9 |
28 | test_requires 'Test::More' => '0.88'; |
29 | test_requires 'Test::Fatal' => '0.001'; |
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'; |
ba796e8b |
61 | add_metadata( x_authority => 'cpan:STEVAN' ); |
62 | add_metadata( |
63 | no_index => { |
64 | files => ['lib/Moose/Meta/Method/Accessor/Native.pm'], |
65 | directory => ['lib/Moose/Meta/Method/Accessor/Native'], |
66 | } |
67 | ); |
6ee1960e |
68 | |
73885d7d |
69 | extra_tests(); |
70 | |
db90f764 |
71 | WriteAll(); |
72 | |
f967037b |
73 | # Use the xt/author/test-my-dependents.t test to figure |
74 | # out what on CPAN will break with the latest Moose, then update this |
75 | # before a release. |
76 | sub check_conflicts { |
77 | my %conflicts = ( |
69fdd97d |
78 | 'Catalyst' => '5.80028', |
f967037b |
79 | 'Devel::REPL' => '1.003008', |
4df593bb |
80 | 'Fey' => '0.36', |
173cb840 |
81 | 'Fey::ORM' => '0.34', |
f967037b |
82 | 'File::ChangeNotify' => '0.15', |
259b8c5a |
83 | 'KiokuDB' => '0.49', |
64d27dc3 |
84 | 'Markdent' => '0.16', |
f967037b |
85 | 'MooseX::Aliases' => '0.07', |
86 | 'MooseX::AlwaysCoerce' => '0.05', |
87 | 'MooseX::AttributeHelpers' => '0.22', |
88 | 'MooseX::AttributeInflate' => '0.02', |
89 | 'MooseX::Attribute::Prototype' => '0.10', |
52e9d89e |
90 | 'MooseX::ClassAttribute' => '0.17', |
f967037b |
91 | 'MooseX::FollowPBP' => '0.02', |
92 | 'MooseX::HasDefaults' => '0.02', |
93 | 'MooseX::InstanceTracking' => '0.04', |
94 | 'MooseX::LazyRequire' => '0.05', |
95 | 'MooseX::MethodAttributes' => '0.22', |
5171f2e1 |
96 | 'MooseX::NonMoose' => '0.15', |
f967037b |
97 | 'MooseX::Params::Validate' => '0.05', |
98 | 'MooseX::POE' => '0.205', |
99 | 'MooseX::Role::Cmd' => '0.06', |
100 | 'MooseX::Role::WithOverloading' => '0.07', |
101 | 'MooseX::SemiAffordanceAccessor' => '0.05', |
102 | 'MooseX::Singleton' => '0.24', |
103 | 'MooseX::StrictConstructor' => '0.08', |
104 | 'MooseX::Types' => '0.19', |
105 | 'MooseX::UndefTolerant' => '0.04', |
106 | 'namespace::autoclean' => '0.08', |
107 | 'Pod::Elemental' => '0.093280', |
108 | ); |
109 | |
110 | my $found = 0; |
111 | for my $mod ( sort keys %conflicts ) { |
112 | eval "require $mod"; |
113 | next if $@; |
114 | |
115 | my $installed = $mod->VERSION(); |
116 | if ( $installed le $conflicts{$mod} ) { |
117 | |
118 | print <<"EOF"; |
119 | |
120 | *** |
121 | This version of Moose conflicts with the version of |
122 | $mod ($installed) you have installed. |
123 | |
124 | You will need to upgrade $mod after installing |
125 | this version of Moose. |
126 | *** |
127 | |
128 | EOF |
129 | |
130 | $found = 1; |
131 | } |
132 | } |
133 | |
134 | return unless $found; |
135 | |
136 | # More or less copied from Module::Build |
137 | return if $ENV{PERL_MM_USE_DEFAULT}; |
138 | return unless -t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)); |
139 | |
140 | sleep 4; |
141 | } |
142 | |
4ff140fe |
143 | sub is_maintainer { |
144 | return $Module::Install::AUTHOR || $ENV{IS_MAINTAINER}; |
145 | } |
146 | |
147 | sub check_broken_extratests { |
148 | return unless is_maintainer(); |
149 | |
150 | if ( exists $Module::Install::ExtraTests::{VERSION} && Module::Install::ExtraTests->VERSION < 0.007 ) { |
151 | print STDERR <<'EOR'; |
152 | You have a broken version of Module::Install::ExtraTests installed. |
153 | Please upgrade to version 0.007 or newer and re-run Makefile.PL |
154 | EOR |
155 | exit 0; |
156 | } |
157 | } |