From: Matt S Trout Date: Mon, 15 Nov 2010 02:55:00 +0000 (+0000) Subject: make does_role work on objects X-Git-Tag: 0.009001~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=390ac4068b5bb91b4605206917c1c83548cc2dd6;p=gitmo%2FRole-Tiny.git make does_role work on objects --- diff --git a/lib/Role/Tiny.pm b/lib/Role/Tiny.pm index 669d0a3..ebf9807 100644 --- a/lib/Role/Tiny.pm +++ b/lib/Role/Tiny.pm @@ -215,8 +215,8 @@ sub _install_single_modifier { } sub does_role { - my ($package, $role) = @_; - return exists $APPLIED_TO{$package}{$role}; + my ($proto, $role) = @_; + return exists $APPLIED_TO{ref($proto)||$proto}{$role}; } 1;