Reputation: 840
I use Dist::Zilla for the CPAN distribution https://metacpan.org/pod/ODF::lpOD_Helper.
The distribution includes two files with pod documentation:
lib/ODF/lpOD_Helper.pm
lib/ODF/lpOD_Helper/Unicode.pod
The pod in lpOD_Helper.pm contains references to the Unicode.pod file like
See L<ODF::lpOD_Helper::Unicode>
When installed, perldoc ODF::lpOD_Helper::Unicode
displays the Unicode.pod content.
However clicking the links in the html shown at metacpan do not work. The L<ODF::lpOD_Helper::Unicode>
pod link is translated to an html link containing URL https://metacpan.org/pod/ODF::lpOD_Helper::Unicode
(no .suffix), which gets a 404 error -- no such page.
Similar links do work in other distributions. For example ODF::lpOD 's main documentation page https://metacpan.org/dist/ODF-lpOD/view/lpOD.pod contains links like
L<ODF::lpOD::Tutorial>
which, when rendered on the metacpan page, is a link containing url https://metacpan.org/pod/distribution/ODF-lpOD/lpOD/Tutorial.pod
(with a .pod suffix) which works (presumably the web server translates or maps URLs ending in .pod to html).
How does pod-to-html and/or metacpan correlate L<...> links in pod to .pod files in the distribution? Do I need to provide some meta information about the file, and if so how to do it via Dist::Zilla?
Upvotes: 3
Views: 45
Reputation: 840
The problem was resolved after I added META.json (formerly only had META.yml), and put the fully-qualified module path as the first thing in the NAME section of the vanished .pod -- thanks ikegami for the suggestion in your comment!
I don't know which of these was responsible, and it seemed like the META.json contained no information which was not in the META.yml; but now the Unicode.pod page is correctly linked to at https://metacpan.org/pod/ODF::lpOD_Helper
(Since I'm using Dist::Zilla, I added [MetaJSON] to dist.ini and install Dist::Zilla::Plugin::MetaJSON)
Upvotes: 2