Commit | Line | Data |
428975b0 |
1 | use warnings; |
2 | use strict; |
3 | |
13fb11fd |
4 | use Test::More; |
5 | |
fe143972 |
6 | use Pod::Coverage 0.19; |
7 | use Test::Pod::Coverage 1.04; |
13fb11fd |
8 | |
9 | my @modules = sort { $a cmp $b } ( Test::Pod::Coverage::all_modules() ); |
13fb11fd |
10 | |
11 | # Since this is about checking documentation, a little documentation |
12 | # of what this is doing might be in order... |
13 | # The exceptions structure below is a hash keyed by the module |
14 | # name. The value for each is a hash, which contains one or more |
15 | # (although currently more than one makes no sense) of the following |
16 | # things:- |
17 | # skip => a true value means this module is not checked |
18 | # ignore => array ref containing list of methods which |
19 | # do not need to be documented. |
20 | my $exceptions = { |
843a94b5 |
21 | 'SQL::Abstract' => { ignore => [qw( |
22 | belch |
23 | puke |
24 | DETECT_AUTOGENERATED_STRINGIFICATION |
25 | )]}, |
c54740ba |
26 | 'SQL::Abstract::Tree' => { ignore => [qw(BUILDARGS)] }, |
13fb11fd |
27 | 'SQL::Abstract::Test' => { skip => 1 }, |
72935ffc |
28 | 'DBIx::Class::Storage::Debug::PrettyPrint' => { skip => 1 }, |
13fb11fd |
29 | }; |
30 | |
31 | foreach my $module (@modules) { |
32 | SKIP: |
33 | { |
34 | skip "$module - No user visible methods", |
35 | 1 |
36 | if ( $exceptions->{$module}{skip} ); |
37 | |
38 | # build parms up from ignore list |
39 | my $parms = {}; |
40 | $parms->{trustme} = |
41 | [ map { qr/^$_$/ } @{ $exceptions->{$module}{ignore} } ] |
42 | if exists( $exceptions->{$module}{ignore} ); |
43 | |
44 | # run the test with the potentially modified parm set |
45 | pod_coverage_ok( $module, $parms, "$module POD coverage" ); |
46 | } |
47 | } |
10e6c946 |
48 | |
49 | done_testing; |