On Fri, Nov 24, 2006 at 05:54:02PM -0700, Kelly Jones wrote:
> 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.
How about setting up folds from =<keyword> to =cut ?
Then the code becomes the dominant display but there is an indication
that the documentation is there if required.
(I'm a Vim user so can't be more specific as I don't know the emacs commands)
--
Mark Thornber
=========================
E M Thornber CEng MIET
Enchanted Systems Limited
Software Toolsmiths
+44 (0) 1503 272097