I'm still not quite clear on the correct naming convention for object variables, even after
frankus's suggestion that I
RTFM ;-) I'd really like to get this straight as I've got a big project to hand in at college soon, & I don't want it looking too mad. (I've thought about this, and I don't think it counts as homework trolling--see my next node for that!)
frankus notes that the underbar convention--$self->{_words}--should be used only for "private properties" and quotes perltoot:
Occasionally you'll see method names beginning or ending
with an underscore or two. This marking is a convention
indicating that the methods are private to that class
alone and sometimes to its closest acquaintances, its
immediate subclasses. But this distinction is not
enforced by Perl itself. It's up to the programmer to
behave.
But I'm still a bit confused. My variables are private
properties, I guess, in that they can't be directly accessed by other objects. They're not methods tho'.
Basically, I've got a pretty vast project, where all private object variables have the underscore in their name. If this is just plain wrong, I'll change them all. If it's not, well that's a relief.
Cheers
Dennis