Don't need to document MMC->superclasses
[gitmo/Moose.git] / xt / pod_coverage.t
CommitLineData
fcd84ca9 1#!/usr/bin/perl
2
3use strict;
4use warnings;
5
6use Test::More;
7
8eval "use Test::Pod::Coverage 1.04";
9plan 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.
13my @modules = all_modules();
14plan tests => scalar @modules;
15
16my %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
fcce13ba 24 superclasses
70bb0f97 25 )
26 ],
73f769fc 27 'Moose::Meta::Method' => ['throw_error'],
28 'Moose::Meta::Method::Accessor' => [
29 qw( generate_accessor_method
30 generate_accessor_method_inline
31 generate_clearer_method
32 generate_predicate_method
33 generate_reader_method
34 generate_reader_method_inline
35 generate_writer_method
36 generate_writer_method_inline
37 )
38 ],
cefc9e36 39 'Moose::Meta::Method::Constructor' => [
40 qw( attributes
cefc9e36 41 initialize_body
42 meta_instance
43 new
44 options
45 )
46 ],
bcb81995 47 'Moose::Meta::Method::Destructor' => [ 'initialize_body', 'options' ],
705d4cfd 48 'Moose::Meta::Role' => [
49 qw( alias_method
50 get_method_modifier_list
51 reset_package_cache_flag
52 update_package_cache_flag
53 wrap_method_body
54 )
55 ],
da5cc486 56 'Moose::Meta::Role::Composite' => ['add_method'],
57 'Moose::Role' => [
70bb0f97 58 qw( after
59 around
60 augment
61 before
62 extends
63 has
64 inner
65 make_immutable
66 override
67 super
68 with )
e2dab7af 69 ],
8a6c8c47 70 'Moose::Meta::TypeCoercion' => ['compile_type_coercion'],
2870fb09 71 'Moose::Meta::TypeCoercion::Union' => ['compile_type_coercion'],
e824c8e9 72 'Moose::Meta::TypeConstraint' => [ 'compile_type_constraint' ],
2870fb09 73 'Moose::Meta::TypeConstraint::Class' =>
74 [qw( equals is_a_type_of is_a_subtype_of )],
8a6c8c47 75 'Moose::Meta::TypeConstraint::Enum' =>
76 [qw( constraint equals )],
2c3bf4e7 77 'Moose::Meta::TypeConstraint::Parameterizable' => ['.+'],
78 'Moose::Meta::TypeConstraint::Parameterized' => ['.+'],
8a6c8c47 79 'Moose::Meta::TypeConstraint::Role' =>
80 [qw( equals is_a_type_of )],
2870fb09 81 'Moose::Meta::TypeConstraint::Union' => ['compile_type_constraint'],
2c3bf4e7 82 'Moose::Util' => ['add_method_modifier'],
8a6c8c47 83 'Moose::Util::TypeConstraints' => ['find_or_create_type_constraint'],
e2dab7af 84);
85
86for my $module ( sort @modules ) {
87 my $trustme = [];
88 if ( $trustme{$module} ) {
89 my $methods = join '|', @{ $trustme{$module} };
f37b8c3c 90 $trustme = [qr/^(?:$methods)$/];
e2dab7af 91 }
92
93 pod_coverage_ok(
94 $module, { trustme => $trustme },
95 "Pod coverage for $module"
96 );
97}