extern SV* mouse_namespace;
extern SV* mouse_methods;
extern SV* mouse_name;
+extern SV* mouse_coerce;
void
mouse_throw_error(SV* const metaobject, SV* const data /* not used */, const char* const fmt, ...)
#define NEED_newSVpvn_flags_GLOBAL
#include "mouse.h"
+/* keywords for methods/keys */
SV* mouse_package;
SV* mouse_namespace;
SV* mouse_methods;
SV* mouse_name;
SV* mouse_get_attribute;
SV* mouse_get_attribute_list;
+SV* mouse_coerce;
#define MOUSE_xc_flags(a) SvUVX(MOUSE_av_at((a), MOUSE_XC_FLAGS))
#define MOUSE_xc_gen(a) MOUSE_av_at((a), MOUSE_XC_GEN)
mouse_namespace = newSVpvs_share("namespace");
mouse_methods = newSVpvs_share("methods");
mouse_name = newSVpvs_share("name");
+ mouse_coerce = newSVpvs_share("coerce");
mouse_get_attribute = newSVpvs_share("get_attribute");
mouse_get_attribute_list = newSVpvs_share("get_attribute_list");
SV* tc_code;
if(flags & MOUSEf_ATTR_SHOULD_COERCE){
- value = mcall1s(tc, "coerce", value);
+ value = mcall1(tc, mouse_coerce, value);
}
if(!SvOK(MOUSE_xa_tc_code(xa))){