http://qs321.pair.com?node_id=561619


in reply to class inheritance and new(constructor)

I use, and recomend, Class::Std and Class::Std::Utils, or Moose than a pseudohashes OO based to implement best practices and more (and best) control over access of variables and values, constructors and destructors of my class.

Theses modules implement, and recomend you to use specials methods (BUILD and DEMOLISH) to be a constructors and destructors of your class. Theses build-in methods will manager all the class hierarchies and inheritance works.

If you don't know theses modules, I strong recomend you to take a look of them.

Solli Moreira Honorio
Sao Paulo - Brazil