Condition Coverage

blib/lib/Parse/HTTP/UserAgent/Base/Parsers.pm
Criterion Covered Total %
condition 157 241 65.1


and 3 conditions

line !l l&&!r l&&r condition
18 0 2 178 $1 and $1 ne 64
51 4 54 2 ${$v_ref;} and not ${$v_ref;} =~ / [0-9] /msx
56 12 40 8 ${$os_ref;} and ${$os_ref;} =~ m[ http:// ]msx
66 0 0 10 $extra && $extra->[0] && index($extra->[0], 'AppleWebKit') != -1
146 144 24 2 @{$extras;} == 2 and index($extras->[1], "Lunascape") != -1
154 40 124 6 $extras->[0] and $extras->[0] eq "Mac_PowerPC"
164 0 0 44 $tk_name eq "Trident" and $tk_version
165 30 12 2 $tk_version eq "7.0" and $self->[25] ne "11.0"
30 8 4 $tk_version eq "6.0" and $self->[25] ne "10.0"
228 10 0 2 $self->[22] and $self->[6]
250 2 0 46 ref $e eq "ARRAY" and @{$e;} > 0
2 36 10 ref $e eq "ARRAY" and @{$e;} > 0 and index(lc $e->[-1], "fennec") != -1
299 0 54 12 $thing && lc($thing->[0] || '') eq 'ipad'
301 0 62 4 $version && index(lc $version, 'epiphany') != -1
307 0 8 4 $junkv and $junkv eq "Mobile"
320 0 30 36 $thing->[-1] and length $thing->[-1] <= 5
327 0 2 64 @{$thing;} && length $thing->[-1] > 1
329 0 66 0 $self->[14] and lc $self->[14] eq "macintosh"
334 12 48 6 $thing->[0] and lc $thing->[0] eq "iphone"
339 2 2 2 $check_os and index($check_os, "Mac OS X") != -1
345 0 0 2 not $self->[8] and $self->[21]
347 0 0 2 $v and $v =~ / [a-zA-Z]{2}_[a-zA-Z]{2} /msx
358 0 66 0 $self->[14] and length $self->[14] == 1
363 28 36 2 $self->[8] and not $self->[8] =~ /[a-zA-Z]+/gmsx
382 16 0 4 $rest[0] and index($rest[0], "OPR/", 0) != -1
402 40 0 2 not $extra and $others[0]
0 0 2 not $extra and $others[0] and index($others[0], "AppleWebKit") != -1
429 0 42 0 @build and index($build[-1], "Build") == -1
436 2 0 40 $device and $build
447 0 0 42 @extras >= 3 and $extras[0]
0 0 42 @extras >= 3 and $extras[0] and $extras[0] eq "KHTML,"
465 2 32 2 @{$thing;} && index($thing->[-1], 'rv:') != -1
476 0 12 10 @{$extra;} && index($extra->[-1], 'Version/') != -1
487 16 2 16 !$self->[21] && $self->_numify($version) >= 9 && $lang && length $lang > 5
499 0 10 24 @{$thing;} and $self->_is_strength($thing->[-1])
522 0 8 6 @{$thing;} and $self->_is_strength($thing->[-1])
551 0 10 90 @{$thing;} and index($thing->[-1], "rv:") != -1
556 0 0 0 $self->[14] and $self->[14] eq "Macintosh"
618 0 0 50 $self->[11] and $self->[25]
638 68 6 6 not $self->[14] and $e =~ / Win(?:NT|dows) /imsx
659 0 0 0 ref $self->[21] eq "ARRAY" and $self->[21][0] eq "Gecko"
661 0 0 0 $self->[11] and $self->[25]
672 0 18 8 $self->[14] and length $self->[14] == 2
683 2 26 46 $os ne "windows" and not $skip_os
727 0 0 6 $device and $num
0 2 4 $device and $num and $os
2 0 4 $device and $num and $os and $series
2 0 4 $device and $num and $os and $series and index($os, "SymbianOS") != -1
742 0 8 10 $t->[0] && !($t->[0] =~ / \d+ [.]? \d /msx)
759 0 0 36 $moz && !@{$thing;} && !$extra && !$compatible && !@others
765 0 0 18 $name and $version
780 48 0 44 $compatible and @{$thing;}
787 4 36 4 $thing->[0] and $thing->[0] eq $name || $thing->[0] eq $moz
816 22 18 2 $lang and index($lang, "MSIE ") != -1
848 4 0 0 $extra and ref $extra eq "ARRAY"
867 14 0 2 $name eq "Mozilla" and @parts
869 0 0 2 $name and $version
885 0 0 8 $os and $series_device
923 0 0 2 $thing->[0] and index(lc $thing->[0], "googlebot-mobile") != -1

or 2 conditions

line l !l condition
78 10 0 $extra ||= []
113 4 0 $self->[6] ||= []
287 0 0 $self->[6] ||= []
341 0 2 $self->[6] ||= []
438 40 0 $self->[14] || 'Android'
520 10 4 shift @{$extra;} || ''
682 66 10 $self->[14] || ''
828 36 4 $version || 0
844 4 0 $version || 0
873 16 0 $version || 0
908 2 0 $version || 0

or 3 conditions

line l !l&&r !l&&!r condition
20 14 164 0 $self->[14] ||= $e
98 12 34 0 $msie ||= $e
393 4 16 0 $opera || $chrome
485 0 2 0 $lang ||= pop @{$thing;}
562 6 6 12 $thing->[0] eq "X11" or index($thing->[-1], "Intel") != -1
4 2 6 index(lc $thing->[0], "android") != -1 or index(lc $thing->[0], "maemo") != -1
683 66 8 2 $os || $skip_os
2 46 28 not $os || $skip_os or $os ne "windows" and not $skip_os
46 0 28 not $os || $skip_os or $os ne "windows" and not $skip_os or ref $self->[6] ne "ARRAY"
46 0 28 not $os || $skip_os or $os ne "windows" and not $skip_os or ref $self->[6] ne "ARRAY" or not $self->[6][0]
0 22 6 not $os || $skip_os or $os ne "windows" and not $skip_os or ref $self->[6] ne "ARRAY" or not $self->[6][0] or not $self->[6][0] =~ / NT\s?(\d.*?) \z /imsx
722 2 4 24 $mname eq "Mozilla" or $mname eq "Emacs-W3"
740 14 4 2 $mversion || ($mname eq 'Links' ? shift @{$t;} : 0)
787 2 2 36 $thing->[0] eq $name || $thing->[0] eq $moz