Subject: | __no_BUILD__ support |
One aspect of the object construction protocol we've added to Moo, Class::Tiny, and soon Moose (https://github.com/moose/Moose/pull/142) is __no_BUILD__. It is a parameter passed into the constructor that signifies that BUILD subs should not be called.
This is needed because when combining multiple object libraries in one inheritance chain, you end up with BUILD subs getting called multiple times, some at the wrong time.
With a Moo class inheriting from a Moose class, it will pass in __no_BUILD__ when calling the superclass constructor. Moose can then avoid calling BUILD, allowing Moo to do the remaining instance population and call the BUILD subs itself.
This does rely on nothing too goofy happening in BUILDARGS, but still seemed the best implementation of the idea.
It seems like it would be good for UNIVERSAL::Object to support this as well, although if other libraries were reimplemented in terms of UNIVERSAL::Object it likely wouldn't be needed.