need to use a consistent sort order, now that this isn't cached
[gitmo/Class-MOP.git] / lib / Class / MOP / Method / Constructor.pm
index b64c1c5..31392dd 100644 (file)
@@ -75,7 +75,10 @@ sub associated_metaclass { (shift)->{'associated_metaclass'} }
 
 sub _attributes {
     my $self = shift;
-    $self->{'attributes'} ||= [ $self->associated_metaclass->get_all_attributes ]
+    $self->{'attributes'} ||= [
+        sort { $a->name cmp $b->name }
+             $self->associated_metaclass->get_all_attributes
+    ]
 }
 
 ## method