X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FMethod%2FDelegation.pm;h=413f6da740dc687264f984f5ed4d8b10c3bb9945;hp=60bdad870b75dd23d9600b2d54bc36b6c713e61b;hb=21ee5bbbc20a3366955be77a589206295b5c0f9e;hpb=cb80a70a3d6101e0bc8f6576765a2d6c588d2ecd diff --git a/lib/Mouse/Meta/Method/Delegation.pm b/lib/Mouse/Meta/Method/Delegation.pm index 60bdad8..413f6da 100644 --- a/lib/Mouse/Meta/Method/Delegation.pm +++ b/lib/Mouse/Meta/Method/Delegation.pm @@ -3,7 +3,12 @@ use Mouse::Util qw(:meta); # enables strict and warnings use Scalar::Util; sub _generate_delegation{ - my (undef, $attr, $handle_name, $method_to_call, @curried_args) = @_; + my (undef, $attr, $handle_name, $method_to_call) = @_; + + my @curried_args; + if(ref($method_to_call) eq 'ARRAY'){ + ($method_to_call, @curried_args) = @{$method_to_call}; + } my $reader = $attr->get_read_method_ref();