projects
/
gitmo/Role-Tiny.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
failing test for method conflicts during role composition (argh)
[gitmo/Role-Tiny.git]
/
t
/
role-tiny-composition.t
1
use strict;
2
use warnings FATAL => 'all';
3
use Test::More;
4
use Test::Fatal;
5
6
{
7
package R1;
8
use Role::Tiny;
9
10
sub foo {}
11
12
$INC{"R1.pm"} = __FILE__;
13
}
14
15
{
16
package R2;
17
use Role::Tiny;
18
19
sub foo {}
20
21
$INC{"R2.pm"} = __FILE__;
22
}
23
24
{
25
package X;
26
sub new {
27
bless {} => shift
28
}
29
}
30
31
ok(exception { Role::Tiny->apply_roles_to_object(X->new, "R1", "R2") }, 'apply conflicting roles to object');
32
33
done_testing;