Merge branch 'stable'
[gitmo/Class-MOP.git] / lib / Class / MOP / Method / Constructor.pm
index b64c1c5..29017ed 100644 (file)
@@ -8,7 +8,7 @@ use Carp         'confess';
 use Scalar::Util 'blessed', 'weaken';
 use Try::Tiny;
 
-our $VERSION   = '1.11';
+our $VERSION   = '1.12';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -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