extern SV* mouse_package;
extern SV* mouse_namespace;
+extern SV* mouse_methods;
+extern SV* mouse_name;
void
mouse_throw_error(SV* const metaobject, SV* const data /* not used */, const char* const fmt, ...)
SV* mouse_package;
SV* mouse_namespace;
SV* mouse_methods;
+SV* mouse_name;
MODULE = Mouse PACKAGE = Mouse::Util
mouse_package = newSVpvs_share("package");
mouse_namespace = newSVpvs_share("namespace");
mouse_methods = newSVpvs_share("methods");
+ mouse_name = newSVpvs_share("name");
MOUSE_CALL_BOOT(Mouse__Util__TypeConstraints);
CV*
mouse_instantiate_xs_accessor(pTHX_ SV* const attr, XSUBADDR_t const accessor_impl){
- SV* const slot = mcall0s(attr, "name");
+ SV* const slot = mcall0(attr, mouse_name);
AV* const xa = newAV();
CV* xsub;
MAGIC* mg;
else{
mouse_throw_error(attr, tc,
"Can not auto de-reference the type constraint '%"SVf"'",
- mcall0s(tc, "name"));
+ mcall0(tc, mouse_name));
}
}
if(!mouse_tc_check(aTHX_ tc_code, value)){
mouse_throw_error(MOUSE_xa_attribute(xa), value,
"Attribute (%"SVf") does not pass the type constraint because: %"SVf,
- mcall0s(MOUSE_xa_attribute(xa), "name"),
+ mcall0(MOUSE_xa_attribute(xa), mouse_name),
mcall1s(tc, "get_message", value));
}