Login
Change ProhibitMagicNumbers to allow constant subroutines.
[gknop/Perl-Critic.git] / Build.PL
CommitLineData
02b7b45d
JRT
1#######################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
6########################################################################
7
9f0edba9 8BEGIN {
0d512192 9 use 5.006001;
9f0edba9
ES
10}
11
59b05e08
JRT
12use strict;
13use warnings;
34cc6052
ES
14
15use lib 'inc';
496afbe0 16use lib 't/tlib';
34cc6052 17
59b05e08
JRT
18use Module::Build;
19
70f3f307
ES
20use Perl::Critic::BuildUtilities qw<
21 recommended_module_versions
22 test_wrappers_to_generate
496afbe0 23 get_PL_files
70f3f307 24 dump_unlisted_or_optional_module_versions
7963ad6d 25 emit_tar_warning_if_necessary
70f3f307 26>;
34cc6052 27
7963ad6d 28emit_tar_warning_if_necessary();
d1a97a75 29
0d512192
ES
30
31my $class = Module::Build->subclass( code => <<'END_SUBCLASS' );
32
33 sub ACTION_authortest {
34 my ($self) = @_;
35
36 $self->depends_on('build');
37 $self->depends_on('manifest');
38 $self->depends_on('distmeta');
39
40 $self->test_files( qw< t xt/author > );
41 $self->recursive_test_files(1);
42
43 $self->depends_on('test');
44
45 return;
46 } # end ACTION_authortest()
47
48 sub ACTION_distdir {
49 my ($self) = @_;
50
51 $self->depends_on('authortest');
52
53 return $self->SUPER::ACTION_distdir;
54 } # end ACTION_distdir
55
56END_SUBCLASS
57
58my $builder = $class->new(
3fff51e5
ES
59 module_name => 'Perl::Critic',
60 dist_author => 'Jeffrey Thalhammer <thaljef@cpan.org>',
211ac609 61 dist_abstract => 'Critique Perl source code for best-practices.',
3fff51e5
ES
62 license => 'perl',
63
64 requires => {
65 'B::Keywords' => 1.05,
66 'Config::Tiny' => 2,
67 'Exception::Class' => 1.23,
68 'File::Spec' => 0,
69 'File::Spec::Unix' => 0,
70 'IO::String' => 0,
71 'List::MoreUtils' => 0,
72 'List::Util' => 0,
73 'Module::Pluggable' => 3.1,
e087d6fb 74 'PPI' => 1.201,
3fff51e5 75 'Pod::PlainText' => 0,
211ac609 76 'Pod::Select' => 0,
3fff51e5
ES
77 'Pod::Usage' => 0,
78 'Readonly' => 1.03,
79 'Scalar::Util' => 0,
80 'String::Format' => 1.13,
267b39b4 81 'version' => 0,
3fff51e5
ES
82 },
83
84 recommends => { recommended_module_versions() },
85
86 build_requires => {
87 'Test::More' => 0,
88 },
89
90 PL_files => get_PL_files(),
91
92 script_files => ['bin/perlcritic'],
93
8cdd9cf7
ES
94 meta_merge => {
95 resources => {
96 homepage => 'http://perlcritic.com',
97 license => 'http://dev.perl.org/licenses/',
98 Repository => 'http://perlcritic.tigris.org/source/browse/perlcritic/',
99 MailingList => 'http://perlcritic.tigris.org/servlets/SummarizeList?listName=users',
100 }
101 },
102
3fff51e5
ES
103 add_to_cleanup => [
104 qw<
105 MANIFEST.bak
106 Makefile
107 Makefile.old
47e04892 108 lib/Perl/Critic/PolicySummary.pod
3fff51e5
ES
109 pm_to_blib
110 t/ControlStructures/ProhibitNegativeExpressionsInUnlessAndUntilConditions.run
47e04892 111 t/Variables/RequireLocalizedPunctuationVars.run
3fff51e5
ES
112 >,
113 test_wrappers_to_generate(),
114 ],
59b05e08
JRT
115);
116
117$builder->create_build_script();
c28a9e24 118
70f3f307
ES
119dump_unlisted_or_optional_module_versions();
120
c28a9e24
JRT
121##############################################################################
122# Local Variables:
123# mode: cperl
124# cperl-indent-level: 4
125# fill-column: 78
126# indent-tabs-mode: nil
127# c-indentation-style: bsd
128# End:
96fed375 129# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :