ingydotnet/moos-pm — pull request #8 by tobyink (2012-10-28 13:35:33+00:00)
Title: Latest batch of changes

* Adds support for Moose attribute triggers (i.e. a coderef that is run whenever an attribute value is set). The implementation should be fairly compatible with Moose and Moo. An attribute with a trigger is no longer "simple", so adding a trigger to an attribute sacrifices XS.

* An optimisation for non-XS "simple" accessors and predicates; and for delegation and clearers. Rather than closing over `$name` we generate the sub using a stringy eval that interpolates `$name`. According to my benchmark script this speeds up the non-XS accessors by about 50%.

* Backport to Perl 5.8. This adds a dependency on MRO::Compat, but **only when running on Perl 5.8**. Under Perl 5.10+ there are still no non-core dependencies.

With this done, the only major Moo/Moose features not supported by Moos are: roles, type constraints/coercion and method modifiers. I have no plans to add those, but it would be nice to do a little testing to make sure that Moos plays nice with Role::Tiny and Class::Method::Modifiers for those who need added features.