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' ], |
70bb0f97 |
19 | 'Moose::Meta::Class' => [ |
20 | qw( check_metaclass_compatibility |
21 | construct_instance |
22 | create_error |
70bb0f97 |
23 | raise_error |
24 | ) |
25 | ], |
73f769fc |
26 | 'Moose::Meta::Method' => ['throw_error'], |
27 | 'Moose::Meta::Method::Accessor' => [ |
28 | qw( generate_accessor_method |
29 | generate_accessor_method_inline |
30 | generate_clearer_method |
31 | generate_predicate_method |
32 | generate_reader_method |
33 | generate_reader_method_inline |
34 | generate_writer_method |
35 | generate_writer_method_inline |
36 | ) |
37 | ], |
cefc9e36 |
38 | 'Moose::Meta::Method::Constructor' => [ |
39 | qw( attributes |
cefc9e36 |
40 | initialize_body |
41 | meta_instance |
42 | new |
43 | options |
44 | ) |
45 | ], |
bcb81995 |
46 | 'Moose::Meta::Method::Destructor' => [ 'initialize_body', 'options' ], |
705d4cfd |
47 | 'Moose::Meta::Role' => [ |
48 | qw( alias_method |
49 | get_method_modifier_list |
50 | reset_package_cache_flag |
51 | update_package_cache_flag |
52 | wrap_method_body |
53 | ) |
54 | ], |
da5cc486 |
55 | 'Moose::Meta::Role::Composite' => ['add_method'], |
56 | 'Moose::Role' => [ |
70bb0f97 |
57 | qw( after |
58 | around |
59 | augment |
60 | before |
61 | extends |
62 | has |
63 | inner |
64 | make_immutable |
65 | override |
66 | super |
67 | with ) |
e2dab7af |
68 | ], |
8a6c8c47 |
69 | 'Moose::Meta::TypeCoercion' => ['compile_type_coercion'], |
2870fb09 |
70 | 'Moose::Meta::TypeCoercion::Union' => ['compile_type_coercion'], |
cfd006f0 |
71 | 'Moose::Meta::TypeConstraint' => [ 'compile_type_constraint', 'union' ], |
2870fb09 |
72 | 'Moose::Meta::TypeConstraint::Class' => |
73 | [qw( equals is_a_type_of is_a_subtype_of )], |
8a6c8c47 |
74 | 'Moose::Meta::TypeConstraint::Enum' => |
75 | [qw( constraint equals )], |
2c3bf4e7 |
76 | 'Moose::Meta::TypeConstraint::Parameterizable' => ['.+'], |
77 | 'Moose::Meta::TypeConstraint::Parameterized' => ['.+'], |
8a6c8c47 |
78 | 'Moose::Meta::TypeConstraint::Role' => |
79 | [qw( equals is_a_type_of )], |
2870fb09 |
80 | 'Moose::Meta::TypeConstraint::Union' => ['compile_type_constraint'], |
2c3bf4e7 |
81 | 'Moose::Util' => ['add_method_modifier'], |
8a6c8c47 |
82 | 'Moose::Util::TypeConstraints' => ['find_or_create_type_constraint'], |
e2dab7af |
83 | ); |
84 | |
85 | for my $module ( sort @modules ) { |
86 | my $trustme = []; |
87 | if ( $trustme{$module} ) { |
88 | my $methods = join '|', @{ $trustme{$module} }; |
f37b8c3c |
89 | $trustme = [qr/^(?:$methods)$/]; |
e2dab7af |
90 | } |
91 | |
92 | pod_coverage_ok( |
93 | $module, { trustme => $trustme }, |
94 | "Pod coverage for $module" |
95 | ); |
96 | } |