Branch Coverage

blib/lib/Class/Tiny/ConstrainedAccessor.pm
Criterion Covered Total %
branch 45 46 97.8


line true false branch
133 1 25 if ref $_[0] eq 'ARRAY'
136 1 25 if (ref $_[0] eq 'HASH' and scalar @_ == 1) { }
139 2 23 if @_ % 2
167 2 11 $has_build ? :
180 9 26 unless $type->can('name')
181 27 20 if $name
184 24 23 unless $name
188 7 40 if (ref $type eq 'ARRAY')
189 2 5 unless scalar @$type == 2
191 1 4 unless ref $type->[0] eq 'CODE'
192 1 3 unless ref $type->[1] eq 'CODE'
200 6 34 if (ref $type eq 'Specio::Constraint::Simple' or eval { do { $type->can('value_is_valid') } })
216 3 31 if (ref $type eq 'CODE')
221 182 47 if ($@) { }
47 0 elsif (not defined $is_ok) { }
232 7 27 unless ref $impl eq 'Type::Tiny'
246 1386 72 if (@_) { }
25 47 elsif (exists $self_->{$k}) { }
247 946 440 unless &$checker($_[0])
258 23 24 if ref $def_ eq 'CODE'
260 3 44 unless &$checker($def_)
275 54 84 unless exists $accessors{$k}
277 50 34 unless &$checker($args->{$k})