ENTER;
SAVETMPS;
- xa = newAV();
+ xa = newAV();
mg = sv_magicext(SvRV(attr), (SV*)xa, PERL_MAGIC_ext, &mouse_xa_vtbl, NULL, 0);
SvREFCNT_dec(xa); /* refcnt++ in sv_magicext */
return value;
}
+/* checks $isa->does($does) */
static void
mouse_check_isa_does_does(pTHX_ SV* const klass, SV* const name, SV* const isa, SV* const does){
STRLEN len;
_process_options(SV* klass, SV* name, HV* args)
CODE:
{
+ /* TODO: initialize 'xa' here */
SV** svp;
SV* tc = NULL;
"without a default, builder, or an init_arg", name);
}
- /* taken from Mouse::Meta::Attribute->new and ->_process_args */
+ /* taken from Mouse::Meta::Attribute->new and ->_process_args */
svp = hv_fetchs(args, "is", FALSE);
if(svp){
else{
svp = hv_fetchs(args, "accessor", TRUE);
}
- sv_setsv(*svp, name);
+ if(!SvOK(*svp)) {
+ sv_setsv(*svp, name);
+ }
}
else if(strEQ(is, "bare")){
- /* do nothing, but don't complain (later) about missing methods */
+ /* do nothing, but might complain later about missing methods */
}
else{
mouse_throw_error(klass, NULL,