Branch Coverage

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


line true false branch
53 1 2932 unless ref $as eq "Sisimai::Address"
54 0 2932 unless ref $ar eq "Sisimai::Address"
92 1 2778 unless exists $argvs->{'data'}
93 0 2778 unless ref $argvs->{'data'} eq "Sisimai::Message"
94 0 2778 unless $argvs->{'data'}->ds
95 0 2778 unless $argvs->{'data'}->rfc822
124 2431 513 unless ($delivered1)
126 12 2419 if index($p->{'deliverystatus'}, "2.") == 0
134 1655 2737 unless exists $rfc822data->{$h}
135 0 2737 unless $rfc822data->{$h}
138 0 2737 unless scalar @$j
143 195 2737 unless ($p->{'addresser'})
147 195 0 if scalar @$j
150 0 2932 unless $p->{'addresser'}
151 0 2932 unless $p->{'recipient'}
157 1655 1277 if $e->{'date'}
162 9176 2552 unless $rfc822data->{$f}
167 1410 1522 if scalar @datevalues < 2
172 2932 0 if $datestring
175 2932 0 if (defined $datestring and $datestring =~ /\A(.+)[ ]+([-+]\d{4})\z/)
190 0 2932 unless defined $p->{'timestamp'}
195 2784 148 if (scalar @$recvheader)
204 0 5864 if substr($p->{$v}, -1, 1) eq "\r"
207 170 5694 if rindex($p->{$v}, " ") > -1
208 20 5844 if substr($p->{$v}, -1, 1) eq "."
213 0 2932 if substr($p->{'subject'}, -1, 1) eq "\r"
215 32 2900 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 2512 420 if ($p->{'messageid'} = $rfc822data->{'message-id'} // "")
225 10 2502 if $p->{'messageid'} =~ /\A([^ ]+)[ ].*/
226 2474 38 if $p->{'messageid'} =~ /[<]([^ ]+?)[>]/
231 0 2932 if substr($p->{'diagnosticcode'}, -1, 1) eq "\r"
233 2880 52 if ($p->{'diagnosticcode'})
239 1388 1492 if ($vs)
242 1078 310 if $vs =~ /\A[45][.][1-9][.][1-9]\z/
245 2040 840 if ($vr)
251 181 2699 if ($vm > 2)
265 0 2932 if $p->{'reason'} eq "mailererror"
266 2790 142 unless $p->{'reason'} =~ /\A(?:feedback|vacation)\z/
270 1684 1248 unless $p->{'smtpcommand'} =~ /\A(?:EHLO|HELO|MAIL|RCPT|DATA|QUIT)\z/
274 1600 1332 if length $p->{'action'}
275 80 1252 if ($p->{'reason'} eq 'expired') { }
590 662 elsif (index($p->{'deliverystatus'}, '5') == 0 or index($p->{'deliverystatus'}, '4') == 0) { }
284 0 2932 unless my $o = "Sisimai::Data"->new(%$p)
286 2425 507 if ($o->reason eq "" or exists $$retryindex{$o->reason})
288 327 2098 if "Sisimai::Rhost"->match($o->rhost)
289 94 2331 if "Sisimai::Rhost"->match($o->destination)
295 146 2786 if ($o->reason eq 'delivered' or $o->reason eq 'feedback' or $o->reason eq 'vacation') { }
298 142 4 unless $o->reason eq "delivered"
303 2786 0 unless (length $o->softbounce)
306 611 2175 if substr($textasargv, 0, 1) eq " "
309 2786 0 if ($softorhard) { }
311 1865 921 $softorhard eq 'soft' ? :
319 611 2175 unless ($o->deliverystatus)
322 388 223 if substr($textasargv, 0, 1) eq " "
325 233 20 $getchecked == 1 ? :
253 358 defined $getchecked ? :
327 611 0 if (my $pseudocode = "Sisimai::SMTP::Status"->code($o->reason, $tmpfailure))
330 0 611 if ($o->softbounce == -1)
332 0 0 if (my $softorhard = 'Sisimai::SMTP::Error'->soft_or_hard($o->reason, $pseudocode)) { }
334 0 0 $softorhard eq 'soft' ? :
344 2036 750 if ($o->replycode)
348 37 1999 unless $d1 eq $r1
392 0 639 unless $type =~ /\A(?:json|yaml)\z/