only require that attributes implement CMOP::Mixin::AttributeBase to add them to...
Dave Rolsky [Sat, 26 Dec 2009 19:11:10 +0000 (13:11 -0600)]
lib/Class/MOP/Mixin/HasAttributes.pm

index 55d42ec..7103fa8 100644 (file)
@@ -17,9 +17,9 @@ sub add_attribute {
     my $attribute
         = blessed( $_[0] ) ? $_[0] : $self->attribute_metaclass->new(@_);
 
-    ( $attribute->isa('Class::MOP::Attribute') )
+    ( $attribute->isa('Class::MOP::Mixin::AttributeBase') )
         || confess
-        "Your attribute must be an instance of Class::MOP::Attribute (or a subclass)";
+        "Your attribute must be an instance of Class::MOP::Mixin::AttributeBase (or a subclass)";
 
     $self->_attach_attribute($attribute);