Composition is usually viewed as an alternative to inheritance for code reuse. You can find a wealth of information on it with
this Google search. It really has nothing to do with ObjectTemplate.pm, which is a fascinating piece of code but ultimately too slow to be very useful.