blob: af149d7dea7dbe0d74a80e360e16acbf1e4092eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
use strict;
use warnings;
use Test::More;
use Test::Fatal;
{
package Bomb;
use Moose::Role;
sub fuse { }
sub explode { }
package Spouse;
use Moose::Role;
sub fuse { }
sub explode { }
package Caninish;
use Moose::Role;
sub bark { }
package Treeve;
use Moose::Role;
sub bark { }
}
{
package PracticalJoke;
use Moose;
::like( ::exception {
with 'Bomb', 'Spouse';
}, qr/Due to method name conflicts in roles 'Bomb' and 'Spouse', the methods 'explode' and 'fuse' must be implemented or excluded by 'PracticalJoke'/ );
::like( ::exception {
with (
'Bomb', 'Spouse',
'Caninish', 'Treeve',
);
}, qr/Due to a method name conflict in roles 'Caninish' and 'Treeve', the method 'bark' must be implemented or excluded by 'PracticalJoke'/ );
}
done_testing;
|