Branch Coverage

lib/Mail/DMARC/Report/Receive.pm
Criterion Covered Total %
branch 7 104 6.7


line true false branch
24 0 0 if $@
26 0 0 unless my $server = $self->config->{'imap'}{'server'}
27 0 0 unless my $folder = $self->config->{'imap'}{'folder'}
36 0 0 $port == 993 ? :
0 0 unless (my $imap = "Net::IMAP::Simple"->new($server, "Port", $port, $port == 993 ? ("use_ssl", 1) : ()))
38 0 0 $port == 143 ? :
42 0 0 if $self->verbose
45 0 0 unless $imap->login($self->config->{'imap'}{'user'}, $self->config->{'imap'}{'pass'})
47 0 0 if $self->verbose
52 0 0 unless (scalar @mess)
57 0 0 if $self->verbose
60 0 0 $imap->seen($i) ? :
62 0 0 unless (my $message = $imap->get($i))
67 0 0 unless $type
68 0 0 $type eq 'forensic' ? :
0 0 $type eq 'aggregate' ? :
74 0 0 if ($done_box)
75 0 0 unless ($imap->copy($i, $done_box))
89 0 0 unless $file
90 0 0 unless -f $file
97 0 0 unless $file_name
114 0 0 unless ref $folder_reader
142 0 0 if $c_type eq "text/plain"
143 0 0 if ($c_type eq "text/rfc822-headers")
148 0 0 if ($c_type eq "message/feedback-report")
156 0 0 if ($c_type eq "application/zip" or $c_type eq "application/x-zip-compressed")
163 0 0 if ($c_type eq "application/gzip")
170 0 0 if ($filename =~ /xml\.gz$/)
171 0 0 if ($c_type eq "application/octet-stream" or $c_type eq "multipart/alternative")
190 0 0 if ($@)
196 0 0 unless ($@)
215 0 0 if $self->{'_envelope_to'}
229 5 0 if "subject:" eq substr($subject, 0, 8)
234 1 4 if ($report_id and not $meta->uuid)
236 0 1 if "<" eq substr($report_id, 0, 1)
237 0 1 if ">" eq substr($report_id, -1, 1)
247 0 0 if $self->{'verbose'}
262 4 1 if ref $self->{'report'}
275 0 0 if "<" eq substr($rid, 0, 1)
276 0 0 if ">" eq substr($rid, -1, 1)
279 0 0 unless ($self->report->aggregate->metadata->uuid)
300 0 0 unless my $val = $node->findnodes("./$n")->string_value
324 0 0 if ($pe eq 'disposition') { }
325 0 0 unless ($ResultType =~ /^(none|quarantine|reject)$/)
330 0 0 unless ($ResultType =~ /^(pass|fail)$/)
348 0 0 unless ($rec->identifiers->header_from)
355 0 0 unless ($rec->identifiers->envelope_to)
358 0 0 unless ($rec->identifiers->header_from)
362 0 0 if $self->verbose
375 0 0 if ($spf{'scope'} and not $self->is_valid_spf_scope($spf{'scope'}))
380 0 0 if ($spf{'result'} and not $self->is_valid_spf_result($spf{'result'}))
403 0 0 unless my $type = $r->findnodes("./type")->string_value