diff options
author | Chip Salzenberg <chip@perl.com> | 1997-03-21 14:38:44 +1200 |
---|---|---|
committer | Chip Salzenberg <chip@atlantic.net> | 1997-03-22 15:34:25 +1200 |
commit | d714cd28e010ff50bd122d492f9a38fca97bf308 (patch) | |
tree | 1e834e1e3afed1ebcffdb17706a5980e627197f2 /pod/pod2man.PL | |
parent | d2972b5c1b810956755760a8c8392c4447f7c989 (diff) | |
download | perl-d714cd28e010ff50bd122d492f9a38fca97bf308.tar.gz |
Improve pod2man diagnostic when NAME is invalid
Diffstat (limited to 'pod/pod2man.PL')
-rw-r--r-- | pod/pod2man.PL | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/pod/pod2man.PL b/pod/pod2man.PL index 88ce73f126..bd4dd418fd 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 |