## in Animal
sub color {
$_[0]->{Color}
}
sub set_color {
$_[0]->{Color} = $_[1];
}
Here's an alternate way to access the arguments:
$_[0] is used in place, rather than with a
shift. Functionally, this example is identical to
the previous implementation, but it's slightly
faster, at the expense of some ugliness.
 |  |  |
9.11. Don't Look Inside the Box |  | 9.13. Getters That Double as Setters |