- print "installing from $poddir\n" if $opts{verbose};
-
- mkpath($mandir, $opts{verbose}, 0777) unless $opts{notify}; # In File::Path
- # Make a list of all the .pm and .pod files in the directory. We avoid
- # chdir because we are running with @INC = '../lib', and modules may wish
- # to dynamically require Carp::Heavy or other diagnostics warnings.
- # Hash the names of files we find, keys are names relative to perl build
- # dir ('.'), values are names relative to $poddir.
- my %modpods;
- if (@script) {
- %modpods = (map {+"$poddir/$_", $_} @script);
- }
- 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/!!;
- $modpods{$fullname} = $_;
- }
- }},
- $poddir);
+ if ($opts{verbose}) {
+ if ($where) {
+ print "installing from $where\n";
+ } else {
+ print "installing $_\n"
+ foreach sort keys %$modpods;
+ }