sv_setuv(MOUSE_xc_gen(xc), mro_get_pkg_gen(stash));
}
-AV*
+static AV*
mouse_get_xc(pTHX_ SV* const metaclass) {
AV* xc;
SV* gen;
return xc;
}
-HV*
+static HV*
mouse_buildargs(pTHX_ SV* metaclass, SV* const klass, I32 ax, I32 items) {
HV* args;
return args;
}
-void
+static void
mouse_class_initialize_object(pTHX_ SV* const meta, SV* const object, HV* const args, bool const ignore_triggers) {
AV* const xc = mouse_get_xc(aTHX_ meta);
AV* const attrs = MOUSE_xc_attrall(xc);
set_slot(methods, name, code); /* $self->{methods}{$name} = $code */
- /* TODO: name the CODE ref if it's anonymous */
- //code_entity = (CV*)SvRV(code_ref);
- //if(CvANON(code_entity)
- // && CvGV(code_entity) /* a cv under construction has no gv */ ){
+ /* name the CODE ref if it's anonymous */
+ {
+ CV* const code_entity = (CV*)SvRV(code_ref);
+ if(CvANON(code_entity)
+ && CvGV(code_entity) /* a cv under construction has no gv */ ){
- // CvGV(code_entity) = gv;
- // CvANON_off(code_entity);
- //}
+ CvGV(code_entity) = gv;
+ CvANON_off(code_entity);
+ }
+ }
}
MODULE = Mouse PACKAGE = Mouse::Meta::Class