Branch Coverage

blib/lib/CPAN/InGit/ArchiveTree.pm
Criterion Covered Total %
branch 63 130 48.4


line true false branch
20 5 1 if $self->config_blob
21 5 1 $self->branch ? :
6 0 unless defined $self->name
29 2 10 unless my $ent = $self->get_path("cpan_ingit.json")
31 10 0 $ent->[0]->is_blob ? :
36 0 5 unless my $cfg_blob = $self->config_blob
39 0 5 unless ref $attrs eq "HASH"
47 8 7 if defined $config->{$_}
54 0 3 if ref $val eq "version"
63 1 0 unless $self->config_blob and $self->config_blob->content eq $json
75 1 7 unless my $ent = $self->get_path("modules/02packages.details.txt")
77 7 0 $ent->[0]->is_blob ? :
91 0 3 unless $content =~ /\G\n/cgu
95 8 10 $2 eq 'undef' ? :
99 0 3 unless pos $content == length $content
101 3 0 $attrs{'Last-Updated'} ? :
116 1 2 !$self->package_details_blob ? :
142 4 3 if (defined $mod_ver and defined $reqs)
143 4 0 unless ref $reqs
151 10 4 if (my $current = $self->package_details->{'by_module'}{$mod_name}) { }
0 4 elsif ($mod_name eq 'perl') { }
154 5 5 unless (defined $mod_ver)
155 5 0 $current->[2] =~ /-([0-9]+(?:\.[0-9_]+?)*)\./u ? :
168 2 0 $by_name ? :
181 0 2 unless my $distfile_ent = $peer->get_path($dist_path)
186 0 2 if ($existing_ent)
187 0 0 unless $existing_ent->[0]->id eq $distfile_ent->[0]->id
192 2 0 if ($modules_registered)
200 1 1 if ($meta_ent) { }
213 1 1 if $meta_ent
224 0 2 if (defined $have_ver and $reqs->accepts_module($mod, $have_ver)) { }
0 4 elsif (defined $corelist->{$mod} and $reqs->accepts_module($mod, $corelist->{$mod})) { }
225 0 0 $mod eq 'perl' ? :
0 0 if $CPAN::InGit::ArchiveTree::log->is_info
248 1 0 if (($before->{$mod} // "") ne ($after->{$mod} // 0))
250 1 0 $after->{$mod} ? :
261 0 1 unless $sources and @$sources
266 1 0 unless (ref $_ and $_->can("package_details"))
267 0 1 unless my $t = $self->parent->get_archive_tree($_)
271 0 1 if $t->can("autofetch") and $t->autofetch
283 0 0 builtin::blessed($reqs) && $reqs->isa('CPAN::Meta::Prereqs') ? :
0 0 builtin::blessed($reqs) && $reqs->isa('CPAN::Meta::Requirements') ? :
1 0 ref $reqs eq 'HASH' ? :
292 0 1 unless my $corelist = Module::CoreList::find_version($perl_v)
308 0 2 if (not defined $peer_ver) { }
0 2 elsif (not $reqs->accepts_module($mod, $peer_ver)) { }
319 1 1 if $meta
324 0 2 unless length $author_path
328 1 1 if ($prereqs)
333 0 1 if $#todo == $n
335 1 0 if ($log_recommends)
339 0 1 if @list
345 1 0 if ($log_recommends)
346 0 1 if (my(@list) = sort($recommended->required_modules))
371 0 0 unless $sources and @$sources
376 0 0 unless (ref $_ and $_->can("package_details"))
377 0 0 unless my $t = $self->parent->get_archive_tree($_)
381 0 0 if $t->can("autofetch") and $t->autofetch
390 0 0 unless ($author_path)
392 0 0 $options{'partial'} ? :
398 0 0 unless my $distfile_ent = $source->get_path("authors/id/$author_path")
404 0 0 unless ($source->package_details->{'by_dist'}{$author_path})
406 0 0 if (ref $dist_info->{'provides'} eq 'HASH') { }
415 0 0 $options{'partial'} ? :
421 0 0 $options{'partial'} ? :