Branch Coverage

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


line true false branch
64 10 15 unless ($self->{'Algorithm'})
71 2 23 if $self->{'Algorithm'} =~ /^ed25519/
73 23 2 if (defined $self->{'KeyFile'})
79 10 13 unless ($self->{'Method'})
84 10 13 unless ($self->{'Domain'})
89 10 13 unless ($self->{'Selector'})
103 8 15 if (UNIVERSAL::isa($policy, 'CODE')) { }
2 26 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 16 6 unless (@{$self->{'algorithms'};})
128 0 16 unless ($self->{'Algorithm'})
131 0 16 unless ($self->{'Method'})
134 0 16 unless ($self->{'Domain'})
137 0 16 unless ($self->{'Selector'})
163 2 14 $self->{'Identity'} ? :
5 11 $self->{'Timestamp'} ? :
3 13 $self->{'Expiration'} ? :
0 16 $self->{'Tags'} ? :
189 2 21 if $self->{'Algorithm'} =~ /^ed25519/
198 1 22 if (defined $key and not ref $key)
203 0 23 unless $key
223 0 23 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 21 if @_
352 1 20 if (exists $self->{'ExtendedHeaders'})
361 0 20 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 @_