I'm having a bit of a problem with pod2html rendering =item cross-references with invalid target fragment names. The following POD snippets demonstrate the problem:

Foo.pod: =head1 Foo stuff Stuff about Foo. =over =item foo see L<Bar/foo> This hack works: L<foo in the Bar manpage|Bar/item_foo> =back Bar.pod: =head1 Bar stuff Stuff about Bar. =over =item foo this item was referenced in Foo. =back

The input PODs are processed with this shell command:

for f in {Foo,Bar}.pod do pod2html \ --htmlroot=file:/ \ --outfile=${f%.pod}.html \ --podpath=$PWD \ --verbose $f done

In Bar.html the A element for the POD =item "foo" is named "item_foo":

<a name="item_foo">foo</a>

Foo.html includes this A element for the cross reference. The target fragment name is "foo", but it seems that it should be "item_foo":

see <a href="file:///home/me/perltestlib/DST/XBase/Bar.html#foo">foo i +n the Bar manpage</a>

The reference listed after "This hack works" produces the desired output:

<a href="file:///home/me/perltestlib/DST/XBase/pod_problem/Bar.html#it +em_foo">foo in the Bar manpage</a>

perl is version 5.8.0 (Linux).

I know I've probably ventured into "there are better alternatives to Pod::Html" territory, but am I missing or misunderstanding something in the documentation, or is the aforementioned workaround the only way to get valid =item cross-references?

converter


In reply to pod2html: invalid =item cross-references by converter

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.