add curried_arguments, usable from hashref handles
[gitmo/Moose.git] / lib / Moose / Meta / Attribute.pm
index 81bdb2c..bf599be 100644 (file)
@@ -691,11 +691,17 @@ sub _make_delegation_method {
     $method_body = $method_to_call
         if 'CODE' eq ref($method_to_call);
 
+    my $curried_arguments = [];
+
+    ($method_to_call, $curried_arguments) = @$method_to_call
+        if 'ARRAY' eq ref($method_to_call);
+
     return $self->delegation_metaclass->new(
         name               => $handle_name,
         package_name       => $self->associated_class->name,
         attribute          => $self,
         delegate_to_method => $method_to_call,
+        curried_arguments  => $curried_arguments,
     );
 }