Branch Coverage

blib/lib/Duadua/Parser.pm
Criterion Covered Total %
branch 22 24 91.6


line true false branch
14 253 191 if ($index_mozilla == 0) { }
4 187 elsif ($index_mozilla > 0) { }
22 410 12705 if (my $res = $m->try($d))
28 3 31 if ($d->ua eq "" or $d->ua eq "-")
32 2 29 if (my $browser = $class->_detect_general_browser($d))
36 24 5 if (my $bot = $class->_detect_general_bot($d))
46 2 29 if (index($d->ua, "rowser") > 0 and $d->_prefix("Mozilla/"))
47 2 0 if ($d->ua =~ m[[^a-zA-Z]([a-zA-Z]+[bB]rowser)/([\d.]+)])
60 24 5 if ($d->_contain("https://") or $d->_contain("http://"))
62 9 15 if (not $d->_contain('Mozilla/') and $d->ua =~ m[^([^/;]+)/(v?[\d.]+)]) { }
14 1 elsif ($d->ua =~ m[[\s\(]([^(/\s:;]+(?:bot|crawl|crawler|spider|fetcher))/(v?[\d.]+)]i) { }
1 0 elsif ($d->ua =~ /([a-zA-Z0-9\-\_\.!]+(?:bot|crawler|spider))/i) { }