Login
a6648c698c0779e18536d6a9f0485ecfbb67fddd
[gknop/Perl-Critic.git] / Build.PL
1 #######################################################################
2 #      $URL$
3 #     $Date$
4 #   $Author$
5 # $Revision$
6 ########################################################################
7
8 BEGIN {
9     use 5.006001;
10 }
11
12 use strict;
13 use warnings;
14
15 use lib 'inc';
16 use lib 't/tlib';
17
18 use Module::Build;
19
20 use Perl::Critic::BuildUtilities qw<
21     recommended_module_versions
22     test_wrappers_to_generate
23     get_PL_files
24     dump_unlisted_or_optional_module_versions
25     emit_tar_warning_if_necessary
26 >;
27
28 emit_tar_warning_if_necessary();
29
30
31 my $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
56 END_SUBCLASS
57
58 my $builder = $class->new(
59     module_name     => 'Perl::Critic',
60     dist_author     => 'Jeffrey Thalhammer <thaljef@cpan.org>',
61     dist_abstract   => 'Critique Perl source code for best-practices.',
62     license         => 'perl',
63
64     requires        => {
65         'B::Keywords'               => 1.05,
66         'Carp'                      => 0,
67         'Config::Tiny'              => 2,
68         'English'                   => 0,
69         'Exception::Class'          => 1.23,
70         'File::Basename'            => 0,
71         'File::Find'                => 0,
72         'File::Path'                => 0,
73         'File::Spec'                => 0,
74         'File::Spec::Unix'          => 0,
75         'File::Temp'                => 0,
76         'Getopt::Long'              => 0,
77         'IO::String'                => 0,
78         'List::MoreUtils'           => 0,
79         'List::Util'                => 0,
80         'Module::Pluggable'         => 3.1,
81         'PPI'                       => 1.203,
82         'PPI::Document'             => 1.203,
83         'PPI::Document::File'       => 1.203,
84         'PPI::Node'                 => 1.203,
85         'PPI::Token::Quote::Single' => 1.203,
86         'PPI::Token::Whitespace'    => 1.203,
87         'Pod::PlainText'            => 0,
88         'Pod::Select'               => 0,
89         'Pod::Usage'                => 0,
90         'Readonly'                  => 1.03,
91         'Scalar::Util'              => 0,
92         'String::Format'            => 1.13,
93         'base'                      => 0,
94         'charnames'                 => 0,
95         'overload'                  => 0,
96         'strict'                    => 0,
97         'version'                   => 0,
98         'warnings'                  => 0,
99         'overload'                  => 0,
100         'strict'                    => 0,
101         'version'                   => 0,
102         'warnings'                  => 0,
103     },
104
105     recommends      => { recommended_module_versions() },
106
107     build_requires  => {
108         'lib'                       => 0,
109         'Test::More'                => 0,
110     },
111
112     PL_files        => get_PL_files(),
113
114     script_files    => ['bin/perlcritic'],
115
116     meta_merge      => {
117         resources   => {
118             homepage    => 'http://perlcritic.com',
119             license     => 'http://dev.perl.org/licenses/',
120             Repository  => 'http://perlcritic.tigris.org/svn/perlcritic/trunk/Perl-Critic/',
121             MailingList => 'http://perlcritic.tigris.org/servlets/SummarizeList?listName=users',
122         }
123     },
124
125     add_to_cleanup => [
126         qw<
127             MANIFEST.bak
128             Makefile
129             Makefile.old
130             lib/Perl/Critic/PolicySummary.pod
131             pm_to_blib
132             t/ControlStructures/ProhibitNegativeExpressionsInUnlessAndUntilConditions.run
133             t/Variables/RequireLocalizedPunctuationVars.run
134         >,
135         test_wrappers_to_generate(),
136     ],
137 );
138
139 $builder->create_build_script();
140
141 dump_unlisted_or_optional_module_versions();
142
143 ##############################################################################
144 # Local Variables:
145 #   mode: cperl
146 #   cperl-indent-level: 4
147 #   fill-column: 78
148 #   indent-tabs-mode: nil
149 #   c-indentation-style: bsd
150 # End:
151 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :