Branch Coverage

blib/lib/Parse/HTTP/UserAgent.pm
Criterion Covered Total %
branch 110 134 82.0


line true false branch
23 2 0 if not defined &Parse::HTTP::UserAgent::DEBUG
48 0 562 if ref $opt ne 'HASH'
52 0 562 exists $opt->{'extended'} ? :
53 0 562 if $opt->{'normalize'}
71 0 1370 unless $s
83 0 0 $type eq 'ARRAY' ? :
0 0 !$type ? :
88 0 0 if delete $mode{':all'}
91 0 0 if $mode{'plus_to_space'}
92 0 0 if $mode{'trim_spaces'}
98 0 562 if $self->[2]
101 562 0 unless $self->[23]
118 694 2370 if ($token eq '(')
119 670 24 if ++$depth == 1
122 692 1678 if ($token eq ')')
123 666 26 if --$depth == 0
131 0 562 unless shift @parts
132 36 526 unless shift @parts
133 282 280 unless shift @parts
136 526 36 $thing ? :
137 280 282 if $extra
148 150 62 if ($c and shift @{$t;} and !$e || $self->[3] and not $self->[1])
154 120 30 if ($n eq 'MSIE' and index($m, ' ') == -1)
159 26 416 if ($self->[3])
162 12 98 index($_, 'rv:') != -1 ? :
26 110 index($_, 'Trident/') != -1 ? :
28 136 index($_, 'Windows') != -1 ? :
169 12 14 if ($msie_matched == 3) { }
2 12 elsif (not $self->[1] and $msie_matched == 2 and not $msie11{'version'}) { }
176 2 6 if (index($junk, 'MSIE') != -1)
189 2 186 $self->_is_suspicious_ff($e) ? :
42 188 $self->_is_android($t, \@o) ? :
20 230 $self->_is_chrome($e, \@o) ? :
36 250 $self->_is_safari($e, \@o) ? :
48 286 $self->_is_ff($e) ? :
2 334 $self->_is_opera_ff($e) ? :
14 336 $self->_is_opera_post($e) ? :
34 350 $self->_is_opera_pre($m) ? :
44 384 $self->[1] ? :
200 242 186 if ($rv)
204 240 2 if ($rvx)
210 188 0 if $self->[0]
218 546 16 if $self->[25]
223 76 802 if ($self->_is_strength($e))
230 408 154 @buf ? :
232 266 296 if ($self->[21])
234 264 2 defined $v ? :
237 90 472 if ($self->[10])
243 498 64 if ($self->[14])
248 4962 18 if lc $robo ne lc $self->[11]
258 50 138 if $self->_is_gecko and $self->_parse_gecko(@args)
259 26 112 if $self->_is_netscape(@args) and $self->_parse_netscape(@args)
260 2 110 if $self->_is_docomo(@args) and $self->_parse_docomo(@args)
261 84 26 if $self->_is_generic(@args)
262 4 22 if $self->_is_emacs(@args) and $self->_parse_emacs(@args)
263 20 2 if $self->_is_moz_only(@args) and $self->_parse_moz_only(@args)
264 2 0 if $self->_is_hotjava(@args) and $self->_parse_hotjava(@args)
279 46 888 if ($v =~ s/( pre | rel | alpha | beta | \-stable | gold | [ab]\d+ | a\-XXXX | dev | [+] )//gimsx)
296 2 932 if ($v =~ s/( (?:[^0-9]+)? # usually dash rc # nonsense [\-_.]? # usually dash ([0-9]) # teh candidate revision )/.0.$2/imsx)
308 2 932 if (my $rc = $v =~ tr/\-/./)
315 2 932 if (my $rc = $v =~ tr/_/./)
322 2 932 if ($v =~ s/([^0-9._v])/./gmsx)
326 0 934 if ($v =~ s/([.]{2,})/./gmsx)
342 0 2 if not $msg =~ / Integer\ overflow\ in\ version /msx || $msg =~ / Version\ string .+? contains\ invalid\ data\;\ ignoring\:/msx
346 114 820 if index($v, '.') == -1
348 0 934 unless $check
353 0 934 unless (eval { do { $rv = 'version'->new("$v")->numify; 1 } })