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