Clean up code a bit
[gitmo/Class-MOP.git] / xt / pod_coverage.t
CommitLineData
9f32bdd8 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
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 = (
17 'Class::MOP::Attribute' => ['process_accessors'],
18);
19
20for my $module ( sort @modules ) {
21 my $trustme = [];
22 if ( $trustme{$module} ) {
23 my $methods = join '|', @{ $trustme{$module} };
24 $trustme = [qr/$methods/];
25 }
26
27 pod_coverage_ok(
28 $module, { trustme => $trustme },
29 "Pod coverage for $module"
30 );
31}