Branch Coverage

blib/lib/OpenSMTPd/Filter.pm
Criterion Covered Total %
branch 68 74 91.8


line true false branch
94 3 33 if (my(@u) = grep({not $e->{$_};} @s))
95 1 2 @u == 1 ? :
132 0 8 if $self->{'debug'}
145 1 4 unless $self->{'_ready'}
154 0 1 ref $v eq 'CODE' ? :
160 0 81 if $self->{'debug'}
167 0 98 if $self->{'debug'}
183 140 3 if $method
192 5 5 if $config eq 'ready'
221 101 5 if @fields
230 3 103 if $event eq 'link-disconnect'
232 23 83 if ($event =~ /^tx-(.*)$/u) { }
236 3 20 if $phase eq 'begin'
240 3 20 if ($phase eq 'mail') { }
4 16 elsif ($phase eq 'rcpt') { }
257 4 102 if $cb
274 101 10 defined $_ ? :
278 29 3 if defined $suffix and @fields
281 2 30 unless my $session = $self->{'_sessions'}{$filter{'session'} or ''}
287 23 7 if $filter{'subsystem'} eq 'smtp-in' and $filter{'phase'} eq 'data-line'
290 6 1 if (my $cb = $self->_cb_for('filter', @filter{'subsystem', 'phase'})) { }
300 1 6 unless ($decisions)
308 3 4 if @ret == 1 and ($decisions->[0] || '') eq 'error'
317 2 5 unless @ret == 1 + @{$decisions;}
324 0 7 if $self->{'debug'}
335 13 10 if (my $cb = $self->_cb_for('filter', @{$filter;}{'subsystem', 'phase'}))
342 13 10 if $self->{'_save_data_lines'}
344 3 20 if ($line eq '.')
347 2 1 if $cb
354 22 6 $_ ? :
355 3 25 if $message->{'sent-dot'}
360 0 25 if $self->{'debug'}
363 3 22 if $_ eq '.'
375 140 3 if ($subsystem and $item and my $items = $map->{$subsystem})
376 138 2 if $items->{$item}
379 10 6 defined $_ ? :
389 25 114 if ref $cb eq 'CODE'