From: Shawn M Moore Date: Tue, 17 Jun 2008 03:27:29 +0000 (+0000) Subject: Give Meta::Role a name method X-Git-Tag: 0.19~305 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=513854c70d1a49d9c09c9f406cc30fd33fe95e59;p=gitmo%2FMouse.git Give Meta::Role a name method --- diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index 936f172..f04dd18 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -30,5 +30,7 @@ sub new { bless \%args, $class; } +sub name { $_[0]->{name} } + 1; diff --git a/t/401-meta-role.t b/t/401-meta-role.t index 827cd3b..7fa345f 100644 --- a/t/401-meta-role.t +++ b/t/401-meta-role.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 3; do { package Role; @@ -13,3 +13,5 @@ do { ok(Role->meta, "Role has a meta"); isa_ok(Role->meta, "Mouse::Meta::Role"); +is(Role->meta->name, "Role"); +