Condition Coverage

blib/lib/DataStore/CAS.pm
Criterion Covered Total %
condition 31 83 37.3


and 3 conditions

line !l l&&!r l&&r condition
29 0 0 3 defined $_[0] && length $_[0]
72 1 0 0 $flags && $flags->{'known_hashes'} && $flags->{'known_hashes'}{$self->digest}
91 1 3 2 $ref && $ref->isa('DataStore::CAS::File')
98 4 2 0 $is_cas_file and $flags->{'reuse_hash'}
105 0 0 2 $is_cas_file && $file->can('local_file')
108 0 0 6 defined $fname and -f $fname
116 5 0 0 $flags->{'move'} and defined $fname
123 0 0 0 $ref and $ref->can("openr")
137 0 0 1 $hash and $flags->{'move'}
144 0 0 1 ref $file && ref($file)->isa('DataStore::CAS::File')
150 0 0 0 ref $file and ref($file)->isa("File::Temp")
222 0 0 0 defined $new_hash && $new_hash eq $hash
256 0 0 1 @_ == 1 and not ref $_[0]
353 0 0 18 defined $wrote and $wrote eq length $str

or 2 conditions

line l !l condition
164 0 2 $flags->{'buffer_size'} || 1048576

or 3 conditions

line l !l&&r !l&&!r condition
29 7 0 8 $ref->isa('Path::Class::File') || $ref->isa('Path::Tiny') || $ref->isa('File::Temp') || -e "$_[0]"
44 18 0 5 not $ref or $ref eq "SCALAR"
46 2 2 1 $ref->isa("DataStore::CAS::File") or _thing_stringifies_to_filename($_[1])
49 0 1 0 $ref->isa("IO::Handle") or &Scalar::Util::reftype($_[1]) eq "GLOB"
93 2 4 0 $is_cas_file or $is_filename
108 0 6 0 $known_hashes{$self->digest} or defined $fname and -f $fname
110 0 6 0 $known_hashes{$self->digest} ||= $self->calculate_file_hash($fname)
171 0 0 0 $!{'EINTR'} or $!{'EAGAIN'}
271 1 0 1 $_[0]->can("_file_$attr") || Carp::croak(qq[Can't locate object method "_file_$attr" via package "] . ref($_[0]) . '"')
303 3 0 1 $_[0]->can("_handle_$attr") || Carp::croak(qq[Can't locate object method "_handle_$attr" via package "] . ref($_[0]) . '"')
333 0 0 0 wantarray or not defined wantarray
354 0 0 0 defined $wrote or $!{'EINTR'}
0 0 0 defined $wrote or $!{'EINTR'} or $!{'EAGAIN'}