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


in reply to Re^5: Object Constructors - Advice of experienced OO Perl Monks
in thread Object Constructors - Advice of experienced OO Perl Monks

The point is that two steps initialization is error prone. You can avoid that using the Composite scheme: class A has B and C class instead of class A is B and C class.

Update: Extracted from perltoot:

In practice, few class modules have been seen that actually make use of MI. One nearly always chooses simple containership of one class within another over MI. That’s why our Person object contained a Fullname object. That doesn’t mean it was one.


Igor S. Lopes - izut
surrender to perl. your code, your rules.