Branch Coverage

blib/lib/App/Sqitch/Plan.pm
Criterion Covered Total %
branch 174 188 92.5


line true false branch
196 385 456 if ($line =~ /\A(?<lspace>[[:blank:]]*)(?:#[[:blank:]]*(?<note>.+)|$)/)
199 343 42 if @lines and not $line->note
207 0 456 unless $line =~ /
232 94 362 if ($+{'name'} eq 'syntax-version') { }
355 7 elsif ($+{'name'} eq 'project') { }
238 12 343 unless $proj =~ /\A$name_re\z/
258 251 94 unless ($pragmas{'syntax_version'})
267 2 343 unless $pragmas{'project'}
273 273 1382 if ($line =~ /\A(?<lspace>[[:blank:]]*)(?:#[[:blank:]]*(?<note>.+)|$)/)
284 471 911 $line =~ /^[[:blank:]]*[\@]/ ? :
323 25 1357 if not $params{'name'} or not $params{'yr'} and $line =~ /$ts_re/
326 1 1 unless $params{'yr'} or $params{'planner_name'}
327 1 1355 unless $params{'yr'}
330 1 1354 unless $params{'planner_name'}
336 2 0 $type eq 'tag' ? :
2 1352 if exists $reserved{$params{'name'}}
342 1 1351 if $params{'name'} =~ /^[0-9a-f]{40}/
356 457 894 if ($type eq 'tag') { }
358 1 456 if ($params{'name'} =~ qr/($dir_sep_re)/)
367 1 455 unless ($prev_change)
376 1 454 if (my $at = $line_no_for{$key})
387 1 453 if $params{'dependencies'}
389 383 70 if (@curr_changes)
413 1 893 if (my $at = $tag_changes{$params{'name'}})
422 227 666 if (my $deps = $params{'dependencies'})
425 1 325 unless my $dep_params = "App::Sqitch::Plan::Depend"->parse($depstring)
438 1 324 if $seen_dep{$depstring}++
439 76 248 if ($dep->conflicts) { }
450 386 505 $prev_tag ? :
601 290 $prev_change ? :
458 98 793 if (my $duped = $change_named{$params{'name'}})
474 124 181 if @curr_changes
496 464 14 ref $_[0] eq 'HASH' ? :
508 21 244 if ($dep->got_project) { }
510 1 20 if $dep->project ne $proj
513 0 244 if $dep->got_id
518 78 186 if ($key =~ /.@/) { }
521 78 0 if (my $tag_at = $$seen{"\@$tag"})
522 78 0 if (my $change_at = $seen->{$change})
523 77 1 if $change_at < $tag_at
528 175 11 if exists $seen->{$key} or $position{$key}
535 10 862 if @bad
540 469 9 unless @invalid
548 1 11 if ($change eq $dep) { }
8 3 elsif (my $pos = $position{$dep}) { }
555 6 2 if $delta > $max_delta
572 6 4 if ($max_delta)
625 6 13 if (my $d = delete $p{'direction'})
626 4 1 $d =~ /^DESC/i ? :
1 5 $d =~ /^ASC/i ? :
633 2 16 if (my $regex = delete $p{'planner'})
637 3 15 if (my $regex = delete $p{'name'})
643 5 13 if (my $op = lc(delete $p{'operation'} || ''))
646 2 1 $op eq 'revert' ? :
2 3 $op eq 'deploy' ? :
653 0 17 if %p
657 8 9 unless @filters
659 4 13 if ($reverse)
662 2 2 $limit ? :
665 0 9 unless my $change = $changes->change_at($index--)
666 9 0 if &any(sub {
673 1 12 $limit ? :
676 0 47 unless my $change = $changes->change_at(++$index)
677 27 20 if &any(sub {
686 1 5 unless defined $index
702 125 26 if (my $next = $self->peek)
706 24 2 if defined $self->current
713 2 90 if $pos < 0
729 0 4 unless &$code($_)
741 1 18 if defined $changes->index_of($key)
747 3 15 if (my $spec = $p{'change'}) { }
748 0 3 unless $change = $changes->get($spec)
753 0 15 unless $change = $changes->last_change
788 34 13 if $p->{'requires'}
800 29 16 if $p->{'conflicts'}
808 1 28 if (defined(my $idx = $changes->index_of($p{'name'} . "\@HEAD")))
825 15 9 if ($changes->count)
827 3 12 if ($prev->tags)
855 2 19 if not defined $tag_idx or $tag_idx < $idx
884 3 32 if $req->project ne $project
886 22 10 $req =~ /@/ ? :
26 6 if defined $changes->index_of($req =~ /@/ ? $req : $req . "\@HEAD")
888 2 4 if ($action eq 'add') { }
910 4 97 if exists $reserved{$name}
911 2 95 if $name =~ /^[0-9a-f]{40}/
916 12 83 if ($type eq 'change' and not $name =~ /\A$name_re\z/) { }
25 58 elsif ($type eq 'tag' and !($name =~ /\A$name_re\z/) || $name =~ /$dir_sep_re/) { }
937 11 41 if (defined $from or defined $to)
944 11 26 if $line->isa("App::Sqitch::Plan::Blank") and not length $line->note
952 9 2 defined $from ? :
961 6 5 defined $to ? :
968 3 3 if (my(@tags) = $change->tags)
981 0 52 unless my $fh = $file->open(">:utf8_strict")
987 0 52 unless $fh->close