Branch Coverage

blib/lib/LaBrea/Tarpit.pm
Criterion Covered Total %
branch 113 138 81.8


line true false branch
6 0 0 if $DOWARN
260 116 5 $ksf ? :
2416 121 $dod ? :
264 720 1817 if (ref $$p{$key}) { }
267 1728 89 $dod ? :
302 0 0 unless $kid
303 0 0 unless ($DEBUG)
304 0 0 unless open STDERR, '>&STDOUT'
824 0 23 if ($lt[5] > $gt[5]) { }
0 23 elsif ($gt[5] > $lt[5]) { }
833 0 23 if $lt[8]
836 0 23 if $test[2] != $gt[2]
840 0 23 $tzmin < 0 ? :
957 65 14 unless $id or $line =~ /LaBrea:/
959 10 642 if ($line =~ /.+bw:\s+(\d+)\s+/)
965 528 25 if ($line =~ /^(\d+)\s+/) { }
969 2 112 unless $line =~ /(.+)\s+(\d+):(\d+):(\d+)\s+(\w+)\s+/
975 11 12 if ($yr =~ /[^\d]/) { }
12 0 elsif ($yr > 1900) { }
0 0 elsif ($yr < 70) { }
977 11 0 $mon > $nowmo ? :
988 122 429 unless $line =~ /:\s+(\d+\.\d+\.\d+\.\d+)\s+([na\d]+)[^\d]+(\d+\.\d+\.\d+\.\d+)\s+([na\d]+)/
989 401 28 if not $$tp{'now'} or $$tp{'now'} < $time
991 12 417 if $$tp{'dt'}{$src}
995 99 330 $line =~ /Persist/i ? :
996 379 50 unless exists $$_{'ct'}
998 9 420 if ($ds and $line =~ /Initial/i)
999 9 0 unless $$_{'DShield'}
1000 9 0 unless $$_{'DShield'}{$dest}
1004 43 386 if ($ph)
1007 14 29 if (exists $$tp{'ph'}{$time}{$dp}) { }
1036 9 42 unless open LOG, $logf
1037 14 36 unless $ph
1068 0 5 unless sysopen $LOCK, $fn . '.flock', 578
1070 1 4 unless (flock $LOCK, 2)
1074 0 4 unless (sysopen $fh, $fn, 1090)
1093 130 37 $scrs && $scrs > 0 ? :
1097 19 78 unless $timeout
1110 7 314 if (exists $$act{$src}{$sp}{'DShield'})
1111 11 25 if (not $ds) { }
5 28 elsif ($dso or $dso = _ex_append(*LOCK, *DS, $ds)) { }
1130 273 50 if ($$act{$src}{$sp}{'lc'} < $expired)
1135 46 269 if (keys %{$$act{$src};}) { }
1142 7 34 if ($dso)
1146 12 171 if ($scrs)
1153 5 7 if ((@_ = keys %{$dead;}) > $scrs)
1165 21 22 if ($ph) { }
32 179 elsif (exists $$tp{'ph'}) { }
1170 11 201 if ($_ < $end)
1309 8 37 unless exists $$p{$k}
1343 9 36 unless $$tp{'tz'}
1346 44 158 if (exists $$p{'tg_srcIP'} and exists $$p{'tg_sPORT'})
1356 2 1 if ($thsip = &_init_pt($p, 'th_srcIP'))
1359 2 28 if ($$p{'cs_days'} and exists $$p{'cs_date'} and exists $$p{'cs_ctd'})
1361 2 28 $$p{'cs_days'} && $$p{'cs_days'} > 1 ? :
1375 2 28 if (&_init_pt($p, 'ph_dstIP'))
1379 44 76 if (&_init_pt($p, 'sc_srcIP'))
1396 44 76 if ($thsip)
1397 44 76 if $thnum
1401 2 4 if $phdip
1403 7 0 if ($csdate)
1405 6 24 exists $threadays{$capt} ? :
1410 4 62 if ($tgsip)
1411 5 7 if $tgdip
1412 1 0 if $tgdp
1413 2 56 if $tgcap
1414 0 58 if $tglst
1415 0 58 if $tgpst
1529 16 44 if $ct + $age < $now