23 around monkey => sub { 'OW' };
25 has trap => (is => 'ro', default => sub { -1 });
51 around monkey => sub { 'OW' };
53 has trap => (is => 'ro', default => sub { -1 });
93 package Ker::Splattered;
105 package Ker::Splattered2;
109 sub monkey { 'WHAT' }
111 with qw/ Ker Splat2 /;
117 package KerSplattered;
121 sub monkey { 'WHAT' }
129 package KerSplattered2;
133 sub monkey { 'WHAT' }
135 with qw/ KerSplat2 /;
145 has pp => (is => 'rw', moosify => sub {
147 $spec->{documentation} = 'moosify';
157 has vv => (is => 'rw', moosify => [quote_sub(q|
158 $_[0]->{documentation} = 'moosify';
159 |), sub { $_[0]->{documentation} = $_[0]->{documentation}.' foo'; }]);
181 has kk => (is => 'rw', moosify => [sub {
182 $_[0]->{documentation} = 'parent';
189 has '+kk' => (moosify => sub {
191 $spec->{documentation} .= 'child';
198 Ker::Splattered->new,
199 Ker::Splattered2->new,
204 and is($s->punch, 1, 'punch');
206 and is($s->jab, 3, 'jab');
207 ok($s->can('monkey'))
208 and is($s->monkey, 'OW', 'monkey');
210 and is($s->trap, -1, 'trap');
219 ok $c->can('has_ker');
220 ok $c->can('has_splat');
223 is(Plunker->meta->find_attribute_by_name('pp')->documentation, 'moosify', 'moosify modifies attr specs');
224 is(Planker->meta->find_attribute_by_name('vv')->documentation, 'moosify foo', 'moosify modifies attr specs as array');
226 is( Plonker->meta->find_attribute_by_name('kk')->documentation,
228 'moosify applies for overridden attributes with roles');