Don't ask to ask, just ask | |
PerlMonks |
Re: Guidelines for listing functions/methods in POD?by kcott (Archbishop) |
on Dec 08, 2017 at 07:22 UTC ( [id://1205150]=note: print w/replies, xml ) | Need Help?? |
G'day Dallaylaen, These are just my thoughts and personal preferences on the subject. I don't even present these as recommended guidelines. It's entirely your choice whether you wish to implement any of these ideas. I do like to see function names in the index because it aids page navigation. I only want to see the function name appearing once in the index; not multiple entries with every variation of the argument list. I prefer to add function names alphabetically; again, for ease of navigation. I would normally add a function name at the =head2 level. With a large number of functions which, perhaps, fall into some natural grouping, I might use =head2 for group names and =head3 for the function names. Whether or not I decide groupings are needed, I'll generally aim for all functions to be at the same =headN level. Here's how I might present a function with a variable argument list:
Obviously, that's just a very sketchy outline. Meaningful names for variables, even in documentation, greatly aid comprehension. And, of course, when I come back to this in six months, there should be sufficient information for me to use function(...) without having to search through the source code: if it doesn't do that for me, it won't do it for others, and I've just wasted my time bothering to pretend to provide documentation. — Ken
In Section
Seekers of Perl Wisdom
|
|