This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Debian patch that skips podless modules
authorAlexey Tourbin <at@altlinux.ru>
Sun, 3 Aug 2003 21:33:00 +0000 (01:33 +0400)
committerJarkko Hietaniemi <jhi@iki.fi>
Mon, 4 Aug 2003 05:03:30 +0000 (05:03 +0000)
Message-ID: <20030803173300.GC2076@julia.office.altlinux.ru>

(plus Schwern's and Robert's nits)

p4raw-id: //depot/perl@20466

installman

index 56aeb43..79c6035 100755 (executable)
@@ -142,6 +142,25 @@ sub pod2man {
        next if $mod =~ m:/t/:; # no pods from test directories 
        next if ($manpage eq 'Pod/Functions.pm'); #### Used only by pod itself
 
        next if $mod =~ m:/t/:; # no pods from test directories 
        next if ($manpage eq 'Pod/Functions.pm'); #### Used only by pod itself
 
+       # Skip files without pod docs
+       my $has_pod;
+       if (open T, $mod)
+       {
+           local $_;
+           while (<T>)
+           {
+               ++$has_pod and last if /^=(?:head\d+|item|pod)\b/;
+           }
+
+           close T;
+       }
+
+       unless ($has_pod)
+       {
+           warn "no documentation in $mod\n";
+           next;
+       }
+
        # Convert name from  File/Basename.pm to File::Basename.3 format,
        # if necessary.
        $manpage =~ s#\.p(m|od)$##;
        # Convert name from  File/Basename.pm to File::Basename.3 format,
        # if necessary.
        $manpage =~ s#\.p(m|od)$##;