I'm using POD to document some Perl code-- a library w/ a bunch of functions.
For clarity, I want to put each function's documentation next to the
function itself. I don't want to combine all the documentation at the
start or end of the library. I realize perldoc doesn't care where the
documentation is, but it seems easier to maintain with the
documentation next to the function.
My "problem": to document a one-line function, I have to do this:
=item make_ref(URL,TEXT)
Return string to make text a hyperlink to URL
=cut
sub make_ref {return "<a href=\"$_[0]\">$_[1]</a>"}
It takes 5 lines of POD to document one line of code? Ouch!
That's a lot of screen real estate when viewing the file in emacs.
Is there a shortcut? Can I make this work somehow?:
=item make_ref(URL,TEXT)
Return string to make text a hyperlink to URL
=cut
I know POD requires blank lines, but is there a workaround to avoid this?
Ideally, I'd like something like
=item make_ref(URL,TEXT)\nReturn string to make text a hyperlink to URL\n=cut
which of course doesn't work. Can I get some variation of that to work?
I did get this to work:
=item make_ref(URL,TEXT) Return string to make text a hyperlink to URL
=cut
but that's clearly wrong logistically.
Any thoughts? (oh, I realize it should be $URL and $TEXT-- I'm just
getting started with POD)