4 use Test::More tests => 11;
18 is_deeply(Role->meta->get_attribute('attr'), {default => 'Role'});
28 ok(Class->meta->has_attribute('attr'), "role application added the attribute");
29 is(Class->meta->get_attribute('attr')->default, 'Role');
49 is(Class2->meta->get_attribute('attr')->default, 'Role');
62 is(Class3->meta->get_attribute('attr')->default, 'Class3');
65 package Class::Parent;
69 default => 'Class::Parent',
73 is(Class::Parent->meta->get_attribute('attr')->default, 'Class::Parent', 'local class wins over the role');
79 extends 'Class::Parent';
84 is(Class::Child->meta->get_attribute('attr')->default, 'Role', 'role wins over the parent method');