Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: POD L<> and relative links?

by Joost (Canon)
on Oct 19, 2006 at 22:40 UTC ( #579480=note: print w/replies, xml ) Need Help??

in reply to POD L<> and relative links?

Depends. You can link to other POD documents by using L<DocumentName> but the POD translator needs to know how to turn that into a relative link. You can also create any HTML by using the =for html or =begin html statements:
=for html <a href="relative/link.html">relative</a> or =begin html some <b>html</b> =end html
update: also see perlpod

Replies are listed 'Best First'.
Re^2: POD L<> and relative links?
by skazat (Chaplain) on Oct 19, 2006 at 23:44 UTC

    Understand the =begin =end =for and friend, just seems like using the L<> would be a little cleaner. For example, I could put the link inline of the paragraph I'm writing in, without having a new paragraph and it would work, wherever you're viewing the POD.

    Pity I can't just say in L<>, "hey this is a relative URL, and it doesn't have to turn into anything - just trust me". Seems like that's within Perl culture of Do What I Mean.

    I usually make two sets of docs - one that comes with the distribution, and anything that goes on the support site.


    -justin simoni
    skazat me

      The thing is, you're writing POD, not HTML. POD does not really have a concept of relative links, it just has "links". The pod translator has to figure out how to link stuff, and it can do that by making (relative) urls for HTML, creating hyperlinks in for info files or just displaying the raw text. Full URLs in links are useful because they will work more or less anywhere, independent of the location of the POD or generated file. Relative links depend on the eventual location of the generated file, which is not known in general. Ofcourse, you can always write your own pod2html tranlator if you do know.

        I'm beginning to understand you're view :) Thanks for being patient with me.

        It's a pity though, since I do generate HTML documents from the POD that's scattered all through the program, and distribute this documentation with the program itself.

        Oh well. The, "Make your own translator" doesn't seem too big of a challenge as brian points out (Rolls up sleeves...)


        -justin simoni
        skazat me

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://579480]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2022-06-27 04:57 GMT
Find Nodes?
    Voting Booth?
    My most frequent journeys are powered by:

    Results (86 votes). Check out past polls.