Condition Coverage

blib/lib/File/KDBX/Key/File.pm
Criterion Covered Total %
condition 38 74 51.3


and 3 conditions

line !l l&&!r l&&r condition
37 0 1 14 defined $primitive and not XXX
59 28 0 6 substr($$data, 0, 120) =~ // and my($type, $version) = $self->_load_xml($data, \$raw_key)
187 0 0 6 defined $version and defined $data
189 4 0 2 $version =~ /^1\.0/ and $data =~ m[^[A-Za-z0-9+/=]+$]
0 0 4 $version =~ /^2\.0/ and $data =~ /^[A-Fa-f0-9]+$/
0 0 4 $version =~ /^2\.0/ and $data =~ /^[A-Fa-f0-9]+$/ and defined $hash
0 0 4 $version =~ /^2\.0/ and $data =~ /^[A-Fa-f0-9]+$/ and defined $hash and $hash =~ /^[A-Fa-f0-9]+$/

or 2 conditions

line l !l condition
22 21 0 $_[0]{'type'} //= undef
23 4 5 $_[0]{'version'} //= undef
24 6 1 $_[0]{'filepath'} //= undef
98 7 0 ($args{'type'} // $self->type) // "xml"
99 2 5 ($args{'version'} // $self->version) // 2
102 0 7 $args{'atomic'} // 1
112 0 0 $err //= "Unknown error"
144 5 0 ($args{'uid'} // $file_uid) // -1
145 5 0 ($args{'gid'} // $file_gid) // -1
212 3 0 shift() // 2

or 3 conditions

line l !l&&r !l&&!r condition
32 36 1 0 shift() // throw("Missing key primitive")
94 0 7 0 $args{'raw_key'} // $self->raw_key
7 0 0 ($args{'raw_key'} // $self->raw_key) // &random_bytes(32)
98 1 6 0 $args{'type'} // $self->type
99 0 2 5 $args{'version'} // $self->version
100 1 5 1 $args{'filepath'} // $self->filepath
111 0 0 6 not $fh or my $err = $@
143 0 5 0 $args{'mode'} // $file_mode
5 0 0 ($args{'mode'} // $file_mode) // do { my $m = umask; defined $m ? 438 & ~$m : undef }
144 0 0 5 $args{'uid'} // $file_uid
145 0 0 5 $args{'gid'} // $file_gid