perlperl-pod

Is there a way to re-use text in perlpod documentation?


I have a bunch of repeated text in my perlpod documentation. I could of course create a separate section and reference it, but I was wondering if there's a way to enter the text once somewhere and have it inserted in multiple places?

I don't think this is possible, but thought I'd ask to make sure I'm not missing anything.

Or - perhaps there's a better perl documentation technique?


Solution

  • As you've realised, Pod is (deliberately) a very simple markup language. It doesn't have any particularly complicated feature and one of the things it is missing is a way to embed text from another source.

    I'd suggest moving the repeated text to its own section and linking to that section (using L<...>) whenever you want to reference that text.