X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=author%2Fattr_order.pl;fp=author%2Fattr_order.pl;h=14c688b78211960bf9fcdaf73ec27b0aa8f1a396;hp=0000000000000000000000000000000000000000;hb=abbcd124154fda138a43e996d4a521c79d16d72d;hpb=f6c81f00b84bc277a9151337f2a7cc275937f3b8 diff --git a/author/attr_order.pl b/author/attr_order.pl new file mode 100644 index 0000000..14c688b --- /dev/null +++ b/author/attr_order.pl @@ -0,0 +1,31 @@ +package Base; +use Any::Moose; + +has [qw(aaa bbb ccc)] => ( + is => 'rw', +); + +package D1; +use Any::Moose; +extends qw(Base); +has [qw(ddd eee fff)] => ( + is => 'rw', +); + +package D2; +use Any::Moose; +extends qw(D1); +has [qw(ggg hhh iii)] => ( + is => 'rw', +); + +package main; +use Test::More; +use Test::Mouse; + +with_immutable { + my $attrs_list = join ",", + map { $_->name } D2->meta->get_all_attributes; + is $attrs_list, join ",", qw(aaa bbb ccc ddd eee fff ggg hhh iii); +} qw(Base D1 D2); +done_testing;