From: Chip Salzenberg Date: Fri, 21 Mar 1997 02:38:44 +0000 (+1200) Subject: Improve pod2man diagnostic when NAME is invalid X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d714cd28e010ff50bd122d492f9a38fca97bf308;p=p5sagit%2Fp5-mst-13.2.git Improve pod2man diagnostic when NAME is invalid --- diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 88ce73f..bd4dd41 100644 --- a/pod/pod2man.PL +++ b/pod/pod2man.PL @@ -416,9 +416,16 @@ if ($name ne 'something') { unless (/\s*-+\s+/) { $oops++; warn "$0: Improper man page - no dash in NAME header in paragraph $. of $ARGV[0]\n" - } else { - %namedesc = split /\s+-+\s+/; - } + } else { + my @n = split /\s+-+\s+/; + if (@n != 2) { + $oops++; + warn "$0: Improper man page - malformed NAME header in paragraph $. of $ARGV[0]\n" + } + else { + %namedesc = @n; + } + } last FCHECK; } next if /^=cut\b/; # DB_File and Net::Ping have =cut before NAME