Commit | Line | Data |
0fe5201a |
1 | use Test::More; |
2 | |
f09cd1d4 |
3 | eval "use Pod::Coverage 0.19"; |
4 | plan skip_all => 'Pod::Coverage 0.19 required' if $@; |
0fe5201a |
5 | eval "use Test::Pod::Coverage 1.04"; |
6 | plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@; |
f09cd1d4 |
7 | |
b20edc27 |
8 | plan skip_all => 'set TEST_POD to enable this test' |
9 | unless ($ENV{TEST_POD} || -e 'MANIFEST.SKIP'); |
0fe5201a |
10 | |
97fec99f |
11 | my @modules = sort { $a cmp $b } (Test::Pod::Coverage::all_modules()); |
7eb4ecc8 |
12 | plan tests => scalar(@modules); |
13 | |
9b83fccd |
14 | # Since this is about checking documentation, a little documentation |
15 | # of what this is doing might be in order... |
16 | # The exceptions structure below is a hash keyed by the module |
17 | # name. The value for each is a hash, which contains one or more |
18 | # (although currently more than one makes no sense) of the following |
19 | # things:- |
20 | # skip => a true value means this module is not checked |
21 | # ignore => array ref containing list of methods which |
22 | # do not need to be documented. |
7eb4ecc8 |
23 | my $exceptions = { |
24 | 'DBIx::Class' => { |
25 | ignore => [ |
26 | qw/MODIFY_CODE_ATTRIBUTES |
27 | component_base_class |
b20edc27 |
28 | mk_classdata |
29 | mk_classaccessor/ |
30 | ] |
31 | }, |
0c62fa59 |
32 | 'DBIx::Class::Row' => { |
33 | ignore => [ |
34 | qw( MULTICREATE_DEBUG ) |
35 | ], |
36 | }, |
bc984450 |
37 | 'DBIx::Class::ResultSource' => { |
38 | ignore => [qw/ |
39 | compare_relationship_keys |
40 | pk_depends_on |
41 | resolve_condition |
42 | resolve_join |
43 | resolve_prefetch |
44 | /], |
45 | }, |
b20edc27 |
46 | 'DBIx::Class::Storage' => { |
47 | ignore => [ |
48 | qw(cursor) |
7eb4ecc8 |
49 | ] |
50 | }, |
249963d4 |
51 | 'DBIx::Class::Schema' => { |
52 | ignore => [ |
53 | qw(setup_connection_class) |
54 | ] |
55 | }, |
00c937a2 |
56 | 'DBIx::Class::Storage::DBI::Sybase' => { |
57 | ignore => [ |
58 | qw/should_quote_data_type/, |
59 | ] |
60 | }, |
9b83fccd |
61 | 'DBIx::Class::CDBICompat::AccessorMapping' => { skip => 1 }, |
d03c0706 |
62 | 'DBIx::Class::CDBICompat::AbstractSearch' => { |
63 | ignore => [qw(search_where)] |
64 | }, |
9b83fccd |
65 | 'DBIx::Class::CDBICompat::AttributeAPI' => { skip => 1 }, |
66 | 'DBIx::Class::CDBICompat::AutoUpdate' => { skip => 1 }, |
5ef62e9f |
67 | 'DBIx::Class::CDBICompat::ColumnsAsHash' => { |
68 | ignore => [qw(inflate_result new update)] |
69 | }, |
9b83fccd |
70 | 'DBIx::Class::CDBICompat::ColumnCase' => { skip => 1 }, |
71 | 'DBIx::Class::CDBICompat::ColumnGroups' => { skip => 1 }, |
72 | 'DBIx::Class::CDBICompat::Constraints' => { skip => 1 }, |
73 | 'DBIx::Class::CDBICompat::Constructor' => { skip => 1 }, |
d03c0706 |
74 | 'DBIx::Class::CDBICompat::Copy' => { |
75 | ignore => [qw(copy)] |
76 | }, |
9b83fccd |
77 | 'DBIx::Class::CDBICompat::DestroyWarning' => { skip => 1 }, |
78 | 'DBIx::Class::CDBICompat::GetSet' => { skip => 1 }, |
79 | 'DBIx::Class::CDBICompat::HasA' => { skip => 1 }, |
80 | 'DBIx::Class::CDBICompat::HasMany' => { skip => 1 }, |
81 | 'DBIx::Class::CDBICompat::ImaDBI' => { skip => 1 }, |
82 | 'DBIx::Class::CDBICompat::LazyLoading' => { skip => 1 }, |
83 | 'DBIx::Class::CDBICompat::LiveObjectIndex' => { skip => 1 }, |
84 | 'DBIx::Class::CDBICompat::MightHave' => { skip => 1 }, |
fd8ff563 |
85 | 'DBIx::Class::CDBICompat::NoObjectIndex' => { skip => 1 }, |
9b83fccd |
86 | 'DBIx::Class::CDBICompat::Pager' => { skip => 1 }, |
87 | 'DBIx::Class::CDBICompat::ReadOnly' => { skip => 1 }, |
aa11d765 |
88 | 'DBIx::Class::CDBICompat::Relationship' => { skip => 1 }, |
89 | 'DBIx::Class::CDBICompat::Relationships' => { skip => 1 }, |
9b83fccd |
90 | 'DBIx::Class::CDBICompat::Retrieve' => { skip => 1 }, |
4a534c04 |
91 | 'DBIx::Class::CDBICompat::SQLTransformer' => { skip => 1 }, |
9b83fccd |
92 | 'DBIx::Class::CDBICompat::Stringify' => { skip => 1 }, |
93 | 'DBIx::Class::CDBICompat::TempColumns' => { skip => 1 }, |
94 | 'DBIx::Class::CDBICompat::Triggers' => { skip => 1 }, |
95 | 'DBIx::Class::ClassResolver::PassThrough' => { skip => 1 }, |
96 | 'DBIx::Class::Componentised' => { skip => 1 }, |
97 | 'DBIx::Class::Relationship::Accessor' => { skip => 1 }, |
98 | 'DBIx::Class::Relationship::BelongsTo' => { skip => 1 }, |
99 | 'DBIx::Class::Relationship::CascadeActions' => { skip => 1 }, |
100 | 'DBIx::Class::Relationship::HasMany' => { skip => 1 }, |
101 | 'DBIx::Class::Relationship::HasOne' => { skip => 1 }, |
102 | 'DBIx::Class::Relationship::Helpers' => { skip => 1 }, |
103 | 'DBIx::Class::Relationship::ManyToMany' => { skip => 1 }, |
104 | 'DBIx::Class::Relationship::ProxyMethods' => { skip => 1 }, |
105 | 'DBIx::Class::ResultSetProxy' => { skip => 1 }, |
cb136e67 |
106 | 'DBIx::Class::ResultSetManager' => { skip => 1 }, |
9b83fccd |
107 | 'DBIx::Class::ResultSourceProxy' => { skip => 1 }, |
046ad905 |
108 | 'DBIx::Class::Storage::DBI' => { skip => 1 }, |
9b83fccd |
109 | 'DBIx::Class::Storage::DBI::DB2' => { skip => 1 }, |
110 | 'DBIx::Class::Storage::DBI::MSSQL' => { skip => 1 }, |
9b83fccd |
111 | 'DBIx::Class::Storage::DBI::ODBC400' => { skip => 1 }, |
112 | 'DBIx::Class::Storage::DBI::ODBC::DB2_400_SQL' => { skip => 1 }, |
113 | 'DBIx::Class::Storage::DBI::Oracle' => { skip => 1 }, |
114 | 'DBIx::Class::Storage::DBI::Pg' => { skip => 1 }, |
115 | 'DBIx::Class::Storage::DBI::SQLite' => { skip => 1 }, |
116 | 'DBIx::Class::Storage::DBI::mysql' => { skip => 1 }, |
117 | 'SQL::Translator::Parser::DBIx::Class' => { skip => 1 }, |
118 | 'SQL::Translator::Producer::DBIx::Class::File' => { skip => 1 }, |
737416a4 |
119 | |
120 | # skipped because the synopsis covers it clearly |
121 | |
122 | 'DBIx::Class::InflateColumn::File' => { skip => 1 }, |
123 | |
a2800991 |
124 | # skip connection since it's just an override |
737416a4 |
125 | |
a2800991 |
126 | 'DBIx::Class::Schema::Versioned' => { ignore => [ qw(connection) ] }, |
737416a4 |
127 | |
5c1d82d2 |
128 | # don't bother since it's heavily deprecated |
129 | 'DBIx::Class::ResultSetManager' => { skip => 1 }, |
7eb4ecc8 |
130 | }; |
131 | |
132 | foreach my $module (@modules) { |
133 | SKIP: |
134 | { |
0ebb0072 |
135 | skip "$module - No real methods", 1 if ($exceptions->{$module}{skip}); |
7eb4ecc8 |
136 | |
137 | # build parms up from ignore list |
138 | my $parms = {}; |
139 | $parms->{trustme} = |
140 | [ map { qr/^$_$/ } @{ $exceptions->{$module}{ignore} } ] |
141 | if exists($exceptions->{$module}{ignore}); |
142 | |
143 | # run the test with the potentially modified parm set |
144 | pod_coverage_ok($module, $parms, "$module POD coverage"); |
145 | } |
146 | } |