Condition Coverage

blib/lib/File/KDBX/Util.pm
Criterion Covered Total %
condition 87 152 57.2


and 3 conditions

line !l l&&!r l&&r condition
107 26 0 1 exists $ENV{'PERL_FILE_KDBX_XS'} and not $ENV{'PERL_FILE_KDBX_XS'}
144 0 0 0 $^O ne "MSWin32" and $^O ne "NetWare"
148 0 0 0 $] == "5.01" and $Config::Config{'ccname'} eq "gcc"
0 0 0 $] == "5.01" and $Config::Config{'ccname'} eq "gcc" and $Config::Config{'gccversion'}
151 0 0 0 $parts[0] == 4 and $parts[1] >= 8
247 0 235 0 defined $cowrefcnt and 1 < $cowrefcnt
262 223 739 262 defined $cowrefcnt and 1 < $cowrefcnt
424 0 0 0 &blessed($num) and $num->can("as_hex")
487 0 0 0 defined $_[0] and not XXX
521 0 0 13 0 <= $size and $size < 256
579 0 11 10 @_ && ($OPS{$_[0] or ''} || 0) == 2
732 166 0 121 defined $subject and not XXX
166 121 0 defined $subject and not XXX and ($OPS{$subject} || 2) < 2
744 56 2 9 $op_type == 1 and _is_operand_plain($operand)
807 170 0 56 &blessed($_[0]) && $_[0]->can($subject)

or 2 conditions

line l !l condition
320 97 966 $args{'is'} || 'rw'
325 30 1033 $args{'path'} || ''
344 987 76 $ATTRIBUTES{$package} //= []
359 346 0 shift() // "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
360 1 345 shift() // ""
371 2 189 $test //= sub { 1; }
492 223 0 $ATTRIBUTES{$package} // []
558 23 0 shift() // 200
559 23 0 shift() // sub { }
629 0 0 $host ||= "localhost"
642 66 0 $_[0] // (return)
643 98 0 $_[0] // (return)
644 200 3 $_[0] // (return)
646 32 0 $_[0] // (return)
652 2 0 $_[0] // (return)
654 7 3 to_string(@_) // (return)
662 1712 78 shift() // (return)
683 146 2 shift() // (return)
692 24 0 shift() // (return)
699 12 0 shift() // (return "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0")
732 0 121 $OPS{$subject} || 2
781 84 0 shift() // "eq"

or 3 conditions

line l !l&&r !l&&!r condition
107 0 1 26 $ENV{'PERL_ONLY'} or exists $ENV{'PERL_FILE_KDBX_XS'} and not $ENV{'PERL_FILE_KDBX_XS'}
151 0 0 0 $parts[0] > 4 or $parts[0] == 4 and $parts[1] >= 8
218 8 0 557 !defined($_) || $_ eq '' || XXX && @$_ == 0 || XXX && keys %$_ == 0 || XXX && (!defined($$_) || $$_ eq '') || XXX && _empty($$_)
245 113 0 235 not defined $_ or &readonly($_)
260 415 0 1224 not defined $$_ or &readonly($$_)
293 780 64 46 not XXX or XXX
844 0 46 not XXX or XXX or XXX
64 46 0 not XXX or XXX or XXX or XXX
369 2 0 189 $set //= $args{'test'}
372 1 1 189 $args{'printable'} // $args{'print'}
513 3 40 45 $cache{join "\0", grep({defined $_;} @_)} //= &$func(@args, @_)
518 15 1 0 shift() // throw("Must provide a string to pad")
535 359 0 36 XXX or overload::Method($code, "&{}")
582 19 0 2 $op eq '=~' || $op eq '!~'
634 0 0 0 $port ||= $scheme eq "http" ? 80 : ($scheme eq "https" ? 433 : undef)
723 17 197 84 XXX || XXX
729 287 0 0 shift() // throw("Must specify a query operator")
734 2 0 210 $op eq "-not" or $op eq "-false"
792 1 0 1 $op eq "eq" or $op eq "=="
1 0 0 $op eq "ne" or $op eq "!="
832 84 0 0 $map{$op} // throw("Unexpected operator in query: $op", "subject", $subject, "operator", $op, "operand", $operand)