1Test::Dependencies(3) User Contributed Perl DocumentationTest::Dependencies(3)
2
3
4

NAME

6       Test::Dependencies - Ensure that the dependency listing is complete
7

VERSION

9       Version 0.23
10

SYNOPSIS

12       In your t/00-dependencies.t:
13
14           use CPAN::Meta;  # or CPAN::Meta::cpanfile
15           use File::Find::Rule::Perl;
16           use Test::Dependencies exclude =>
17             [qw/ Your::Namespace Some::Other::Namespace /];
18
19           my $meta = CPAN::Meta->load_file('META.yml');
20           die "No META.yml" if ! $meta;
21
22           my @files =
23              File::Find::Rule::Perl->perl_files->in('./lib', './bin');
24
25           ok_dependencies($meta, \@files);
26

DESCRIPTION

28       Makes sure that all of the modules that are 'use'd are listed in the
29       Makefile.PL as dependencies.
30

OPTIONS

32       DEPRECATED You can pass options to the module via the 'use' line.
33       These options will be moved to the ok_dependencies() function.  The
34       available options are:
35
36       exclude
37           Specifies the list of namespaces for which it is ok not to have
38           specified dependencies.
39
40       style
41           Specifies the style of module usage checking to use.  There are two
42           valid values: "light" and "heavy".  The default is heavy.  The
43           light style uses regular expressions to try and guess which modules
44           are required.  It is fast, but can get confused by here-docs,
45           multi-line strings, data sections, etc.  The heavy style actually
46           compiles the file and asks perl which modules were used.  It is
47           slower than the light style, but much more accurate.  If you have a
48           very large project and you don't want to wait for the heavy style
49           every time you run "make test," you might want to try the light
50           style or look into the overrides below.
51
52           Whether a style is specified or not, the style used can be
53           overridden by the environment variable TDSTYLE.  This is useful,
54           for example, if you want the heavy style to be used normally, but
55           don't want to take the time checking dependencies on your smoke
56           test server.
57
58           Example usage:
59
60             use Test::Dependencies
61               exclude => ['Test::Dependencies'],
62               style => 'light';
63

EXPORTED FUNCTIONS

65   ok_dependencies($meta, $files, $phases, $features, %options)
66        $meta is a CPAN::Meta object
67        $files is an arrayref with files to be scanned
68
69       %options keys
70
71       phases
72           This is an arrayref holding one or more names of phases as defined
73           by CPAN::Meta::Spec, or undef for all
74
75       features
76           This is an arrayref holding zero or more names of features, or
77           undef for all
78
79       ignores
80           This is a hashref listing the names of modules (and their sub-
81           namespaces) for which no errors are to be reported.
82
83   ok_dependencies()
84       Deprecated. Legacy invocation to be removed. In previous versions, this
85       function would scan the entire bin/, lib/ and t/ subtrees, with the
86       exception of a few sub-directories known to be used by version control
87       systems.
88
89       This behaviour has been changed: as of 0.20, Find::File::Rule::Perl is
90       being used to find Perl files (*.pl, *.pm, *.t and those starting with
91       a shebang line referring to perl).
92

AUTHORS

94       ·   Jesse Vincent "<jesse at bestpractical.com>"
95
96       ·   Alex Vandiver "<alexmv at bestpractical.com>"
97
98       ·   Zev Benjamin "<zev at cpan.org>"
99
100       ·   Erik Huelsmann "<ehuels at gmail.com>"
101

BUGS

103       ·   Test::Dependencies does not track module version requirements.
104
105       Please report any bugs or feature requests to "bug-test-dependencies at
106       rt.cpan.org", or through the web interface at
107       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Dependencies>.  I
108       will be notified, and then you'll automatically be notified of progress
109       on your bug as I make changes.
110

SUPPORT

112       You can find documentation for this module with the perldoc command.
113
114           perldoc Test::Dependencies
115
116       You can also look for information at:
117
118       ·   AnnoCPAN: Annotated CPAN documentation
119
120           <http://annocpan.org/dist/Test-Dependencies>
121
122       ·   CPAN Ratings
123
124           <http://cpanratings.perl.org/d/Test-Dependencies>
125
126       ·   RT: CPAN's request tracker
127
128           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Dependencies>
129
130       ·   Search CPAN
131
132           <http://search.cpan.org/dist/Test-Dependencies>
133
135           Copyright (c) 2016, Erik Huelsmann. All rights reserved.
136           Copyright (c) 2007, Best Practical Solutions, LLC. All rights reserved.
137
138           This module is free software; you can redistribute it and/or modify it
139           under the same terms as Perl itself. See perlartistic.
140
141           DISCLAIMER OF WARRANTY
142
143           BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
144           FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
145           OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
146           PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
147           EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
148           WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
149           ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
150           YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
151           NECESSARY SERVICING, REPAIR, OR CORRECTION.
152
153           IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
154           WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
155           REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE
156           TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR
157           CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
158           SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
159           RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
160           FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
161           SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
162           DAMAGES.
163
164
165
166perl v5.30.0                      2019-07-26             Test::Dependencies(3)
Impressum