note
stvn
<P>
There are two important things to note about the [cpan://Moose] solution, which make it superior to the [cpan://Class::Std] solution.
<OL>
<LI>A Mouse is not a Danger</LI>
<p>Inheritance is an "is-a" relationship, and the Class::Std version incorrectly models the Mouse's relationship with Danger. The Moose version states that a Mouse "does" Danger, which still doesn't read quite right, but Danger is clearly more of a Trait of this particular Mouse, and not something that the Mouse "is".</p>
<LI>The CUMULATIVE(BASE FIRST) approach lacks a degree of control</LI>
<p>Because CUMULATIVE(BASE FIRST) determines the order in which your methods are called, you are limited to how much control you can have. Using the Moose modifiers before/after/around you have a great degree of control over when and how your methods get called. Moose also provides augment/inner which only works with classes (it makes no sense for roles), but also provides a more flexible and powerful means of controlling dispatch. See the [cpan://Moose::Cookbook::Recipe7] for a good example of this.</p>
</OL>
It should also be noted (with all due respect to [TheDamian]) that that [cpan://Class::Std] has [http://rt.cpan.org/Public/Dist/Display.html?Name=Class-Std|56 outstanding Bugs] some over 2 years old and many which are quite serious. It also seems to be no longer maintained (last upload was Feb. 2006). In contrast, [cpan://Moose] is very actively developed by a handful of developers and is being used heavily in several large production sites so bugs tend to get fixed rather quickly.
</P>
<div class="pmsig"><div class="pmsig-315586">
-stvn
</div></div>
653366
653534