Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Tutorial: Introduction to Object-Oriented Programmingby pdcawley (Hermit) |
on Dec 11, 2002 at 12:03 UTC ( [id://219065]=note: print w/replies, xml ) | Need Help?? |
I know that it's common not to have separate set_foo methods, but I still think they're the right thing. That way it's easy to set up attributes that are read only or read/write accessible to the outside world. If you just have the single method you're reliant on people reading the docs to find out whether they can call the accessor with a new value.
You're bang on about returning $self though.
In Section
Meditations
|
|