From: Dagfinn Ilmari Mannsåker Date: Mon, 22 Sep 2014 17:25:30 +0000 (+0100) Subject: Explicitly return the DOES coderef if we install it X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FRole-Tiny.git;a=commitdiff_plain;h=d2af51c61ea875770e562beb4373c9908e29b9bd Explicitly return the DOES coderef if we install it Moo::Role needs to name it if Sub::Name is installed, so make it clear that the return value is deliberate. --- diff --git a/lib/Role/Tiny.pm b/lib/Role/Tiny.pm index f3d7333..1bd95c3 100644 --- a/lib/Role/Tiny.pm +++ b/lib/Role/Tiny.pm @@ -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 {