projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
acf0f64
)
Give Meta::Role a name method
Shawn M Moore [Tue, 17 Jun 2008 03:27:29 +0000 (
03:27
+0000)]
lib/Mouse/Meta/Role.pm
patch
|
blob
|
blame
|
history
t/401-meta-role.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse/Meta/Role.pm
b/lib/Mouse/Meta/Role.pm
index
936f172
..
f04dd18
100644
(file)
--- 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
(file)
--- 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");
+