Condition Coverage

blib/lib/Catmandu/Util.pm
Criterion Covered Total %
condition 44 98 44.9


and 2 conditions

line l !l condition
401 1 1 is_same($val, $_) and return 1
407 5 1 &$sub($_) and return 1

and 3 conditions

line !l l&&!r l&&r condition
120 1 1 1 is_code_ref($arg) and $mode eq "r"
1 0 1 is_code_ref($arg) and $mode eq "w"
268 0 1 1 is_hash_ref($data) and exists $data->{$key}
306 1 0 1 is_hash_ref($data) and exists $data->{$key}
323 13 0 0 defined $opts{'key'} and $create
13 0 0 defined $opts{'key'} and $create and @$path
329 13 0 0 $create and @$path
341 5 0 0 $create and @$path
357 18 0 0 $create and @$path == 1
485 0 0 0 is_value($_[0]) and $_[0] =~ /^[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?$/

or 2 conditions

line l !l condition
116 0 13 $opts{'binmode'} || $opts{'encoding'} || ':encoding(UTF-8)'
117 111 2 $opts{'mode'} || 'r'
219 1 0 $opts{'segment_size'} || 3
373 0 3 $a->{$k} ||= []
387 0 7 $join //= ", "
388 0 7 $join_last //= " and "
497 39 3 $obj->can($_) or return 0
517 32 19 $obj->isa($_) or return 0

or 3 conditions

line l !l&&r !l&&!r condition
120 0 17 25 is_glob_ref(\$arg) or is_glob_ref($arg)
125 13 4 0 "IO::Handle"->new_from_fd($arg, $mode) // $arg
233 0 0 0 $MIME_TYPES ||= "MIME::Types"->new("only_complete", 1)
322 0 0 13 $opts{'_key'} // $opts{'key'}
342 0 0 0 is_integer($path->[0]) || ord $path->[0] == 36
0 0 0 $data->[$key] ||= is_integer($path->[0]) || ord $path->[0] == 36 ? [] : {}
351 0 0 0 is_integer($path->[0]) || ord $path->[0] == 36
0 0 0 $data->{$key} ||= is_integer($path->[0]) || ord $path->[0] == 36 ? [] : {}
464 0 0 8 $_[0]->isa("boolean") or $_[0]->isa("Types::Serialiser::Boolean")
0 0 8 $_[0]->isa("boolean") or $_[0]->isa("Types::Serialiser::Boolean") or $_[0]->isa("JSON::XS::Boolean")
0 0 8 $_[0]->isa("boolean") or $_[0]->isa("Types::Serialiser::Boolean") or $_[0]->isa("JSON::XS::Boolean") or $_[0]->isa("Cpanel::JSON::XS::Boolean")
0 8 0 $_[0]->isa("boolean") or $_[0]->isa("Types::Serialiser::Boolean") or $_[0]->isa("JSON::XS::Boolean") or $_[0]->isa("Cpanel::JSON::XS::Boolean") or $_[0]->isa("JSON::PP::Boolean")
619 1 0 0 $HUMAN_CONTENT_TYPES->{$key} // $default
1 0 0 ($HUMAN_CONTENT_TYPES->{$key} // $default) // $content_type
690 0 0 809 $pkg =~ s/^\+// or $pkg =~ /^$ns/
710 1 4 2 not defined $format or $format eq "iso_date_time"