Avoid compiler's warnings
[gitmo/Mouse.git] / xs-src / MouseAttribute.xs
index 8ea3a06..6958375 100644 (file)
@@ -249,6 +249,7 @@ BOOT:
     INSTALL_SIMPLE_READER_WITH_KEY(Attribute, should_auto_deref, auto_deref);
     INSTALL_SIMPLE_READER_WITH_KEY(Attribute, should_coerce, coerce);
     INSTALL_SIMPLE_READER(Attribute, documentation);
+    INSTALL_SIMPLE_READER(Attribute, insertion_order);
 
     /* predicates */
     INSTALL_SIMPLE_PREDICATE_WITH_KEY(Attribute, has_accessor, accessor);
@@ -280,10 +281,7 @@ CODE:
 
     /* taken from Class::MOP::Attribute::new */
 
-    if(!SvOK(name)){
-        mouse_throw_error(klass, NULL,
-            "You must provide a name for the attribute");
-    }
+    must_defined(name, "an attribute name");
 
     svp = hv_fetchs(args, "init_arg", FALSE);
     if(!svp){