This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
autodoc.pl: Allow =item lists in perlapi
authorKarl Williamson <khw@cpan.org>
Thu, 13 Oct 2016 00:30:11 +0000 (18:30 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 13 Oct 2016 01:22:47 +0000 (19:22 -0600)
Such lists were silently ignored.  This fixes things so no pod commands
are silently ignored, and hence lists are now accepted in a function's
pod.  This fixes the entry for 'vverify', whose =item list was not
getting picked up.

autodoc.pl

index 161310d..ce4846e 100644 (file)
@@ -110,11 +110,14 @@ HDR_DOC:
            my $docs = "";
 DOC:
            while (defined($doc = $get_next_line->())) {
-               last DOC if $doc =~ /^=\w+/;
+
+                # Other pod commands are considered part of the current
+                # function's docs, so can have lists, etc.
+                last DOC if $doc =~ /^=(cut|for\s+apidoc|head)/;
                if ($doc =~ m:^\*/$:) {
                    warn "=cut missing? $file:$line:$doc";;
                    last DOC;
-               }
+                }
                $docs .= $doc;
            }
            $docs = "\n$docs" if $docs and $docs !~ /^\n/;