Branch Coverage

blib/lib/App/Greple/Grep.pm
Criterion Covered Total %
branch 73 94 77.6


line true false branch
50 10 140 if $obj->is_required
51 4 136 if $obj->is_negative
109 0 153 if ($pat->is_function) { }
120 6 147 if (@p == 0) { }
125 0 6 if $pat->is_required and $self->{'need'} >= 0
129 1 5 if ($self->{'group_index'} == 2 and not $pat->is_function)
132 0 1 unless $#+
137 143 4 if ($pat->is_positive) { }
149 4 143 if ($self->{'group_index'} == 2)
152 6 0 if (defined $_->index)
154 6 0 if $_->index >= $max_index
160 3 144 if (my $n = @{$self->{'callback'}})
161 3 0 if (my $callback = $self->{'callback'}[$i % $n])
173 3 121 if $positive_count < $self->{'need'} + $self->{'must'}
178 7 114 if (my(@reg_union) = $self->{'regions'}->union)
182 6 1 if $reg->is_inside
186 7 0 if ($self->{'region_index'} // @result == 1)
200 1 1 unless $reg->is_outside
211 7 114 if (@{$self->{'block'}}) { }
109 5 elsif (@blocks) { }
245 319 946 if (@$b) { }
254 0 121 if $App::Greple::Grep::debug{'g'}
269 0 124 $self->{'need'} < 0 ? :
274 10 114 unless my(@effective_index) = grep(($mp->[$_][7] <= $compromize && $mp->[$_][0] >= $self->{'need'} && $mp->[$_][3] <= $self->{'allow'}), keys @$bp)
280 8 106 if (my $countcheck = $self->{'countcheck'})
281 0 8 unless @effective_index = do { grep {&$countcheck(int @{$mp->[$_][2]});} @effective_index }
291 3 4 if (@{$self->{'block'}} and $self->{'after'} || $self->{'before'})
294 8 1 if $_ >= 0
309 1 235 if ($self->{'stretch'})
315 27 209 if ($self->{'only'}) { }
6 203 elsif ($self->{'all'}) { }
318 6 0 if @list == 0
335 1 113 if ($self->{'join_blocks'} and @list > 1)
337 1 0 if ($App::Greple::Grep::a->[-1][0]->max == $App::Greple::Grep::b->[0]->min) { }
360 0 109 if ($self->{'alert_size'} and length $_ >= $self->{'alert_size'})
369 0 0 if $App::Greple::Grep::debug{'a'}
372 0 109 if (defined $alarm_start)
373 0 0 if ($SIG{'ALRM'}) { }
375 0 0 if $App::Greple::Grep::debug{'a'}
428 3 311 if $s < $offset
450 0 16 if (callable($pattern)) { }
461 3 106 if $opt->{'A'} or $opt->{'B'}
464 200 315 if ($from <= $_[1] and $_[2] < $to)
478 215 103 if $border->[$bi] != $from
479 2 316 if $opt->{'B'}
482 56 262 if $ei == $bi and $ei < $#{$border;}
483 2 316 if $opt->{'A'}