Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Linking from POD

by choroba (Cardinal)
on Apr 29, 2014 at 20:52 UTC ( [id://1084391]=perlquestion: print w/replies, xml ) Need Help??

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

In Syntax::Construct, I need to link to various parts of Perl documentation. I have problems linking to (?|pattern) in perlre: The link works in CPAN, but it doesn't in MetaCPAN.
<c> L<perlre/"(?E<124>pattern)">
is converted to the correct link in CPAN, but in MetaCPAN, only perlre/#pattern is preserved in the link. Has anyone experienced a similar problem and possibly found a solution?

Update: Maybe a trick how to test how various links would be rendered in CPAN and MetaCPAN would be enough.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Replies are listed 'Best First'.
Re: Linking from POD
by tobyink (Canon) on Apr 29, 2014 at 22:42 UTC

    If I were you, I'd just link to the "Extended Patterns" heading, rather than trying to link directly to the =item in question. Links seem to be one of the least consistently implemented parts of pod, so it's probably best to keep them simple.

    use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
Re: Linking from POD (artificial linkrot, Pod::Simple::XHTML bugs)
by Anonymous Monk on Apr 29, 2014 at 23:14 UTC
Re: Linking from POD
by RonW (Parson) on Nov 04, 2014 at 19:09 UTC

    I had not noticed before, but perlpodspec does not provide any actual rules for generating anchors, not even for HTML. (There are a few examples in the detailed About L<...> Codes section, but not rules. Indeed, one sentence says "Formatters may choose to ignore the markup for purposes of resolving the link and use only the renderable characters in the section name". "may" in that sentence is a big loophole.)

    A few simple rules for generating anchor names might be enough to cover most target formats that allow anchors. If that's not feasible, then at least rules covering HTML anchors.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://1084391]
Approved by marto
Front-paged by LanX
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-04-19 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found