next if /^#/;
chomp;
$_ = $1 if /#.*pod\s*=\s*(\S+)/;
- my ($where, $what) = m|^(.*?)/(\S+)|;
+ my ($where, $what) = m|^(\S*)/(\S+)|;
pod2man($where, $opts{man1dir}, $opts{man1ext}, $what);
if ($has_man1dir) {
if (my ($where2, $what2) = m|#.*link\s*=\s*(\S+)/(\S+)|) {
my $tmp;
# Skip .pm files that have corresponding .pod files, and Functions.pm.
next if (($tmp = $mod) =~ s/\.pm$/.pod/ && -f $tmp);
+ next if $mod =~ m:/t/:; # no pods from test directories
next if ($manpage eq 'Pod/Functions.pm'); #### Used only by pod itself
# Convert name from File/Basename.pm to File::Basename.3 format,