#!perl -T

use 5.006;
use strict;
use warnings FATAL => 'all';

use Test::More;

plan skip_all => "Author tests not required for installation" if not $ENV{ RELEASE_TESTING };
eval "use Pod::Coverage 0.18;"; die $@ if $@;
    #   Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
    #   but older versions don't recognize some common documentation styles.
eval "use Test::Pod::Coverage 1.08"; die $@ if $@;
    #   Ensure a recent version of Test::Pod::Coverage.

#   `Systemd::Daemon::Inline` is a stub, it does not contain documentation.
#   Let us exclude it from testing.
my @modules = grep( $_ ne 'Systemd::Daemon::Inline', all_modules() );
plan tests => scalar( @modules );

foreach my $module ( @modules ) {
    pod_coverage_ok(
        $module,
        { also_private => [ 'dl_load_flags' ], },
            #   The test complains there is "1 naked subroutine: dl_load_flags". I have no idea what
            #   it is. Probably, it is something from Inline guts. Anyway, I am not going to
            #   document it, so let just declare it private
    );
}; # foreach.

# end of file #
