|go ahead... be a heretic|
Re^4: Modern Perl: The Book: The Draftby Anonymous Monk
|on Jul 07, 2010 at 00:54 UTC||Need Help??|
I made the mistake of not looking at the paragraph and associated code.
Of course, the mere existence of a method called name() or age() does not by itself imply the behavior of that object. A Dog object may have an age() which is an accessor such that you can discover $rodney is 8 but $lucky is 3. A Cheese object may have an age() method that lets you determine how long to stow $cheddar so that it becomes sharp; in other words, age() may be an accessor in one class but not in another:I would lose the code and change the sentence to
A Cheese object may have an age() method that stores the cheese in the warehouse for six months; in other words, age() may be an accessor in one class but a mutator in another.