Branch Coverage

blib/lib/Class/Tiny/ConstrainedAccessor.pm
Criterion Covered Total %
branch 54 54 100.0


line true false branch
132 1 24 if ref $_[0] eq 'ARRAY'
135 1 24 if (ref $_[0] eq 'HASH' and scalar @_ == 1) { }
138 2 22 if @_ % 2
166 2 10 $has_build ? :
180 7 38 if (ref $type eq 'ARRAY')
181 2 5 unless scalar @$type == 2
183 1 4 unless ref $type->[0] eq 'CODE'
184 1 3 unless ref $type->[1] eq 'CODE'
189 6 26 unless $type->can('name')
190 27 11 if $name
193 15 23 unless $name
199 3 35 if (ref $type eq 'CODE')
205 3 32 unless ref $type
208 15 17 if (my $method = eval { do { $type->can('compiled_check') } })
214 12 4 unless $type->can('inline_check')
7 10 if (my $method = eval { do { $type->can('_inline_check') unless $type->can('inline_check') } })
221 1 6 if $checker
224 9 7 if (my $method = eval { do { $type->can('check') } })
231 3 4 if (eval { do { $type->can('value_is_valid') } })
238 4 31 unless $checker
252 1260 66 if (@_) { }
23 43 elsif (exists $self_->{$k}) { }
253 860 400 unless &$checker($_[0])
264 21 22 if ref $def_ eq 'CODE'
266 3 40 unless &$checker($def_)
281 47 76 unless exists $accessors{$k}
283 45 31 unless &$checker($args->{$k})