Branch Coverage

blib/lib/DR/Tarantool/Spaces.pm
Criterion Covered Total %
branch 132 192 68.7


line true false branch
105 1 4 unless defined $spaces
106 1 4 unless 'HASH' eq ref $spaces
125 1 2 if @_ == 1
143 1 93 unless defined $space
144 6 87 if ($space =~ /^\d+$/)
145 0 6 unless exists $$self{'fast'}{$space}
149 0 87 unless exists $$self{'spaces'}{$space}
177 0 23 unless @_ == 4
193 0 19 unless @_ == 4
210 0 1 unless @_ == 3
225 0 1 unless @_ == 3
251 1 3 unless defined $no and $no =~ /^\d+$/
253 0 3 unless 'ARRAY' eq ref $$space{'fields'}
255 0 3 if not $$space{'indexes'} or 'HASH' ne ref $$space{'indexes'}
259 0 0 defined $name ? :
0 3 unless $name and $name =~ /^[a-z_]\w*$/i
267 0 3 unless $default_type =~ /$fqr/
272 9 6 if (ref $f eq 'HASH') { }
0 6 elsif (ref $f) { }
289 0 0 defined $$s{'type'} ? :
0 15 unless $$s{'type'} and $$s{'type'} =~ /$fqr/
293 0 0 defined $$s{'name'} ? :
0 15 unless $$s{'name'} and $$s{'name'} =~ /^[a-z_]\w*$/i
297 0 15 if exists $fast{$$s{'name'}}
302 3 0 if ($$space{'indexes'})
305 0 6 unless $no =~ /^\d+$/
309 2 4 if ('ARRAY' eq ref $l) { }
1 3 elsif ('HASH' eq ref $l) { }
315 1 0 ref $$l{'fields'} ? :
321 0 6 unless $name =~ /^[a-z_]\w*$/i
324 0 10 unless exists $fast{$_}
356 17 4 if @_ == 1
376 8 3 if ${$class . '::CREATED';}
378 0 3 unless eval "package $class; use base 'DR::Tarantool::Tuple'; 1"
412 0 105 unless defined $field
413 20 85 if ($field =~ /^\d+$/)
414 20 0 if $field < @{$$self{'fields'};}
417 0 85 unless exists $$self{'fast'}{$field}
431 0 4 unless defined $field
432 3 1 if exists $$self{'fast'}{$field}
457 0 52 unless @_ == 3
462 52 0 $f ? :
464 8 44 if ($type eq 'JSON')
466 0 8 if $@
471 4 40 if utf8::is_utf8($v)
472 7 37 if $type eq 'STR' or $type eq 'UTF8STR'
473 29 8 if $type eq 'NUM'
474 1 7 if $type eq 'INT'
475 0 7 if $type eq 'NUM64'
476 0 7 if $type eq 'INT64'
478 7 0 if ($type eq 'MONEY' or $type eq 'BIGMONEY')
481 3 4 unless defined $_
483 1 6 if length $_ < 2
488 2 5 if ($r < 0) { }
494 7 0 if $type eq 'MONEY'
511 0 27 unless @_ == 3
516 27 0 $f ? :
519 2 25 if utf8::is_utf8($v)
521 8 19 if ($type eq 'JSON')
523 0 8 if $@
527 9 10 if $type eq 'NUM'
528 1 18 if $type eq 'INT'
529 0 19 if $type eq 'NUM64'
530 0 19 if $type eq 'INT64'
531 2 17 if $type eq 'UTF8STR'
532 4 15 if ($type eq 'MONEY' or $type eq 'BIGMONEY')
533 4 0 if $type eq 'MONEY'
534 0 4 if $type eq 'BIGMONEY'
536 1 3 if ($v < 0)
556 0 1 unless 'ARRAY' eq ref $tuple
558 1 0 if ($self->family == 1) { }
577 0 2 unless 'ARRAY' eq ref $tuple
579 2 0 if ($self->family == 1) { }
592 5 11 if ($index =~ /^\d+$/)
594 5 14 if $$_{'no'} == $index
599 10 1 if exists $$self{'indexes'}{$index}
612 1 3 unless defined $idx
625 0 2 unless defined $idx
636 1 10 unless 'ARRAY' eq ref $keys
637 4 7 unless ('ARRAY' eq ref $$keys[0])
638 3 1 if ($ksize == @$keys) { }
640 2 1 if $ksize > 1 and not $disable_warn
650 3 10 unless $ksize >= @$k
664 0 0 if 'ARRAY' eq ref $key and 'ARRAY' eq ref $$key[0]
673 0 12 unless 'ARRAY' eq ref $op and @$op > 1
675 12 0 if ($self->family == 1)
681 1 11 if ($opname eq 'delete')
682 0 1 unless @$op == 2
686 9 2 if ($opname =~ /^(?:set|insert|add|and|or|xor)$/)
687 0 9 unless @$op == 3
691 2 0 if ($opname eq 'substr')
692 0 2 unless @$op >= 4
693 0 2 unless $$op[2] =~ /^\d+$/
694 0 2 unless $$op[3] =~ /^\d+$/
710 0 2 unless 'ARRAY' eq ref $ops and @$ops >= 1
711 1 1 unless 'ARRAY' eq ref $$ops[0]