Branch Coverage

blib/lib/Pinto/Repository.pm
Criterion Covered Total %
branch 67 100 67.0


line true false branch
101 3 403 unless my $got = $self->get_stack_maybe($stack)
113 0 579 if itis($stack, 'Pinto::Schema::Result::Stack')
114 207 372 unless $stack
130 0 207 if @stacks > 1
133 5 202 if @stacks == 0
153 0 9 unless my $rev = $self->get_revision_maybe($revision)
165 0 18 if itis($revision, 'Pinto::Schema::Result::Revision')
170 1 17 if (@revs > 1)
176 16 1 @revs ? :
191 82 0 if ($target) { }
0 0 elsif ($pkg_name and $dist_path) { }
0 0 elsif ($pkg_name) { }
193 65 17 unless my(@pkgs) = $schema->search_package($where)->with_distribution
194 2 15 unless my $latest = &first(sub { $target->is_satisfied_by($_->version); } , (reverse sort {$a <=> $b;} @pkgs))
202 0 0 unless my(@pkgs) = $schema->search_package($where)->with_distribution
209 0 0 unless my(@pkgs) = $schema->search_package($where)->with_distribution
225 88 221 if (my $target = $args{'target'}) { }
53 168 elsif (my $path = $args{'path'}) { }
168 0 elsif (my $author = $args{'author'}) { }
226 6 82 if (itis($target, 'Pinto::Target::Distribution')) { }
82 0 elsif (itis($target, 'Pinto::Target::Package')) { }
230 67 15 unless my $pkg = $self->get_package('target', $target)
245 0 168 unless my $archive = $args{'archive'}
258 15 50 unless my $found = $self->locate(%args)
322 0 50 if $existing
346 1 6 if $reg->is_pinned and not $force
463 0 129 if $self->get_stack_maybe($stk_name)
484 2 8 if (my $existing = $self->get_stack_maybe($copy_name))
505 3 1 if (my $existing_stack = $self->get_stack_maybe($new_name))
507 1 2 if $is_different_stack or $new_name eq $old_name
538 5 111 if (-e $modules_dir or -l $modules_dir)
540 0 5 unless unlink $modules_dir
556 2 0 if (-e $modules_dir or -l $modules_dir)
558 0 2 unless unlink $modules_dir
575 126 77 unless -f $_
581 19 58 if $archive eq 'CHECKSUMS'
582 25 33 if $archive eq '01mailrc.txt.gz'
583 16 17 if exists $known_dists{"$author/$archive"}
619 0 381 unless -e $version_file
645 0 163 unless -e $archive
646 0 163 unless -r $archive
649 2 161 if (my $same_path = $self->get_distribution('author', $author, 'archive', $basename))
655 0 161 if $dupe
669 0 380 if ($repo_version != $code_version)
675 0 0 defined $repo_version ? :
692 0 393 unless -e $root_dir
695 0 393 unless -d $root_dir
698 0 393 unless -r $root_dir
701 0 393 unless -w $root_dir
704 0 393 unless -e $self->config->db_file and -e $self->config->authors_dir