4 use Test::More tests => 11;
19 is(Role->meta->get_attribute('attr')->{default}, 'Role');
29 ok(Class->meta->has_attribute('attr'), "role application added the attribute");
30 is(Class->meta->get_attribute('attr')->default, 'Role');
51 is(Class2->meta->get_attribute('attr')->default, 'Role');
65 is(Class3->meta->get_attribute('attr')->default, 'Class3');
68 package Class::Parent;
73 default => 'Class::Parent',
77 is(Class::Parent->meta->get_attribute('attr')->default, 'Class::Parent', 'local class wins over the role');
83 extends 'Class::Parent';
88 is(Class::Child->meta->get_attribute('attr')->default, 'Role', 'role wins over the parent method');