Change the internal delegation code
[gitmo/Mouse.git] / lib / Mouse / Meta / Method / Delegation.pm
index b44214c..6acee73 100644 (file)
@@ -3,8 +3,9 @@ use Mouse::Util qw(:meta); # enables strict and warnings
 use Scalar::Util;
 
 sub _generate_delegation{
-    my (undef, $attribute, $metaclass, $reader, $handle_name, $method_to_call) = @_;
+    my (undef, $attribute, $handle_name, $method_to_call) = @_;
 
+    my $reader = $attribute->get_read_method_ref();
     return sub {
         my $instance = shift;
         my $proxy    = $instance->$reader();