http://www.perlmonks.org?node_id=848353


in reply to Re^3: Modern Perl: The Book: The Draft
in thread Modern Perl: The Book: The Draft

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:
# how old is the cat? my $years = $zeppie->age(); # store the cheese in the warehouse for six months $cheese->age();
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.