Branch Coverage

lib/Archive/BagIt/Role/Manifest.pm
Criterion Covered Total %
branch 30 40 75.0


line true false branch
28 65 13 if -f $file
43 46 7 if -f $file
73 0 111 unless open my $XXMANIFEST, "<:encoding(UTF-8)", $xxmanifest_file
77 0 347 unless defined $digest and defined $file
87 46 0 if defined $tm_file
94 65 0 if defined $m_file
100 0 540 if not defined $localname or 0 == length $localname
138 14 19 if (defined $return_all_errors) { }
151 0 340 unless (-r $filepath)
160 4 336 unless (exists $xxmanifest_entries->{$normalized_local_name})
171 7 329 if (check_if_payload_filepath_violates($local_mf_entry_path)) { }
176 1 328 unless (exists $normalised_files{$local_mf_entry_path})
186 99 0 if (defined $digest_hashes_ref and ref $digest_hashes_ref eq "ARRAY")
190 0 303 unless defined $digest_entry->{'expected_digest'}
191 21 282 if ($digest_entry->{'calculated_digest'} ne $digest_entry->{'expected_digest'})
207 12 80 if ($return_all_errors and scalar @invalid_messages > 0)
220 65 13 if ($self->manifest_file)
235 46 7 if ($self->tagmanifest_file)
253 68 0 if (defined $digest_hashes_ref and ref $digest_hashes_ref eq "ARRAY")
254 0 68 unless open my $fh, ">:encoding(UTF-8)", $manifest_file