Condition Coverage

blib/lib/DataStore/CAS.pm
Criterion Covered Total %
condition 36 91 39.5


and 3 conditions

line !l l&&!r l&&r condition
29 15 0 3 not $ref and defined $_[0]
65 1 0 0 $flags && $flags->{'known_hashes'} && $flags->{'known_hashes'}{$self->digest}
84 1 3 2 $ref && $ref->isa('DataStore::CAS::File')
86 0 1 5 defined $file and $is_cas_file || $is_filename
91 4 2 0 $is_cas_file and $flags->{'reuse_hash'}
98 0 0 2 $is_cas_file && $file->can('local_file')
101 0 0 6 defined $fname and -f $fname
109 5 0 0 $flags->{'move'} and defined $fname
116 0 0 0 $ref and $ref->can("openr")
130 0 0 1 $hash and $flags->{'move'}
137 0 0 1 ref $file && ref($file)->isa('DataStore::CAS::File')
143 0 0 0 ref $file and ref($file)->isa("File::Temp")
215 0 0 0 defined $new_hash && $new_hash eq $hash
249 0 0 1 @_ == 1 and not ref $_[0]
346 0 0 18 defined $wrote and $wrote eq length $str

or 2 conditions

line l !l condition
86 0 0 $file || '(undef)'
157 0 2 $flags->{'buffer_size'} || 1048576

or 3 conditions

line l !l&&r !l&&!r condition
29 3 0 15 not $ref and defined $_[0] or $ref->isa("Path::Class::File")
3 0 15 not $ref and defined $_[0] or $ref->isa("Path::Class::File") or $ref->isa("Path::Tiny")
37 18 0 5 not $ref or $ref eq "SCALAR"
39 2 2 1 $ref->isa("DataStore::CAS::File") or _thing_stringifies_to_filename($_[1])
42 0 1 0 $ref->isa("IO::Handle") or &Scalar::Util::reftype($_[1]) eq "GLOB"
86 2 4 0 $is_cas_file || $is_filename
101 0 6 0 $known_hashes{$self->digest} or defined $fname and -f $fname
103 0 6 0 $known_hashes{$self->digest} ||= $self->calculate_file_hash($fname)
164 0 0 0 $!{'EINTR'} or $!{'EAGAIN'}
264 1 0 1 $_[0]->can("_file_$attr") || Carp::croak(qq[Can't locate object method "_file_$attr" via package "] . ref($_[0]) . '"')
296 3 0 1 $_[0]->can("_handle_$attr") || Carp::croak(qq[Can't locate object method "_handle_$attr" via package "] . ref($_[0]) . '"')
326 0 0 0 wantarray or not defined wantarray
347 0 0 0 defined $wrote or $!{'EINTR'}
0 0 0 defined $wrote or $!{'EINTR'} or $!{'EAGAIN'}