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 Ker::Splattered->new,
182 Ker::Splattered2->new,
187 and is($s->punch, 1, 'punch');
189 and is($s->jab, 3, 'jab');
190 ok($s->can('monkey'))
191 and is($s->monkey, 'OW', 'monkey');
193 and is($s->trap, -1, 'trap');
202 ok $c->can('has_ker');
203 ok $c->can('has_splat');
206 foreach my $c (Plunker->new) {
207 is(Plunker->meta->find_attribute_by_name('pp')->documentation, 'moosify', 'moosify modifies attr specs');
208 is(Planker->meta->find_attribute_by_name('vv')->documentation, 'moosify foo', 'moosify modifies attr specs as array');