Branch Coverage

blib/lib/CHI/Driver/File.pm
Criterion Covered Total %
branch 31 38 81.5


line true false branch
33 0 417 if (defined $params{'key_digest'})
45 0 364 if length $namespace > $self->max_key_length
57 53 8948 if (length $new_key > length $key and length $new_key > $self->max_key_length)
75 5199 949 if (defined $file and -f $file) { }
87 0 2053 unless my $file = $self->path_to_key($key, \$dir)
89 856 1197 unless -d $dir
95 2051 2 defined $temp_file ? :
99 2049 2 if (defined $temp_file)
104 2035 42 if rename $temp_file, $file
106 14 2035 if (-f $temp_file)
117 0 477 unless my $file = $self->path_to_key($key)
125 158 265 unless -d $namespace_dir
129 0 265 if -d $renamed_dir
138 1975 4182 if -f $_ and /$re$/
147 14 364 unless -d $namespace_dir
176 0 24 unless -d $root_dir
189 0 8681 unless defined $key
200 113 8568 if ($key =~ /^[0-9a-f]{32}$/) { }
224 2053 6628 if (defined $dir_ref and ref $dir_ref) { }