How to make a Pod link from a module to a script within the same distribution?

77 Views Asked by At

Consider this module App::TimeTracker. If you click on the tracker link in the SYNOPSIS section you end up here whereas you should have ended up here. The Pod source code responsible for the behavior is given here, which shows that the following Pod formatting code was used:

L<tracker>

I can fix the problem by providing an absolute link instead:

L<tracker|https://metacpan.org/pod/release/DOMM/App-TimeTracker-3.000/bin/tracker>

but this fixes the link to version 3.000 which may change in the future.

So how should this be done in general?

2

There are 2 best solutions below

4
On BEST ANSWER

Use the full path without the version number: https://metacpan.org/pod/distribution/App-TimeTracker/bin/tracker.

2
On

The problem is that tracker_bash_autocomplete is not being indexed correctly as documentation by MetaCPAN. The NAME section has a very specific format based on manpages which must be adhered to for MetaCPAN to know how to link to your documentation. Putting tracker bash autocomplete before the hyphen makes MetaCPAN index it as tracker.

=head1 NAME

tracker_bash_autocomplete - whatever