tweak add_domain_model to default attribute metaclass rather than forcibly construct...
[catagits/Reaction.git] / lib / Reaction / Meta / InterfaceModel / Object / Class.pm
index 77fbbe4..da99ffe 100644 (file)
@@ -16,7 +16,8 @@ class Class is 'Reaction::Meta::Class', which {
 
   implements add_domain_model => as{
     my $self = shift;
-    $self->add_attribute( DomainModelAttribute->new(@_) );
+    my $name = shift;
+    $self->add_attribute($name, metaclass => DomainModelAttribute, @_);
   };
 
   implements parameter_attributes => as {