I'm posting this under SoPW because there isn't a category called "Pointless Debates". :-) What are people's preferences for how to name "getter" functions? One style guide I've read recommends naming functions after the thing that is returned -- e.g. "salary()". Another style guide recommends naming such a function "get_salary()".
Is there any predominant style in the Perl community? Does the answer depend on whether the function is simply returning the salary or is actually computing it first? Does the answer depend on whether the function is part of a package or is actually a method in an object?
On a related topic, do you prefer to see a separate "set_salary()" function, or do you prefer to see the same function performing both... uh... functions?
Like I said, "Pointless Debates". :-) Still, I'm curious as to whether there is a clear preference.
(Plug: Visit JavaJunkies, PerlMonks for Java)