Condition Coverage

blib/lib/YATT/Lite/Util.pm
Criterion Covered Total %
condition 82 148 55.4


and 2 conditions

line l !l condition
167 3 150 0 do { my $sub = UNIVERSAL::can($item, 'refresh') } && do { &$sub($item, $sys) }
382 8 0 0 do { not -r _ } && do { croak("Can't read file: $file\n") }

and 3 conditions

line !l l&&!r l&&r condition
125 0 0 0 defined $_[0] and not &Scalar::Util::tainted($_[0])
163 48 2 89 $item and $mark
167 191 63 187 $item && ref $item && !($mark && $$mark{&refaddr($item)}++)
192 23 12 66 $path =~ m[\G/+([^/]*)]cgsx and -e "$dir/$1"
35 0 66 $path =~ m[\G/+([^/]*)]cgsx and -e "$dir/$1" and not defined $file
206 2 0 6 $subpath =~ m[^/(\w+)(?:/|$)] and -e "$dir/$1.$default_ext"
259 313 4 31 defined $ext and -r "$base$ext"
161 75 81 $pi =~ m[^/] and -d $base
32 1 91 $use_subpath and -r (my $alt = "$dir$loc/$ixfn")
298 5 0 25 length $from and $cmppos >= 0
315 0 0 32 $i <= $#$a and $i <= $#$b
316 16 0 16 $a->[$i] =~ /^\d/ and $b->[$i] =~ /^\d/
396 0 0 3 defined $sub and ref $sub eq 'CODE'
414 1 313 1 wantarray and not @_
523 0 0 0 defined $name and $name ne ''
527 0 0 0 defined $formal_value and $formal_value ne ''
533 0 0 0 $type and $typeid
691 1 0 1 $con->can('raise') and my $sub = $con->can('error')
738 0 76 649 defined $obj and my $sub = UNIVERSAL::can($obj, $method)
775 3 0 52 @$list and defined $list->[0]
3 13 39 @$list and defined $list->[0] and ref $list->[0] eq 'HASH'
786 0 0 0 defined $_[0] and not ref $_[0]
0 0 0 defined $_[0] and not ref $_[0] and $_[0] ne ''
0 0 0 defined $_[0] and not ref $_[0] and $_[0] ne '' and $_[0] =~ /^\d+$/
815 18 150 78 defined $_[0] and $_[0] ne ''
856 14 0 12 @$item and ref $item->[-1] eq 'HASH'
14 4 8 @$item and ref $item->[-1] eq 'HASH' and not exists $item->[-1]{$child_key}

or 2 conditions

line l !l condition
183 35 0 $cut_depth //= 1
184 16 19 $default_ext //= 'yatt'
225 34 1 $file // ''
245 229 36 $index_name //= 'index'
246 229 36 $want_ext //= '.yatt'
269 0 91 $ext //= ''
502 0 0 $else //= ''
504 0 0 $value // ''
622 0 0 $sep // ';'
633 0 0 url_encode($self, $_) // ''
641 0 19 shift() // 1
646 4 0 $_[0] //= ''
647 0 19 $_[1] // ''
654 0 9 $layer // ''
669 0 0 $nargs // 0
683 0 0 $nargs // 0
729 370 0 $val || 1
747 0 0 $_[0] // 1
847 13 20 $params->{$k} //= []
848 1 0 ref $item || 'String'
853 13 14 $params->{$k} //= []
854 0 1 ref $item || 'String'
864 0 1 ref $item || 'String'

or 3 conditions

line l !l&&r !l&&!r condition
57 20740 10506 0 ref $thing || $thing
426 5 0 0 $$str // $ESCAPE_UNDEF
817 0 78 0 $_[2] // ixhash()
844 21 6 62 $after =~ /^\[\]\[([^\[\]]+)\]$/ or $after =~ /^\[\](.+)$/
863 23 39 0 $params->{$k} //= ixhash()