Explicitly return the DOES coderef if we install it
[gitmo/Role-Tiny.git] / lib / Role / Tiny.pm
index f3d7333..1bd95c3 100644 (file)
@@ -426,7 +426,7 @@ sub _install_does {
     Role::Tiny::does_role($proto, $role) or $proto->$existing($role);
   };
   no warnings 'redefine';
-  *{_getglob "${to}::DOES"} = $new_sub;
+  return *{_getglob "${to}::DOES"} = $new_sub;
 }
 
 sub does_role {