Make Mouse::Util::load_class return the argument class name, which can remove several...
[gitmo/Mouse.git] / lib / Mouse / Meta / Attribute.pm
index 985f046..315eaa4 100644 (file)
@@ -378,10 +378,8 @@ sub _canonicalize_handles {
 
 sub _make_delegation_method {
     my($self, $handle, $method_to_call) = @_;
-    my $delegator = $self->delegation_metaclass;
-    Mouse::Util::load_class($delegator);
-
-    return $delegator->_generate_delegation($self, $handle, $method_to_call);
+    return Mouse::Util::load_class($self->delegation_metaclass)
+        ->_generate_delegation($self, $handle, $method_to_call);
 }
 
 sub throw_error{