Login
Replace hand-coded module-hiding wrappers for tests with generated
[gknop/Perl-Critic.git] / inc / Perl / Critic / BuildUtilities.pm
CommitLineData
34cc6052
ES
1##############################################################################
2# $URL$
3# $Date$
4# $Author$
5# $Revision$
6##############################################################################
7
8package Perl::Critic::BuildUtilities;
9
10use strict;
11use warnings;
12
13our $VERSION = 1.071;
14
15use base qw{ Exporter };
16
17our @EXPORT_OK = qw{
18 &recommended_module_versions
19 &test_wrappers_to_generate
20};
21
22sub recommended_module_versions {
23 return (
24 'File::HomeDir' => 0,
25 'Perl::Tidy' => 0,
26
27 # All of these are for Documentation::PodSpelling
28 'File::Which' => 0,
29 'IPC::Open2' => 1,
30 'Pod::Spell' => 1,
31 'Text::ParseWords' => 3,
32 );
33}
34
35sub test_wrappers_to_generate {
36 my @tests_to_be_wrapped = qw{
37 t/00_modules.t
38 t/01_config.t
39 t/01_config_bad_perlcriticrc.t
40 t/02_policy.t
41 t/03_pragmas.t
42 t/04_defaults.t
43 t/05_utils.t
44 t/05_utils_ppi.t
45 t/06_violation.t
46 t/07_perlcritic.t
47 t/08_document.t
48 t/09_theme.t
49 t/10_userprofile.t
50 t/11_policyfactory.t
51 t/12_policylisting.t
52 t/13_bundled_policies.t
53 t/14_policy_parameters.t
54 t/15_statistics.t
55 t/20_policy_podspelling.t
56 t/20_policy_requiretidycode.t
57 t/80_policysummary.t
58 t/92_memory_leaks.t
59 t/94_includes.t
60 };
61
62 return
63 map
64 { $_ . '_without_optional_dependencies.t' }
65 @tests_to_be_wrapped;
66}
67
68
691;
70
71__END__
72
73=head1 NAME
74
75Perl::Critic::BuildUtilities - Common bits of compiling Perl::Critic.
76
77
78=head1 DESCRIPTION
79
80Various utilities used in assembling Perl::Critic, primary for use by
81*.PL programs that generate code.
82
83
84=head1 IMPORTABLE SUBROUTINES
85
86=over
87
88=item C<recommended_module_versions()>
89
90Returns a hash mapping between recommended (but not required) modules
91for Perl::Critic and the minimum version required of each module,
92
93
94=item C<test_wrappers_to_generate()>
95
96Returns a list of test wrappers to be generated by
97F<t/generate_without_optional_dependencies_wrappers.PL>.
98
99
100=back
101
102
103=head1 AUTHOR
104
105Elliot Shank C<< <perl@galumph.com> >>
106
107
108=head1 LICENCE AND COPYRIGHT
109
110Copyright (c) 2007, Elliot Shank C<< <perl@galumph.com> >>. All rights
111reserved.
112
113This program is free software; you can redistribute it and/or modify
114it under the same terms as Perl itself. The full text of this license
115can be found in the LICENSE file included with this module.
116
117=cut
118
119##############################################################################
120# Local Variables:
121# mode: cperl
122# cperl-indent-level: 4
123# fill-column: 78
124# indent-tabs-mode: nil
125# c-indentation-style: bsd
126# End:
127# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab :