Branch Coverage

lib/Mail/AuthenticationResults/Header/Base.pm
Criterion Covered Total %
branch 126 140 92.8


line true false branch
36 4 379 unless $self->_HAS_KEY
37 2 377 unless defined $key
38 2 375 if $key eq ""
39 2 373 if $key =~ /"/
40 2 371 if $key =~ /\n/
41 2 369 if $key =~ /\r/
49 6 1180 unless $self->_HAS_KEY
50 4 1176 unless defined $self->{'key'}
58 3 32 unless defined $value
80 4 374 unless $self->_HAS_VALUE
81 3 371 unless defined $value
83 3 368 if $value =~ /"/
84 3 365 if $value =~ /\n/
85 3 362 if $value =~ /\r/
93 1 1509 unless $self->_HAS_VALUE
94 54 1455 unless defined $self->{'value'}
102 7 492 unless defined $string
104 34 465 if ($string =~ /[\s\t \(\);=]/)
114 2 3200 unless $self->_HAS_CHILDREN
115 1943 1257 unless defined $self->{'children'}
122 8 11 unless exists $self->{'parent'}
132 1 0 if exists $entry->{'parent'}
140 364 384 if ref $parent eq "Mail::AuthenticationResults::Header::Group"
141 4 380 if exists $self->{'parent'}
142 0 380 unless $parent->_ALLOWED_CHILDREN($self)
158 0 16 unless $self->_HAS_CHILDREN
159 0 16 unless $self->_ALLOWED_CHILDREN($child)
160 0 16 if &refaddr($self) == &refaddr($child)
166 16 23 if (&refaddr($child) == &refaddr($mychild)) { }
167 10 6 if (ref $self ne "Mail::AuthenticationResults::Header::Group")
178 0 16 unless $child_removed
188 29 793 unless $self->_HAS_CHILDREN
189 25 768 unless $self->_ALLOWED_CHILDREN($child)
190 0 768 if &refaddr($self) == &refaddr($child)
222 260 0 if ($eldest->can("indent_by"))
227 260 0 if ($eldest->can("eol"))
233 260 0 if ($eldest->can("indent_on"))
234 89 171 if ($eldest->indent_on(ref $self))
240 171 89 unless $added
252 32 14 if $self->_HAS_KEY
253 46 0 if $self->_HAS_VALUE
254 34 12 if ($self->_HAS_CHILDREN)
281 2 235 unless ($self->key)
286 214 21 if ($self->value) { }
2 19 elsif ($self->value eq '0') { }
19 0 elsif ($self->value eq '') { }
296 17 2 if ($self->key ne "none")
301 235 0 if ($self->_HAS_CHILDREN)
319 792 446 if (exists $search->{'key'})
320 574 218 if ($self->_HAS_KEY) { }
321 1 573 if (ref $search->{'key'} eq 'Regexp' and $self->key =~ /$search->{'key'}/) { }
84 489 elsif (lc $search->{'key'} eq lc $self->key) { }
338 694 544 if (exists $search->{'value'})
339 0 694 unless defined $search->{'value'}
340 675 19 if ($self->_HAS_VALUE) { }
341 1 674 if (ref $search->{'value'} eq 'Regexp' and $self->value =~ /$search->{'value'}/) { }
156 518 elsif (lc $search->{'value'} eq lc $self->value) { }
357 87 1151 if (exists $search->{'authserv_id'})
358 82 5 if ($self->_HAS_VALUE) { }
359 16 66 if (lc ref $self eq 'mail::authenticationresults::header') { }
361 2 14 if (ref $search->{'authserv_id'} eq 'Regexp' and $authserv_id =~ /$search->{'authserv_id'}/) { }
3 11 elsif (lc $search->{'authserv_id'} eq lc $authserv_id) { }
381 412 826 if (exists $search->{'isa'})
382 119 293 if (lc ref $self eq 'mail::authenticationresults::header::' . lc($search->{'isa'})) { }
5 288 elsif (lc ref $self eq 'mail::authenticationresults::header' and lc $search->{'isa'} eq 'header') { }
393 33 1205 if (exists $search->{'has'})
395 23 15 if scalar @{$self->search($query)->children;} == 0
399 170 1068 if ($match)
403 1004 234 if ($self->_HAS_CHILDREN)
406 199 889 if (scalar @{$childfound->children;})