| 1 | #!/usr/bin/env perl |
| 2 | |
| 3 | # Ensure pod coverage in your distribution |
| 4 | use strictscip-perl cpan Perl-Tidy-Sweetened 1.20 strict/; |
| 5 | |
| 6 | BEGIN { |
| 7 | $|scip-perl cpan Perl-Tidy-Sweetened 1.20 main/`$|`. = 1; |
| 8 | $^Wscip-perl cpan Perl-Tidy-Sweetened 1.20 main/`$^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::Morescip-perl cpan Perl-Tidy-Sweetened 1.20 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 ($@scip-perl cpan Perl-Tidy-Sweetened 1.20 main/`$@`.) { |
| 23 | $ENVscip-perl cpan Perl-Tidy-Sweetened 1.20 main/`%ENV`.{RELEASE_TESTING} |
| 24 | ? diescip-perl cpan Perl-Tidy-Sweetened 1.20 main/die().("Failed to load required release-testing module $MODULE") |
| 25 | : planscip-perl cpan Perl-Tidy-Sweetened 1.20 main/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_okscip-perl cpan Perl-Tidy-Sweetened 1.20 main/pod_coverage_ok().( $_scip-perl cpan Perl-Tidy-Sweetened 1.20 main/$_., |
| 32 | { trustme => ['BUILD'], coverage_class => 'Pod::Coverage::TrustPod' } ) |
| 33 | for grepscip-perl cpan Perl-Tidy-Sweetened 1.20 main/grep(). { |
| 34 | not( ( $^Oscip-perl cpan Perl-Tidy-Sweetened 1.20 main/`$^O`. ne 'linux' && $_scip-perl cpan Perl-Tidy-Sweetened 1.20 main/$_. =~ /Linux$/ ) |
| 35 | or ( $^Oscip-perl cpan Perl-Tidy-Sweetened 1.20 main/`$^O`. ne 'darwin' && $_scip-perl cpan Perl-Tidy-Sweetened 1.20 main/$_. =~ /Mac$/ ) |
| 36 | or ( $^Oscip-perl cpan Perl-Tidy-Sweetened 1.20 main/`$^O`. ne 'freebsd' && $_scip-perl cpan Perl-Tidy-Sweetened 1.20 main/$_. =~ /FreeBSD$/ ) ) |
| 37 | } all_modulesscip-perl cpan Perl-Tidy-Sweetened 1.20 main/all_modules().(); |
| 38 | |
| 39 | done_testing; |
| 40 | |
| 41 | 1; |