Pod :: Coverage loads (executes) the module so that it can create subtitles and the like. You would have to prevent your .pl from working properly somehow.
#!/usr/bin/perl ... main(@ARGV) if !$ENV{NO_RUN}; 1;
But once you have done this, it is easy, because you specify Pod :: Coverage, which package to check ( package ) and which file to check ( pod_from ).
#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; use Pod::Coverage qw( ); { package the_script; local $ENV{NO_RUN} = 1; do "script.pl" or die $@ ; } my $pc = Pod::Coverage->new( package => 'the_script', pod_from => 'script.pl', );
Tested.
source share