in reply to Class::MethodMaker and Class::Accessor

Class::Accessor can only create simple get/set methods. Class::MethodMaker offers a bunch of different types of methods that can be created. For example, some of the "method types" supported by Class::MethodMaker are "list", "hash", "hash_of_lists", "boolean", and "counter". These are intended to be more convenient for certain tasks than simple scalar get/set methods. For example, a "count" method has an accessor method, but also an _incr method (to increment) and an _reset method to reset the value. This avoids needing to do things like $foo->counter( $foo->counter++ ) to increment the value in a get/set.
  • Comment on Re: Class::MethodMaker and Class::Accessor