Mouse::Util::does_role() respects $thing->does() method
[gitmo/Mouse.git] / author / attr_order.pl
1 package Base;
2 use Any::Moose;
3
4 has [qw(aaa bbb ccc)] => (
5     is => 'rw',
6 );
7
8 package D1;
9 use Any::Moose;
10 extends qw(Base);
11 has [qw(ddd eee fff)] => (
12     is => 'rw',
13 );
14
15 package D2;
16 use Any::Moose;
17 extends qw(D1);
18 has [qw(ggg hhh iii)] => (
19     is => 'rw',
20 );
21
22 package main;
23 use Test::More;
24 use Test::Mouse;
25
26 with_immutable {
27     my $attrs_list = join ",",
28         map { $_->name } D2->meta->get_all_attributes;
29     is $attrs_list, join ",", qw(aaa bbb ccc ddd eee fff ggg hhh iii);
30 } qw(Base D1 D2);
31 done_testing;