installman should use the data in pod.lst to track dual-life pods in lib/
authorNicholas Clark <nick@ccl4.org>
Sun, 18 Dec 2011 19:13:11 +0000 (20:13 +0100)
committerNicholas Clark <nick@ccl4.org>
Mon, 19 Dec 2011 12:55:20 +0000 (13:55 +0100)
This ensures that perlfaq*, perlglossary, perlxs, perlxstut and perldoc's
man pages are installed in man1, not man3, along with any future dual-life
pods. This is an improvement on commit 0beff067932254cd which only dealt with
perlfaq* and perlglossary, and had the unfortunate side effect of also
causing these 11 files to be installed to bin/

installman
utils.lst

index 145c366..e986a78 100755 (executable)
@@ -14,6 +14,9 @@ use ExtUtils::Packlist;
 use Pod::Man;
 use vars qw(%opts $packlist);
 
+require './Porting/pod_lib.pl';
+my $state = get_pod_metadata();
+
 $ENV{SHELL} = 'sh' if $^O eq 'os2';
 
 my $patchlevel = substr($],3,2);
@@ -69,7 +72,11 @@ my %do_not_install = map { ($_ => 1) } qw(
 );
 
 # Install the main pod pages.
-pod2man('pod', $opts{man1dir}, $opts{man1ext});
+pod2man({
+         map {
+             $_ && @$_ > 2 && !$_->[0]{aux} ? ($_->[4], $_->[2]): ()
+         } @{$state->{master}}
+        }, $opts{man1dir}, $opts{man1ext});
 
 # Install the pods for library modules.
 pod2man('lib', $opts{man3dir}, $opts{man3ext});
@@ -137,9 +144,7 @@ sub pod2man {
                                   return if m!(?:^|/)t/!;
                                   s!^\Q$what\E/!!;
                                   return if $do_not_install{$_};
-                                  # perlfaq manpages are installed in section 1,
-                                  # so skip when searching files for section 3
-                                  return if m(perlfaq.?\.pod|perlglossary.pod);
+                                  return if is_duplicate_pod($File::Find::name);
                                   $modpods->{$_} = $File::Find::name;
                               }
                           }},
index 8ce291e..7dd4985 100644 (file)
--- a/utils.lst
+++ b/utils.lst
@@ -1,14 +1,3 @@
-cpan/perlfaq/lib/perlfaq.pod
-cpan/perlfaq/lib/perlfaq1.pod
-cpan/perlfaq/lib/perlfaq2.pod
-cpan/perlfaq/lib/perlfaq3.pod
-cpan/perlfaq/lib/perlfaq4.pod
-cpan/perlfaq/lib/perlfaq5.pod
-cpan/perlfaq/lib/perlfaq6.pod
-cpan/perlfaq/lib/perlfaq7.pod
-cpan/perlfaq/lib/perlfaq8.pod
-cpan/perlfaq/lib/perlfaq9.pod
-cpan/perlfaq/lib/perlglossary.pod
 cpan/Pod-LaTeX/blib/script/pod2latex
 cpan/podlators/blib/script/pod2man
 cpan/podlators/blib/script/pod2text