Simplify error check routines in XS
[gitmo/Mouse.git] / xs-src / MouseAttribute.xs
index 8ea3a06..617a99a 100644 (file)
@@ -280,10 +280,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){