Branch Coverage

lib/Sisimai/Data.pm
Criterion Covered Total %
branch 104 132 78.7


line true false branch
53 1 2962 unless ref $as eq "Sisimai::Address"
54 0 2962 unless ref $ar eq "Sisimai::Address"
92 1 2808 unless exists $argvs->{'data'}
93 0 2808 unless ref $argvs->{'data'} eq "Sisimai::Message"
94 0 2808 unless $argvs->{'data'}->ds
95 0 2808 unless $argvs->{'data'}->rfc822
124 2461 513 unless ($delivered1)
126 12 2449 if index($p->{'deliverystatus'}, "2.") == 0
134 1655 2767 unless exists $rfc822data->{$h}
135 0 2767 unless $rfc822data->{$h}
138 0 2767 unless scalar @$j
143 195 2767 unless ($p->{'addresser'})
147 195 0 if scalar @$j
150 0 2962 unless $p->{'addresser'}
151 0 2962 unless $p->{'recipient'}
157 1685 1277 if $e->{'date'}
162 9276 2572 unless $rfc822data->{$f}
167 1410 1552 if scalar @datevalues < 2
172 2962 0 if $datestring
175 2962 0 if (defined $datestring and $datestring =~ /\A(.+)[ ]+([-+]\d{4})\z/)
190 0 2962 unless defined $p->{'timestamp'}
195 2814 148 if (scalar @$recvheader)
204 0 5924 if substr($p->{$v}, -1, 1) eq "\r"
207 170 5754 if rindex($p->{$v}, " ") > -1
208 20 5904 if substr($p->{$v}, -1, 1) eq "."
213 0 2962 if substr($p->{'subject'}, -1, 1) eq "\r"
215 32 2930 if ($p->{'listid'} = $rfc822data->{'list-id'} // "")
217 27 5 if $p->{'listid'} =~ /\A.*([<].+[>]).*\z/
219 0 32 if substr($p->{'listid'}, -1, 1) eq "\r"
220 0 32 if rindex($p->{'listid'}, " ") > -1
223 2537 425 if ($p->{'messageid'} = $rfc822data->{'message-id'} // "")
225 10 2527 if $p->{'messageid'} =~ /\A([^ ]+)[ ].*/
226 2499 38 if $p->{'messageid'} =~ /[<]([^ ]+?)[>]/
231 0 2962 if substr($p->{'diagnosticcode'}, -1, 1) eq "\r"
233 2910 52 if ($p->{'diagnosticcode'})
239 1388 1522 if ($vs)
242 1078 310 if $vs =~ /\A[45][.][1-9][.][1-9]\z/
245 2070 840 if ($vr)
251 181 2729 if ($vm > 2)
269 0 2962 if $p->{'reason'} eq "mailererror"
270 2820 142 unless $p->{'reason'} =~ /\A(?:feedback|vacation)\z/
274 1684 1278 unless $p->{'smtpcommand'} =~ /\A(?:EHLO|HELO|MAIL|RCPT|DATA|QUIT)\z/
278 1630 1332 if length $p->{'action'}
279 80 1252 if ($p->{'reason'} eq 'expired') { }
590 662 elsif (index($p->{'deliverystatus'}, '5') == 0 or index($p->{'deliverystatus'}, '4') == 0) { }
288 0 2962 unless my $o = "Sisimai::Data"->new(%$p)
290 2455 507 if ($o->reason eq "" or exists $$retryindex{$o->reason})
292 388 2067 if "Sisimai::Rhost"->match($o->rhost)
293 94 2361 if "Sisimai::Rhost"->match($o->destination)
299 146 2816 if ($o->reason eq 'delivered' or $o->reason eq 'feedback' or $o->reason eq 'vacation') { }
302 142 4 unless $o->reason eq "delivered"
307 2816 0 unless (length $o->softbounce)
310 611 2205 if substr($textasargv, 0, 1) eq " "
313 2816 0 if ($softorhard) { }
315 1884 932 $softorhard eq 'soft' ? :
323 611 2205 unless ($o->deliverystatus)
326 388 223 if substr($textasargv, 0, 1) eq " "
329 233 20 $getchecked == 1 ? :
253 358 defined $getchecked ? :
331 611 0 if (my $pseudocode = "Sisimai::SMTP::Status"->code($o->reason, $tmpfailure))
334 0 611 if ($o->softbounce == -1)
336 0 0 if (my $softorhard = 'Sisimai::SMTP::Error'->soft_or_hard($o->reason, $pseudocode)) { }
338 0 0 $softorhard eq 'soft' ? :
348 2066 750 if ($o->replycode)
352 37 2029 unless $d1 eq $r1
396 0 644 unless $type =~ /\A(?:json|yaml)\z/