Condition Coverage

blib/lib/Catmandu/Util.pm
Criterion Covered Total %
condition 42 95 44.2


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
488 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 "
466 8 0 eval {
500 40 3 $obj->can($_) 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 ? [] : {}
467 0 0 8 $obj->isa("boolean") or $obj->isa("Types::Serialiser::Boolean")
0 0 8 $obj->isa("boolean") or $obj->isa("Types::Serialiser::Boolean") or $obj->isa("JSON::XS::Boolean")
0 0 8 $obj->isa("boolean") or $obj->isa("Types::Serialiser::Boolean") or $obj->isa("JSON::XS::Boolean") or $obj->isa("Cpanel::JSON::XS::Boolean")
624 1 0 0 $HUMAN_CONTENT_TYPES->{$key} // $default
1 0 0 ($HUMAN_CONTENT_TYPES->{$key} // $default) // $content_type
695 0 0 812 $pkg =~ s/^\+// or $pkg =~ /^$ns/
715 1 4 2 not defined $format or $format eq "iso_date_time"