Debian Codegraph @

xt/pod-coverage.t

raw symbols SCIP
1 #!/usr/bin/env perl
2
3 # Ensure pod coverage in your distribution
4 use strict;
5
6 BEGIN {
7 $| = 1;
8 $^W = 1;
9 }
10
11 my @MODULES = ( 'Test::Pod::Coverage 1.08', "Pod::Coverage::TrustPod 0.10" );
12
13 # Don't run tests during end-user installs
14 use Test::More;
15
16 # plan( skip_all => 'Author tests not required for installation' )
17 # unless ( $ENV{RELEASE_TESTING} );
18
19 # Load the testing modules
20 foreach my $MODULE (@MODULES) {
21 eval "use $MODULE";
22 if ($@) {
23 $ENV{RELEASE_TESTING}
24 ? die("Failed to load required release-testing module $MODULE")
25 : plan( skip_all => "$MODULE not available for testing" );
26 }
27 }
28
29 # Skip platform specific modules unless we are on that platform
30 # Don't require any pod for Moose BUILD subs
31 pod_coverage_ok( $_,
32 { trustme => ['BUILD'], coverage_class => 'Pod::Coverage::TrustPod' } )
33 for grep {
34 not( ( $^O ne 'linux' && $_ =~ /Linux$/ )
35 or ( $^O ne 'darwin' && $_ =~ /Mac$/ )
36 or ( $^O ne 'freebsd' && $_ =~ /FreeBSD$/ ) )
37 } all_modules();
38
39 done_testing;
40
41 1;