laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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. In reply to Re^6: Object Constructors - Advice of experienced OO Perl Monks
by izut
|
|