Try  L<perlre/(?E<verbar>pattern)> although it doesn't work in my local test (not surprising given the real id generated, see below )

 perl -MPod::Simple::XHTML -e " exit Pod::Simple::XHTML->filter(shift)->any_errata_seen " links.pod > links.html

Apparently Pod::Simple::XHTML is what metacpan uses, so its what needs patching

Some thoughts on that who edits p3rl.org? link fixer idea, pod link anchors mangled (spaces to dashes) · Issue #988 · CPAN-API/metacpan-web · GitHub

FWIW, a desperation move IMHO (since pod should just work, and this isn't guaranteed to be futureproof)

=for html <a href="https://metacpan.org/pod/perlre#pattern1">(?|patter +n)</a> =cut
Turning (?|pattern) into id="pattern1" is stupid PITA , its not future proof

Now if pattern) turned into https://metacpan.org/pod/perlre#pattern1 or whatever the link becomes tomorrow, thus avoiding linkrot, I could live with it

But then again (?|pattern) could disappear tomorrow as an actual linkable target/section/item (=head1...) ... Re: Shortcut for referencing specific sections of CPAN documents


In reply to Re: Linking from POD (artificial linkrot, Pod::Simple::XHTML bugs) by Anonymous Monk
in thread Linking from POD by choroba

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.