> > > I had to copy-paste two methods from > > > Moose::Meta::Method::Constructor with > > > very little changes. Any interest in changing Moose to avoid this? > > > Any ideas > > > how to do this properly? > > > > Would need to know more of what it is you actually did to know if we > > could do something in the Moose guts. And of course topic branches are > > *always* welcome :) > > I had to overwrite _generate_slot_assignment and _generate_triggers, which > are the only methods of of Meta::Method::Constructor which use the > instance meta object to access slots. My versions are nearly identical. > Imho > Method::Constructor should not assume an exact way how the Attribute uses > Meta::Instance to store itself in the object, but rather let the Attribute > decide. > > I went ahead and tried to make the needed changes myself. The resulting > diff is at > http://github.com/xabbu42/moose/commit/a0cfca605c06d3e5c3750b6dc774e9b806bc5dd7 > > I get some failing tests because the M::Meta::Method::* in Moose apparently > need to work with Class::MOP::Attribute too. So for this approach to work, > the diff for M::Meta::Attribute actually belongs into > Class::MOP::Attribute. > So what about this change? Any chance to get it in Class::MOP/Moose if I finish and properly test it? Wrong approach?...
> > By the way, why is sometimes $attr->slots and sometimes $attr->name used? I need to know if there is a difference here which should be supported. - xabbu42