projects
/
gitmo/Moose.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
7f76c1ae5facdbbb0fc4fa7e4ecf7719b9f8da01
[gitmo/Moose.git]
/
t
/
070_native_traits
/
010_array_from_role.t
1
#!/usr/bin/perl
2
3
use strict;
4
use warnings;
5
6
use Test::More;
7
use Test::Exception;
8
9
{
10
package Foo;
11
use Moose;
12
13
has 'bar' => ( is => 'rw' );
14
15
package Stuffed::Role;
16
use Moose::Role;
17
18
has 'options' => (
19
traits => ['Array'],
20
is => 'ro',
21
isa => 'ArrayRef[Foo]',
22
);
23
24
package Bulkie::Role;
25
use Moose::Role;
26
27
has 'stuff' => (
28
traits => ['Array'],
29
is => 'ro',
30
isa => 'ArrayRef',
31
handles => {
32
get_stuff => 'get',
33
}
34
);
35
36
package Stuff;
37
use Moose;
38
39
::lives_ok{ with 'Stuffed::Role';
40
} '... this should work correctly';
41
42
::lives_ok{ with 'Bulkie::Role';
43
} '... this should work correctly';
44
}
45
46
done_testing;