pod2man generated .IX lines upset whatis on Solaris
Subject: Re: Perl generates incorrect manpages
John Redford wrote
> Perl is generating manpages which contain lines like:
> .SH "NAME"
> .IX Header "NAME"
> perlbot \- Bag'o Object Tricks (the BOT)
>
> Which on Solaris at least causes the manpage index to think that '.IX'
> 'header' and '"NAME"' are all manpages.
There was a thread about this about two weeks ago under the subject
"Re: pod2man .IX question (for Solaris bug fix)". Kurt Starsinic
posted a patch which didn't get into the 5.004_02 release, probably because
it appears to be incorrect (see below).
> This is trivially fixed by
> moving the .IX to before the .SH:
>
> .IX Header "NAME"
> .SH "NAME"
> perlbot \- Bag'o Object Tricks (the BOT)
It may need something more complicated, since Kurt wrote
:I would like to keep them, if possible, but moving them down a line or two
:doesn't solve the problem. Following is a patch which moves all of the .IX
:lines to the end of the man page, which (I believe) will appease all
:interested parties. This patch DTRT under Solaris 2.5.1/SPARC and OSF1
:V4.0/DEC Alpha, both running perl 5.004 (no patches):
I doubt this last assertion, since I noted a couple of suspicious looking
bits in the patch (in a subsequent message in the above thread). This
is perhaps why Tim didn't include it in 5.004_02. (Also, the patch
was for pod2man rather than pod2man.PL.)
I attach below Kurt's patch with my corrections. I've checked that this
doesn't actually wreck pod2man totally, but I can't test it further since
i) I don't know what the .IX is meant to do.
ii) I don't actually know what the code is meant to be doing.
iii) I don't have a suitable Solaris (etc) system to try on.
Perhaps someone else could take this further.
Credited: John Redford <jmr@whirlwind.fmr.com>
Credited: Kurt Starsinic <kstar@isinet.com>
p5p-msgid: E0wxoUZ-0006Ee-00@ursa.cus.cam.ac.uk