4

I wonder: I have some POD with =items like this:

=item B<some-option=>I<some_value>

When I try to create a link in the text, none of those works:

L<B<some-option=>I<some_value>>, L<some-option=some_value>

Using pod2html I see that there are name= for the =items, but the L<..> command just produces <em>...</em> output.

How can I create a proper link for the =item?

Here's a short sample POD:

=pod

See L<B<--some-option=>I<some_value>> or L<--some-option=some_value>.

=over

=item B<--some-option=>I<some_value>

Blabla...

=back

Also podchecker --warnings --warnings --warnings says pod syntax OK..

U. Windl
  • 3,480
  • 26
  • 54

1 Answers1

3

To nest formatting codes, the outer one needs an extra set of angle brackets and some white space. The white space is ignored in the output.

L<< /B<some-option=>I<some_value> >>

This is documented in the Formatting Codes section of perlpod after the list of codes.

haarg
  • 211
  • 1
  • 5
  • Actually this does not solve the problem: `pod2html` now reports `Cannot find "--some-option=some_value" in podpath: cannot find suitable replacement path, cannot resolve link`, and the HTML generated essentially is `

    See --some-option=some_value or --some-option=some_value.

    `.
    – U. Windl Sep 04 '18 at 05:56
  • 2
    You didn't include the / – haarg Sep 04 '18 at 13:46
  • I re-read the perlpod manual page, but couldn't find a reference to `/`; is it that slash of `/"sec"`? – U. Windl Sep 05 '18 at 13:32
  • I improved your answer to be more direct and obvious -- sorry! – U. Windl Sep 05 '18 at 13:42
  • Yes, slash is to indicate that you are linking to a section of a pod document. In this case, the current document. The error you got about searching podpath means it is searching for a pod file, not a section. So I expect that means you didn't include the / in your link. – haarg Sep 07 '18 at 11:44