start sketching out an overload api for the mop
[gitmo/Moose.git] / lib / Class / MOP / Method / Constructor.pm
index 8a35df8..0b4ef7d 100644 (file)
@@ -67,16 +67,6 @@ sub _new {
 sub options              { (shift)->{'options'}              }
 sub associated_metaclass { (shift)->{'associated_metaclass'} }
 
-## cached values ...
-
-sub _attributes {
-    my $self = shift;
-    $self->{'attributes'} ||= [
-        sort { $a->name cmp $b->name }
-             $self->associated_metaclass->get_all_attributes
-    ]
-}
-
 ## method
 
 sub _initialize_body {
@@ -90,10 +80,7 @@ sub _initialize_body {
 
 sub _eval_environment {
     my $self = shift;
-    my $defaults = [map { $_->default } @{ $self->_attributes }];
-    return {
-        '$defaults' => \$defaults,
-    };
+    return $self->associated_metaclass->_eval_environment;
 }
 
 sub _generate_constructor_method {