projects
/
gitmo/Mouse.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
26482d3
)
Make sure "with" works
Shawn M Moore [Tue, 17 Jun 2008 02:49:09 +0000 (
02:49
+0000)]
lib/Mouse/Role.pm
patch
|
blob
|
blame
|
history
t/400-define-role.t
patch
|
blob
|
blame
|
history
diff --git
a/lib/Mouse/Role.pm
b/lib/Mouse/Role.pm
index
3392f3e
..
b1164aa
100644
(file)
--- a/
lib/Mouse/Role.pm
+++ b/
lib/Mouse/Role.pm
@@
-27,6
+27,9
@@
do {
has => sub {
return sub { }
},
+ with => sub {
+ return sub { }
+ },
);
my $exporter = Sub::Exporter::build_exporter({
diff --git
a/t/400-define-role.t
b/t/400-define-role.t
index
ffc51d8
..
bde983f
100644
(file)
--- a/
t/400-define-role.t
+++ b/
t/400-define-role.t
@@
-49,3
+49,18
@@
lives_ok {
no Mouse::Role;
};
+do {
+ package Other::Role;
+ use Mouse::Role;
+ no Mouse::Role;
+};
+
+lives_ok {
+ package Role;
+ use Mouse::Role;
+
+ with 'Other::Role';
+
+ no Mouse::Role;
+};
+