Branch Coverage

blib/lib/Duadua/Parser.pm
Criterion Covered Total %
branch 18 20 90.0


line true false branch
14 383 10278 if (my $res = $m->try($d))
20 3 25 if ($d->ua eq "" or $d->ua eq "-")
24 2 23 if (my $browser = $class->_detect_general_browser($d))
28 18 5 if (my $bot = $class->_detect_general_bot($d))
40 2 23 if (index($d->ua, "Mozilla/") == 0 and index($d->ua, "rowser") > 0)
41 2 0 if ($d->ua =~ m[[^a-zA-Z]([a-zA-Z]+[bB]rowser)/([\d.]+)])
53 18 5 if (index($d->ua, "http://") > -1 or index($d->ua, "https://") > -1)
55 9 9 if (index($d->ua, 'Mozilla/') != 0 and $d->ua =~ m[^([^/;]+)/(v?[\d.]+)]) { }
8 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))/i) { }