Login
Now that we have ProhibitUselessNoCritic, we can
[gknop/Perl-Critic.git] / Build.PL
CommitLineData
02b7b45d
JRT
1#######################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
6########################################################################
7
df6dee2b 8use 5.006001;
28b5f630 9
59b05e08
JRT
10use strict;
11use warnings;
34cc6052
ES
12
13use lib 'inc';
496afbe0 14use lib 't/tlib';
34cc6052 15
59b05e08
JRT
16use Module::Build;
17
70f3f307
ES
18use Perl::Critic::BuildUtilities qw<
19 recommended_module_versions
20 test_wrappers_to_generate
496afbe0 21 get_PL_files
70f3f307 22 dump_unlisted_or_optional_module_versions
7963ad6d 23 emit_tar_warning_if_necessary
70f3f307 24>;
34cc6052 25
7963ad6d 26emit_tar_warning_if_necessary();
d1a97a75 27
0d512192
ES
28
29my $class = Module::Build->subclass( code => <<'END_SUBCLASS' );
30
aae3164b
ES
31 sub ACTION_test {
32 my ($self) = @_;
33
34 $self->depends_on('manifest');
35
36 return $self->SUPER::ACTION_test();
23d215c8 37 }
aae3164b 38
0d512192
ES
39 sub ACTION_authortest {
40 my ($self) = @_;
41
42 $self->depends_on('build');
43 $self->depends_on('manifest');
44 $self->depends_on('distmeta');
45
46 $self->test_files( qw< t xt/author > );
47 $self->recursive_test_files(1);
48
49 $self->depends_on('test');
50
51 return;
23d215c8 52 }
0d512192
ES
53
54 sub ACTION_distdir {
55 my ($self) = @_;
56
57 $self->depends_on('authortest');
58
aae3164b 59 return $self->SUPER::ACTION_distdir();
23d215c8 60 }
0d512192
ES
61
62END_SUBCLASS
63
64my $builder = $class->new(
5a4b3810
ES
65 module_name => 'Perl::Critic',
66 dist_author => 'Jeffrey Thalhammer <thaljef@cpan.org>',
67 dist_abstract => 'Critique Perl source code for best-practices.',
68 license => 'perl',
aae3164b
ES
69 dynamic_config => 1,
70 create_readme => 1,
71 create_packlist => 1,
72 sign => 0,
5a4b3810
ES
73
74 requires => {
75 'B::Keywords' => 1.05,
76 'Carp' => 0,
77 'Config::Tiny' => 2,
78 'English' => 0,
79 'Exception::Class' => 1.23,
eb6e0777 80 'Exporter' => 0,
5a4b3810
ES
81 'File::Basename' => 0,
82 'File::Find' => 0,
83 'File::Path' => 0,
84 'File::Spec' => 0,
85 'File::Spec::Unix' => 0,
86 'File::Temp' => 0,
87 'Getopt::Long' => 0,
88 'IO::String' => 0,
89 'List::MoreUtils' => 0,
90 'List::Util' => 0,
91 'Module::Pluggable' => 3.1,
5ee81b1b
ES
92 'PPI' => 1.203,
93 'PPI::Document' => 1.203,
94 'PPI::Document::File' => 1.203,
95 'PPI::Node' => 1.203,
96 'PPI::Token::Quote::Single' => 1.203,
97 'PPI::Token::Whitespace' => 1.203,
5a4b3810
ES
98 'Pod::PlainText' => 0,
99 'Pod::Select' => 0,
100 'Pod::Usage' => 0,
101 'Readonly' => 1.03,
102 'Scalar::Util' => 0,
103 'String::Format' => 1.13,
104 'base' => 0,
105 'charnames' => 0,
106 'overload' => 0,
107 'strict' => 0,
108 'version' => 0,
109 'warnings' => 0,
110 'overload' => 0,
111 'strict' => 0,
112 'version' => 0,
113 'warnings' => 0,
3fff51e5
ES
114 },
115
5a4b3810 116 recommends => { recommended_module_versions() },
3fff51e5 117
5a4b3810
ES
118 build_requires => {
119 'lib' => 0,
120 'Test::More' => 0,
3fff51e5
ES
121 },
122
5a4b3810 123 PL_files => get_PL_files(),
3fff51e5 124
5a4b3810 125 script_files => ['bin/perlcritic'],
3fff51e5 126
5a4b3810 127 meta_merge => {
8cdd9cf7
ES
128 resources => {
129 homepage => 'http://perlcritic.com',
130 license => 'http://dev.perl.org/licenses/',
3c2400cb 131 Repository => 'http://guest@perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/',
8cdd9cf7 132 MailingList => 'http://perlcritic.tigris.org/servlets/SummarizeList?listName=users',
2859c298
ES
133 },
134 no_index => {
135 file => [
136 qw<
137 TODO.pod
138 lib/Perl/Critic/PolicySummary.pod.PL
139 >
140 ],
141 directory => [
142 qw<
143 doc
c0e4beb0 144 xt
2859c298
ES
145 >
146 ],
147 },
8cdd9cf7
ES
148 },
149
3fff51e5
ES
150 add_to_cleanup => [
151 qw<
f38f7a45 152 Debian_CPANTS.txt
3fff51e5
ES
153 Makefile
154 Makefile.old
aae3164b
ES
155 MANIFEST
156 MANIFEST.bak
157 META.yml
3fff51e5 158 pm_to_blib
aae3164b 159 README
3fff51e5 160 >,
d33d2185 161 values %{ get_PL_files() },
3fff51e5
ES
162 test_wrappers_to_generate(),
163 ],
59b05e08
JRT
164);
165
166$builder->create_build_script();
c28a9e24 167
70f3f307
ES
168dump_unlisted_or_optional_module_versions();
169
c28a9e24
JRT
170##############################################################################
171# Local Variables:
172# mode: cperl
173# cperl-indent-level: 4
174# fill-column: 78
175# indent-tabs-mode: nil
176# c-indentation-style: bsd
177# End:
96fed375 178# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :