Login
Initial P::C::Utils::POD implementation.
[gknop/Perl-Critic.git] / Build.PL
CommitLineData
02b7b45d
JRT
1#######################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
6########################################################################
7
9f0edba9
ES
8BEGIN {
9 require 5.006001;
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
d1a97a75 28my $warning = <<'END_WARNING';
d06bd3e7 29
a4141f24
JRT
30###################################################
31# NOTICE! NOTICE! NOTICE! NOTICE! NOTICE! NOTICE! #
32#-------------------------------------------------#
33# In this version of Perl::Critic, some of #
34# the Policy modules have been renamed to better #
35# better reflect the intent of the Policy. If #
36# you have an older version of Perl::Critic #
37# already installed, it will cause many of the #
38# tests to fail and the new version will not work #
39# properly. #
40# #
41# I strongly advise you to remove the current #
42# version of Perl::Critic before proceeding with #
43# this installation. In most cases, this can be #
44# done by deleting everything below the #
45# Perl/Critic/Policy directory in your site_perl #
46# location. #
47# #
48# Also, if you have created a .perlcriticrc file, #
49# you will need to update it to match the new #
50# Policy module names. #
51# #
52# Sorry for the inconvenience. #
53# #
54# -Jeff <thaljef@cpan.org> #
55###################################################
d06bd3e7 56
a4141f24
JRT
57END_WARNING
58
d1a97a75
JRT
59
60eval {
61 require Perl::Critic;
62 warn $warning if $Perl::Critic::VERSION < 0.14;
63};
64
7963ad6d 65emit_tar_warning_if_necessary();
d1a97a75 66
59b05e08 67my $builder = Module::Build->new(
3fff51e5
ES
68 module_name => 'Perl::Critic',
69 dist_author => 'Jeffrey Thalhammer <thaljef@cpan.org>',
211ac609 70 dist_abstract => 'Critique Perl source code for best-practices.',
3fff51e5
ES
71 license => 'perl',
72
73 requires => {
74 'B::Keywords' => 1.05,
75 'Config::Tiny' => 2,
76 'Exception::Class' => 1.23,
77 'File::Spec' => 0,
78 'File::Spec::Unix' => 0,
79 'IO::String' => 0,
80 'List::MoreUtils' => 0,
81 'List::Util' => 0,
82 'Module::Pluggable' => 3.1,
e087d6fb 83 'PPI' => 1.201,
3fff51e5 84 'Pod::PlainText' => 0,
211ac609 85 'Pod::Select' => 0,
3fff51e5
ES
86 'Pod::Usage' => 0,
87 'Readonly' => 1.03,
88 'Scalar::Util' => 0,
89 'String::Format' => 1.13,
267b39b4 90 'version' => 0,
3fff51e5
ES
91 },
92
93 recommends => { recommended_module_versions() },
94
95 build_requires => {
96 'Test::More' => 0,
97 },
98
99 PL_files => get_PL_files(),
100
101 script_files => ['bin/perlcritic'],
102
8cdd9cf7
ES
103 meta_merge => {
104 resources => {
105 homepage => 'http://perlcritic.com',
106 license => 'http://dev.perl.org/licenses/',
107 Repository => 'http://perlcritic.tigris.org/source/browse/perlcritic/',
108 MailingList => 'http://perlcritic.tigris.org/servlets/SummarizeList?listName=users',
109 }
110 },
111
3fff51e5
ES
112 add_to_cleanup => [
113 qw<
114 MANIFEST.bak
115 Makefile
116 Makefile.old
117 pm_to_blib
118 t/ControlStructures/ProhibitNegativeExpressionsInUnlessAndUntilConditions.run
119 >,
120 test_wrappers_to_generate(),
121 ],
59b05e08
JRT
122);
123
124$builder->create_build_script();
c28a9e24 125
70f3f307
ES
126dump_unlisted_or_optional_module_versions();
127
c28a9e24
JRT
128##############################################################################
129# Local Variables:
130# mode: cperl
131# cperl-indent-level: 4
132# fill-column: 78
133# indent-tabs-mode: nil
134# c-indentation-style: bsd
135# End:
96fed375 136# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :