Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^5: Private Methods Meditationby tilly (Archbishop) |
on Jul 20, 2004 at 19:34 UTC ( [id://376063]=note: print w/replies, xml ) | Need Help?? |
This does not strike me as a good reason. Experience strongly suggests that if you use descriptive method names, collisions are rather rare, documentation is never accurate, and it is as easy to search code for private methods as it is documentation. (Besides, I'm always going to search the code in the end because I don't trust the documentation.) Furthermore no amount of documentation can protect you if the base module's implementation changes and it now needs a new private method that might intersect what some subclass is using. This is part of what I was referring to at Re^2: Private Methods Meditation. And there is no perfect solution to it. However after you use descriptive method names and have decent test suites, the problem virtually goes away. If you furthermore have somewhat decent designs, the issue becomes rare to the point of being an endangered species. I'll continue my practice of not documenting private methods in POD. They are in source code, and possibly in regular comments when needed. That is good enough.
In Section
Meditations
|
|