projects
/
gitmo/Mouse.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix some issues on attributes
[gitmo/Mouse.git]
/
t
/
800_shikabased
/
007-multi-roles.t
1
use strict;
2
use warnings;
3
use Test::More tests => 3;
4
5
{
6
package Requires;
7
use Mouse::Role;
8
requires 'foo';
9
}
10
11
{
12
package Method;
13
use Mouse::Role;
14
15
sub foo { 'ok' }
16
}
17
18
{
19
package Method2;
20
use Mouse::Role;
21
22
sub bar { 'yep' }
23
}
24
25
{
26
package MyApp;
27
use Mouse;
28
with ('Requires', 'Method');
29
with ('Method2' => { alias => { bar => 'baz' } });
30
}
31
32
my $m = MyApp->new;
33
is $m->foo, 'ok';
34
is $m->bar, 'yep';
35
is $m->baz, 'yep';
36