X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FRole.pm;h=92b39c17d66e411923d282ace5ce7c3b8b7bcc2d;hp=927945a4fcae7dfd138e09379f793ca21ca5c16f;hb=83d0a1f4f1f73b914e26c1fb52626331de318c68;hpb=0fc8adbcddaae0c610e5c1bc1beb067a9c265f69 diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index 927945a..92b39c1 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -32,11 +32,8 @@ sub new { sub name { $_[0]->{name} } -sub has_attribute { } - -sub add_attribute { - $_[0]->{attributes}->{$_[1]} = $_[2]; -} +sub has_attribute { exists $_[0]->{attributes}->{$_[1]} } +sub add_attribute { $_[0]->{attributes}->{$_[1]} = $_[2] } 1;