Commit | Line | Data |
fcd84ca9 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More; |
7 | |
8 | eval "use Test::Pod::Coverage 1.04"; |
9 | plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; |
10 | |
e2dab7af |
11 | # This is a stripped down version of all_pod_coverage_ok which lets us |
12 | # vary the trustme parameter per module. |
13 | my @modules = all_modules(); |
14 | plan tests => scalar @modules; |
15 | |
16 | my %trustme = ( |
93a708fd |
17 | 'Moose' => ['make_immutable'], |
18 | 'Moose::Meta::Attribute' => [ 'interpolate_class', 'throw_error' ], |
e2dab7af |
19 | 'Moose::Meta::Method::Constructor' => |
20 | [qw( initialize_body intialize_body)], |
21 | 'Moose::Meta::Method::Destructor' => ['initialize_body'], |
22 | 'Moose::Role' => [ |
23 | qw( after around augment before extends has inner make_immutable override super with ) |
24 | ], |
25 | ); |
26 | |
27 | for my $module ( sort @modules ) { |
28 | my $trustme = []; |
29 | if ( $trustme{$module} ) { |
30 | my $methods = join '|', @{ $trustme{$module} }; |
f37b8c3c |
31 | $trustme = [qr/^(?:$methods)$/]; |
e2dab7af |
32 | } |
33 | |
34 | pod_coverage_ok( |
35 | $module, { trustme => $trustme }, |
36 | "Pod coverage for $module" |
37 | ); |
38 | } |