Branch Coverage

blib/lib/Elastic/Model/TypeMap/Base.pm
Criterion Covered Total %
branch 52 66 78.7


line true false branch
24 0 149 if $callee->isa('Elastic::Model::TypeMap::Base') or @args == 0
43 126 126 if /^[:-]/
54 7 48 if ref $deflator
64 22 55 unless $attr->can('deflator') and $attr->deflator or eval {
73 7 48 if ref $inflator
83 22 55 unless $attr->can('inflator') and $attr->inflator or eval {
92 187 18 if $attr->can('mapping')
93 1 204 if $mapping and %$mapping
98 1 201 if @mapping % 2
104 8 196 unless %mapping
116 7 45 $error ? :
132 619 393 if (my $handler = $$handlers{$name} || $$handlers{ref $tc})
136 11 382 unless my $parent = $tc->can('parent') && $tc->parent
157 0 0 if (ref $deflator)
165 0 0 if ($is_lazy) { }
174 0 0 unless $is_lazy
215 0 0 if (ref $inflator)
344 1 31 unless %props
363 89 18 if ($attr->can('type'))
365 14 75 if ($new_type and $new_type ne $type)
366 8 6 if $type eq 'object'
372 0 107 unless $type
374 0 107 unless my $allowed = $Allowed_Attrs{$type}
376 18 89 unless does_role($attr, 'Elastic::Model::Trait::Field')
380 1746 108 unless defined $val
381 11 97 unless $$allowed{$key}
389 63 15 unless my $multi = delete $$mapping{'multi'}
395 0 19 if $name eq $main
400 0 19 unless $allowed = $Allowed_Attrs{$multi_type}
404 6 29 unless $$allowed{$key} or $key eq 'type'
419 5 86 if $$defn{'index_analyzer'} and $$defn{'search_analyzer'}
461 1122 1010 if $class->can('original_class')
478 0 378 unless my $types = $$import{$_}