Branch Coverage

blib/lib/OpenSMTPd/Filter.pm
Criterion Covered Total %
branch 70 76 92.1


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"
227 103 5 if @fields
236 3 105 if $event eq "link-disconnect"
238 23 85 if ($event =~ /^tx-(.*)$/u) { }
242 3 20 if $phase eq "begin"
246 3 20 if ($phase eq 'mail') { }
4 16 elsif ($phase eq 'rcpt') { }
263 4 104 if $cb
280 101 10 defined $_ ? :
285 29 3 if defined $suffix and @fields
288 2 30 unless my $session = $self->{'_sessions'}{$filter{'session'} or ""}
294 23 7 if $filter{'subsystem'} eq "smtp-in" and $filter{'phase'} eq "data-line"
297 6 1 if (my $cb = $self->_cb_for('filter', @filter{'subsystem', 'phase'})) { }
307 1 6 unless ($decisions)
315 3 4 if @ret == 1 and ($decisions->[0] || '') eq "error"
324 2 5 unless @ret == 1 + @{$decisions;}
331 0 7 if $self->{'debug'}
342 13 10 if (my $cb = $self->_cb_for("filter", @{$filter;}{"subsystem", "phase"}))
349 13 10 if $self->{'_save_data_lines'}
351 3 20 if ($line eq ".")
354 2 1 if $cb
361 22 6 $_ ? :
362 3 25 if $message->{'sent-dot'}
367 0 25 if $self->{'debug'}
370 3 22 if $_ eq "."
382 142 3 if ($subsystem and $item and my $items = $map->{$subsystem})
383 140 2 if (my $fields = $items->{$item})
384 2 138 if ref $fields eq "CODE"
391 10 6 defined $_ ? :
401 25 116 if ref $cb eq "CODE"