blob: d25f6e804e01a78ccbeec93e08f698a5ac8da747 (
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
48
49
50
51
52
53
54
55
56
57
|
use strict;
use warnings;
use Test::More;
use Test::Fatal;
{
package Foo::API;
use Moose::Role;
requires 'foo';
}
{
package Foo;
use Moose::Role;
has foo => (is => 'ro');
with 'Foo::API';
}
{
package Foo::Class;
use Moose;
{ our $TODO; local $TODO = "role accessors don't satisfy other role requires";
::is( ::exception { with 'Foo' }, undef, 'requirements are satisfied properly' );
}
}
{
package Bar;
use Moose::Role;
requires 'baz';
has bar => (is => 'ro');
}
{
package Baz;
use Moose::Role;
requires 'bar';
has baz => (is => 'ro');
}
{
package BarBaz;
use Moose;
{ our $TODO; local $TODO = "role accessors don't satisfy other role requires";
::is( ::exception { with qw(Bar Baz) }, undef, 'requirements are satisfied properly' );
}
}
done_testing;
|