attributes attribute for Class::MOP::Instance
Yuval Kogman [Fri, 8 Aug 2008 23:45:00 +0000 (23:45 +0000)]
lib/Class/MOP.pm
lib/Class/MOP/Instance.pm

index 451a5ee..50db76c 100644 (file)
@@ -727,6 +727,10 @@ Class::MOP::Instance->meta->add_attribute(
 );
 
 Class::MOP::Instance->meta->add_attribute(
+    Class::MOP::Attribute->new('attributes')
+);
+
+Class::MOP::Instance->meta->add_attribute(
     Class::MOP::Attribute->new('slots')
 );
 
index 2d3079a..cccf41c 100644 (file)
@@ -47,8 +47,9 @@ sub new {
         # assumption,.. but you can
         # never tell <:)
         'associated_metaclass' => $options->{associated_metaclass},
-        'slots'     => $options->{slots},
-        'slot_hash' => $options->{slot_hash},
+        'attributes' => $options->{attributes},
+        'slots'      => $options->{slots},
+        'slot_hash'  => $options->{slot_hash},
     } => $class;
 
     # FIXME weak_ref => 1,