perlancar has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have a POD document like below:

=head1 CHAPTER 1 =head2 Subchapter 1 =head1 CHAPTER 2 =head2 Subchapter 1 =cut

Let's say I want to link to CHAPTER 2's Subchapter 1 instead of CHAPTER 1's Subchapter 1. Is it possible at all? The spec does not say anything about this, but perhaps the obvious L</"CHAPTER 2/Subchapter 1"> can be allowed? The Perl 6 Pod documentation also doesn't seem to delve into this.

If making section names unique is the only way (currently), what would you guys suggest? I was thinking of the Wikipedia style:

=head1 CHAPTER 1 =head2 Subchapter 1 (CHAPTER 1) =head1 CHAPTER 2 =head2 Subchapter 1 (CHAPTER 2) =cut

Replies are listed 'Best First'.
Re: Linking to a POD section that is not uniquely named (perl6)
by Anonymous Monk on Nov 29, 2018 at 04:57 UTC
    Does perl6 have pod tools? Try it and see

      By recommending Perl 6 Pod, are you saying that it supports what I want to accomplish?

      I did mention Perl 6 Pod in my original post, out of curiosity for the POD vs Perl 6 Pod spec. But I'm writing POD for Perl 5 modules and would prefer solution for Perl 5.