10 has attr => ( is => 'rw', isa => 'Str' );
18 has '+attr' => ( lazy_build => 1 );
25 my $parent = Parent->new();
26 my $child = Child->new();
29 !$parent->meta->get_attribute('attr')->is_lazy_build,
30 'attribute in parent does not have lazy_build trait'
33 !$parent->meta->get_attribute('attr')->is_lazy,
34 'attribute in parent does not have lazy trait'
37 !$parent->meta->get_attribute('attr')->has_builder,
38 'attribute in parent does not have a builder method'
41 !$parent->meta->get_attribute('attr')->has_clearer,
42 'attribute in parent does not have a clearer method'
45 !$parent->meta->get_attribute('attr')->has_predicate,
46 'attribute in parent does not have a predicate method'
50 $child->meta->get_attribute('attr')->is_lazy_build,
51 'attribute in child has the lazy_build trait'
54 $child->meta->get_attribute('attr')->is_lazy,
55 'attribute in child has the lazy trait'
58 $child->meta->get_attribute('attr')->has_builder,
59 'attribute in child has a builder method'
62 $child->meta->get_attribute('attr')->has_clearer,
63 'attribute in child has a clearer method'
66 $child->meta->get_attribute('attr')->has_predicate,
67 'attribute in child has a predicate method'
71 $child->attr, 'value',
72 'attribute defined as lazy_build in child is properly built'