MOUSEf_XC_IS_ANON = 0x0002,
MOUSEf_XC_HAS_BUILDARGS = 0x0004,
+ MOUSEf_XC_HAS_STRICT_CONSTRUCTOR
+ = 0x0008,
+
MOUSEf_XC_mask = 0xFFFF /* not used */
};
flags |= MOUSEf_XC_HAS_BUILDARGS;
}
+ if(predicate_calls(metaclass, "_has_strict_constructor")){
+ flags |= MOUSEf_XC_HAS_STRICT_CONSTRUCTOR;
+ }
+
av_store(xc, MOUSE_XC_FLAGS, newSVuv(flags));
av_store(xc, MOUSE_XC_ATTRALL, (SV*)attrall);
av_store(xc, MOUSE_XC_BUILDALL, (SV*)buildall);
}
}
- if(used < HvUSEDKEYS(args)){
+ if(MOUSE_xc_flags(xc) & MOUSEf_XC_HAS_STRICT_CONSTRUCTOR && used < HvUSEDKEYS(args)){
mouse_report_unmatched_keys(aTHX_ meta, attrs, args);
}
INSTALL_SIMPLE_READER(Class, roles);
INSTALL_SIMPLE_PREDICATE_WITH_KEY(Class, is_anon_class, anon_serial_id);
INSTALL_SIMPLE_READER(Class, is_immutable);
+ INSTALL_SIMPLE_READER_WITH_KEY(Class, has_strict_constructor, _strict_constructor);
INSTALL_CLASS_HOLDER(Class, method_metaclass, "Mouse::Meta::Method");
INSTALL_CLASS_HOLDER(Class, attribute_metaclass, "Mouse::Meta::Attribute");