- else {
- File::Find::find({no_chdir=>1,
- wanted => sub {
- # $_ is $File::Find::name when using no_chdir
- if (-f $_ and /\.p(?:m|od)$/) {
- my $fullname = $_;
- s!^\Q$poddir\E/!!;
- # perlfaq manpages are installed in section 1,
- # so skip when searching files for section 3
- return if m(perlfaq.?\.pod|perlglossary.pod);
- $modpods{$fullname} = $_;
- }
- }},
- $poddir);
- }
- my @to_process;
- foreach my $mod (sort keys %modpods) {
- my $manpage = $modpods{$mod};
- 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 $do_not_install{$manpage};
+
+ File::Path::mkpath($mandir, $opts{verbose}, 0777) unless $opts{notify};
+
+ foreach my $manpage (sort keys %$modpods) {
+ my $mod = $modpods->{$manpage};