Branch Coverage

blib/lib/Mail/DKIM/Signer.pm
Criterion Covered Total %
branch 59 84 70.2


line true false branch
64 10 14 unless ($self->{'Algorithm'})
71 2 22 if $self->{'Algorithm'} =~ /^ed25519/
73 22 2 if (defined $self->{'KeyFile'})
79 10 12 unless ($self->{'Method'})
84 10 12 unless ($self->{'Domain'})
89 10 12 unless ($self->{'Selector'})
103 8 14 if (UNIVERSAL::isa($policy, 'CODE')) { }
2 24 elsif ($policy and $policy->can('apply')) { }
107 1 7 unless (@{$self->{'algorithms'};} or $default_sig)
116 0 2 unless (@{$self->{'algorithms'};} or $default_sig)
122 15 6 unless (@{$self->{'algorithms'};})
128 0 15 unless ($self->{'Algorithm'})
131 0 15 unless ($self->{'Method'})
134 0 15 unless ($self->{'Domain'})
137 0 15 unless ($self->{'Selector'})
163 2 13 $self->{'Identity'} ? :
4 11 $self->{'Timestamp'} ? :
2 13 $self->{'Expiration'} ? :
0 15 $self->{'Tags'} ? :
189 2 20 if $self->{'Algorithm'} =~ /^ed25519/
198 1 21 if (defined $key and not ref $key)
203 0 22 unless $key
223 0 22 unless my $algorithm_class = $signature->get_algorithm_class($signature->algorithm)
237 3 0 if (@_ == 1)
246 3 0 if (@_ == 1)
275 0 4 if $header eq lc $header
276 0 4 if (exists $self->{'ExtendedHeaders'}{lc $header}) { }
281 0 0 if ($first eq '+' or $second eq '+') { }
0 0 elsif ($first eq '*' or $second eq '*') { }
301 26 2 unless (exists $self->{'ExtendedHeaders'}{lc $default})
309 7 3 if (not exists $$header_counts{lc $header}) { }
321 1 29 if ($want_count eq '+') { }
27 2 elsif ($want_count eq '*') { }
328 0 2 if ($want_count > $have_count) { }
350 0 20 if @_
352 1 19 if (exists $self->{'ExtendedHeaders'})
361 0 19 if ($self->{'Headers'})
385 0 0 if (@_)
395 1 0 if (@_)
405 3 0 if (@_ == 1)
415 3 0 if (@_ == 1)
424 0 1 if @_