I have pod_link_test.pod:

=encoding utf8 L<perlpod> L<strict> L<Getopt::Long> L<Text::CSV> L<man(1)> =cut

When I run:

$ pod2html --infile pod_link_test.pod --outfile pod_link_test.html

The HTML code, with the links, in pod_link_test.html, looks like:

<p><a>perlpod</a></p> <p><a>strict</a></p> <p><a>Getopt::Long</a></p> <p><a>Text::CSV</a></p> <p><a href="http://man.he.net/man1/man">man(1)</a></p>

I was hoping the links (except man(1)) would actually look like:

<p><a href="https://metacpan.org/pod/name>name</a></p>

I feel like I'm missing something obvious, but have no idea what that might be.

I did a fairly extensive search (both Super Search and general Internet) but came up with little of help. I did find "POD: embedding/linking/displaying html and images on metacpan and github" which provided a link to "MetaCPAN Pod Renderer". When I pasted the same pod_link_test.pod code into this, I did get actual links with the https://metacpan.org/pod/ prefix.

I did a search of my system for man.he.net: I only found two files where it occurs.

In .../Pod/Simple/XHTML.pm, I found:

... $new->perldoc_url_prefix('https://metacpan.org/pod/'); $new->man_url_prefix('http://man.he.net/man'); ...

In .../Pod/Simple/HTML.pm, I found:

... $Perldoc_URL_Prefix = 'https://metacpan.org/pod/' unless defined $Perldoc_URL_Prefix; ... $Man_URL_Prefix = 'http://man.he.net/man'; ...

I can't see $Perldoc_URL_Prefix being defined anywhere.

I'm using Perl 5.34.0; pod2html is a core utility in that version.

Any guidance on this would be very much appreciated.

— Ken


In reply to pod2html: link (L<...>) formatting code by kcott

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.