Checking in changes prior to tagging of version 0.65.
[gitmo/Mouse.git] / lib / Mouse / Meta / Class.pm
index b1cffd8..b8b2e4d 100644 (file)
@@ -209,9 +209,13 @@ sub add_attribute {
 
     weaken( $attr->{associated_class} = $self );
 
-    $self->{attributes}{$attr->name} = $attr;
+    # install accessors first
     $attr->install_accessors();
 
+    # then register the attribute to the metaclass
+    $attr->{insertion_order} = keys %{ $self->{attributes} };
+    $self->{attributes}{$attr->name} = $attr;
+
     if(!$attr->{associated_methods} && ($attr->{is} || '') ne 'bare'){
         Carp::carp(qq{Attribute ($name) of class }.$self->name
             .qq{ has no associated methods (did you mean to provide an "is" argument?)});
@@ -219,27 +223,11 @@ sub add_attribute {
     return $attr;
 }
 
-sub compute_all_applicable_attributes { # DEPRECATED
-    Carp::cluck('compute_all_applicable_attributes() has been deprecated. Use get_all_attributes() instead');
-
-    return shift->get_all_attributes(@_)
-}
-
 sub linearized_isa;
 
 sub new_object;
 sub clone_object;
 
-
-sub clone_instance { # DEPRECATED
-    my ($class, $instance, %params) = @_;
-
-    Carp::cluck('clone_instance() has been deprecated. Use clone_object() instead');
-
-    return $class->clone_object($instance, %params);
-}
-
-
 sub immutable_options {
     my ( $self, @args ) = @_;
 
@@ -251,15 +239,12 @@ sub immutable_options {
     );
 }
 
-
 sub make_immutable {
     my $self = shift;
     my %args = $self->immutable_options(@_);
 
     $self->{is_immutable}++;
 
-    $self->{strict_constructor} = $args{strict_constructor};
-
     if ($args{inline_constructor}) {
         $self->add_method($args{constructor_name} =>
             Mouse::Util::load_class($self->constructor_class)
@@ -488,7 +473,7 @@ Mouse::Meta::Class - The Mouse class metaclass
 
 =head1 VERSION
 
-This document describes Mouse version 0.61
+This document describes Mouse version 0.65
 
 =head1 METHODS