Add $attr->insertion_order
[gitmo/Mouse.git] / lib / Mouse / Meta / Class.pm
index 7963f78..a21c83d 100644 (file)
@@ -209,6 +209,7 @@ sub add_attribute {
 
     weaken( $attr->{associated_class} = $self );
 
+    $attr->{insertion_order} = keys %{ $self->{attributes} };
     $self->{attributes}{$attr->name} = $attr;
     $attr->install_accessors();