Branch Coverage

blib/lib/OpenSMTPd/Filter.pm
Criterion Covered Total %
branch 73 80 91.2


line true false branch
99 3 39 if (my(@u) = grep({not $e->{$_};} @s))
100 1 2 @u == 1 ? :
137 0 8 if $self->{'debug'}
150 1 4 unless $self->{'_ready'}
159 0 1 ref $v eq 'CODE' ? :
165 0 81 if $self->{'debug'}
172 0 98 if $self->{'debug'}
188 140 3 if $method
197 5 5 if $config eq "ready"
226 103 5 if @fields
235 3 105 if $event eq "link-disconnect"
237 23 85 if ($event =~ /^tx-(.*)$/u) { }
241 3 20 if $phase eq "begin"
245 3 20 if ($phase eq 'mail') { }
4 16 elsif ($phase eq 'rcpt') { }
262 4 104 if $cb
279 101 10 defined $_ ? :
283 29 3 if defined $suffix and @fields
286 2 30 unless my $session = $self->{'_sessions'}{$filter{'session'} or ""}
292 23 7 if $filter{'subsystem'} eq "smtp-in" and $filter{'phase'} eq "data-line"
295 6 1 if (my $cb = $self->_cb_for('filter', @filter{'subsystem', 'phase'})) { }
305 1 6 unless ($decisions)
313 3 4 if @ret == 1 and ($decisions->[0] || '') eq "error"
322 2 5 unless @ret == 1 + @{$decisions;}
329 0 7 if $self->{'debug'}
340 13 10 if (my $cb = $self->_cb_for("filter", @{$filter;}{"subsystem", "phase"}))
347 13 10 if $self->{'_save_data_lines'}
349 3 20 if ($line eq ".")
352 2 1 if $cb
359 22 6 if ($_) { }
360 3 25 if $message->{'sent-dot'}
365 0 25 if $self->{'debug'}
368 3 22 if $_ eq "."
380 37 0 $type eq 'filter' ? :
111 37 $type eq 'report' ? :
383 142 3 if ($subsystem and $item and my $items = $map->{$subsystem})
384 140 2 if (my $fields = $items->{$item})
385 2 138 if ref $fields eq "CODE"
392 10 6 defined $_ ? :
402 25 116 if ref $cb eq "CODE"