Well I'm feeling a bit better about myself since it turns out MooseX::Role::Flyweight also calls BUILDARGS twice, it's just careful to pass the original arguments to the new in Moose::Object, rather than the already-processed ones. You just hope the BUILDARGS it's calling doesn't do anything that is a problem if it's done more than once.
I couldn't seem to figure out how to override _generate_fallback_constructor (from Class::MOP::Class) on a metaclass instance (I tried making a role with a method by that name and applying it, but it didn't seem to work). My head starts to spin whenever I think too much about applying roles to instances of metaclasses.
|