Branch Coverage

blib/lib/Mail/Field/Received.pm
Criterion Covered Total %
branch 82 192 42.7


line true false branch
79 1 1 if (@_)
254 43 0 if $debug >= 5
256 0 43 if $debug >= 6
259 7 36 if (/\G$Mail::Field::Received::RC{'comment'}/cg)
261 7 0 if $debug >= 4
263 4 3 if $last_section
267 2 5 if ($last_section eq 'from')
270 2 0 if ($comment =~ /\( (?:(?:($Mail::Field::Received::RC{'local_part'})\@)?($Mail::Field::Received::RC{'domain'})\s+)? (?:\[ $Mail::Field::Received::RC{'ipv4_addr'} \])(?: )\)/x)
275 0 2 if ($1)
276 0 0 if $debug >= 3
281 2 0 if ($2)
282 2 0 if $debug >= 3
287 2 0 if ($3)
288 2 0 if $debug >= 3
296 0 0 if ($comment =~ /(HELO|EHLO)(?:\s+|=)($Mail::Field::Received::RC{'domain'})/i)
298 0 0 if $debug >= 3
304 0 0 if ($comment =~ /$Mail::Field::Received::RC{'ipv4_addr'}\]?(?::(\d{1,5}))?/)
305 0 0 if $debug >= 3
310 0 0 if ($2)
312 0 0 if $debug >= 3
323 11 25 if (/\G(\s+)/cg)
324 0 11 if $debug >= 7
328 0 25 if ($expecting{'from'} and /\G$Mail::Field::Received::RC{'from1'}/cg)
330 0 0 if $debug >= 2
335 0 0 if $3
344 2 23 if ($expecting{'from'} and /\G$Mail::Field::Received::RC{'from2'}/cg)
345 2 0 if $debug >= 2
350 0 2 if $3
359 0 23 if ($expecting{'after_from'} and /\G($Mail::Field::Received::RC{'domain_lit'})/cg)
360 0 0 if $debug >= 3
366 0 2 if ($expecting{'after_from'} and $parsed{'from'}{'whole'} eq 'from mail' and /\G(pickup service)/cg)
368 0 0 if $debug >= 3
376 0 2 if ($expecting{'after_from'} and $parsed{'whole'} =~ /Microsoft SMTPSVC/ and /\G-\s+$Mail::Field::Received::RC{'ipv4_addr'}/cg)
378 0 0 if $debug >= 3
384 0 23 if ($expecting{'after_from'} and /\G, claiming to be ($Mail::Field::Received::RC{'word'})/cg)
385 0 0 if $debug >= 3
392 2 21 if ($expecting{'by'} and /\G$Mail::Field::Received::RC{'by'},?/cg)
393 2 0 if $debug >= 2
405 0 21 if ($expecting{'after_by'} and /\G($Mail::Field::Received::RC{'domain_lit'})/cg)
406 0 0 if $debug >= 3
412 0 21 if ($expecting{'after_by'} and /\G(Sendmail)/cg)
413 0 0 if $debug >= 3
416 0 0 if ($expecting{'via'})
424 0 21 if ($expecting{'via'} and /\G$Mail::Field::Received::RC{'via'}/cg)
425 0 0 if $debug >= 2
437 0 21 if ($expecting{'after_via'} and /\G\[$Mail::Field::Received::RC{'ipv4_addr'}\]/cg)
438 0 0 if $debug >= 3
444 0 21 if (not $expecting{'from'} and /\Gfrom\s+stdin/cg)
445 0 0 if $debug >= 3
450 0 21 if ($expecting{'with'} and m[ \G((?i:with) \s (P:(stdio|smtp)/R:(inet|bind)_hosts/T:(smtp|inet_zone_bind_smtp))) ]cgx)
455 0 0 if $debug >= 2
469 2 19 if ($expecting{'with'} and /\G$Mail::Field::Received::RC{'with'}/cg)
470 2 0 if $debug >= 2
475 0 2 if $3
485 2 17 if ($expecting{'after_with'} and $parsed{'with'}{'with'})
490 0 2 if ($parsed{'with'}{'with'} eq 'Microsoft')
491 0 0 if (/\GSMTPSVC(?:\(([\d\.]+)\))?/cg) { }
0 0 elsif (/\GMAPI/cg) { }
492 0 0 $1 ? :
0 0 if $debug >= 3
500 0 0 if $debug >= 3
509 0 2 if ($parsed{'with'}{'with'} eq 'Internet' and /\GMail Service\s*\(([\d\.]+)\)/cg)
511 0 0 if $debug >= 3
517 0 2 if ($parsed{'with'}{'with'} eq 'WorldClient' and /\G($Mail::Field::Received::RC{'domain_lit'})/cg)
519 0 0 if $debug >= 3
525 0 2 if ($parsed{'with'}{'with'} eq 'Local' and /\GSMTP/cg)
527 0 0 if $debug >= 3
535 2 17 if ($expecting{'id'} and /\G$Mail::Field::Received::RC{'id'}/cg)
536 2 0 if $debug >= 2
541 0 2 if $3
548 0 17 if ($expecting{'convert'} and /\G$Mail::Field::Received::RC{'convert'}/cg)
549 0 0 if $debug >= 2
559 1 16 if ($expecting{'for'} and /\G$Mail::Field::Received::RC{'for'}(\s+bugtraq\@securityfocus\.com)?/cig)
561 1 0 if $debug >= 2
566 0 1 if $3
573 0 16 if ($expecting{'sent_by'} and /\G$Mail::Field::Received::RC{'sent_by'}/cg)
574 0 0 if $debug >= 2
585 5 11 if ($expecting{'date_time'} and /\G((?:on\s+)?$Mail::Field::Received::RC{'date_time'})/cg)
586 5 0 if $debug >= 2
595 5 0 if (" $parsed{'date_time'}{'day_of_year'}" =~ /$Mail::Field::Received::RC{'year_day1'}/) { }
0 0 elsif (" $parsed{'date_time'}{'day_of_year'}" =~ /$Mail::Field::Received::RC{'year_day2'}/) { }
606 1 4 if ($parsed{'date_time'}{'rest'} =~ /$Mail::Field::Received::RC{'date_time1'}/) { }
1 3 elsif ($parsed{'date_time'}{'rest'} =~ /$Mail::Field::Received::RC{'date_time2'}/) { }
3 0 elsif ($parsed{'date_time'}{'rest'} =~ /$Mail::Field::Received::RC{'date_time3'}/) { }
609 1 0 if defined $6
618 3 0 if defined $6
629 0 11 if ($expecting{'after_date_time'} and /\G((mail.from|env.from).+)/cg)
630 0 0 if $debug >= 3
636 5 6 if (/\G(;\s+)/cg)
637 0 5 if $debug >= 7
643 1 5 if $start[0] < 0
645 1 5 if (/\G(.{1,35})/cg)
646 1 0 if $debug >= 1
659 1 5 $failed ? :
679 0 6 unless $$self{'parse_tree'}
764 0 5 unless $$self{'parse_tree'}