A simple suggestion. Turn
sub flip {
into
sub flip { #Flip pancake
A short synopsis comment, appended directly to the declaration line, means you can easily grep through your files and not only see what functions they contain, but also get a synopsis of what each one does.
grep -re 'sub.*{' . will now be even more informative. Hugging the opening brace helps exclude false positives.
Appropriate names and packages only go so far, especially for object libraries where the same function is redefined for different classes. For those, note what distinguishes the function from the others of the same name.
I couldn't recall having seen this suggested anywhere, so I thought I'd toss it out here. This seems like a no-brainer now that one of my projects has a couple hundred functions, scattered across umpteen files and re-use necessitates finding the function in the first place.
"One is enough. If you are acquainted with the principle, what do you care for the myriad instances and applications?"
- Henry David Thoreau, Walden
In reply to Easily catalog subroutines with a synopsis comment by blogical
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |