more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I too am bother with this and I shrug when I see $self->_private(@args) because hardly ever has the author documented &_private so I have to be extra careful when extending it and writing my own help routines. And I really cry when I see $self->_init(@_); in the parent class after trying to debug a totally innocent subclass, which happened to have a little help routine called &_init. IMHO, it's just not particularly clever to call a "private" method as a method since you don't need the method dispatch to find the subroutine, plus you risk being accidently overridden. Private methods should be invoked as (help) functions, because that's what they are. _private($self => @args) is my preferred style. ihb In reply to Re^2: Private Methods Meditation
by ihb
|
|