line |
true |
false |
branch |
23
|
0 |
1991 |
unless (defined $useragent) |
37
|
1991 |
0 |
if (defined $hashref) |
70
|
193 |
1798 |
unless ($useragent =~ m[^
# Match the vendor-model combination (this goes into $1)....
(
# Match known vendor names (this goes into $2)...
(ACER|Alcatel|AUDIOVOX|BlackBerry|CDM|Ericsson|LG\b|LGE|Motorola|MOT|NEC|Nokia|Panasonic|PANTECH|PT|QCI|SAGEM|SAMSUNG|SEC|Sanyo|Sendo|SHARP|SIE|SonyEricsson|Telit|Telit_Mobile_Terminals|TSM)
# optionally followed by an irrelevant space or '-' character...
[- ]?
# followed by the model name (this goes into $3)...
([^/\s\_]+)
)
# Match possible version information after the slash seperator (this goes into $5)...
(/(\S+))?
]x) |
95
|
1 |
1797 |
if ($vendor eq 'ACER') { } |
|
4 |
1793 |
elsif ($vendor eq 'AUDIOVOX') { } |
|
4 |
1789 |
elsif ($vendor eq 'CDM') { } |
|
67 |
1722 |
elsif ($vendor eq 'Ericsson') { } |
|
30 |
1692 |
elsif (substr($vendor, 0, 2) eq 'LG') { } |
|
277 |
1415 |
elsif ($vendor eq 'MOT') { } |
|
0 |
1415 |
elsif ($vendor eq 'PT' or $vendor eq 'PANTECH') { } |
|
0 |
1415 |
elsif ($vendor eq 'PHILIPS') { } |
|
80 |
1335 |
elsif ($vendor eq 'SAGEM') { } |
|
63 |
1272 |
elsif ($vendor eq 'SEC') { } |
|
240 |
1032 |
elsif ($vendor eq 'SIE') { } |
|
1 |
1031 |
elsif ($vendor eq 'Telit_Mobile_Terminals') { } |
|
10 |
1021 |
elsif ($vendor eq 'TSM') { } |
106
|
0 |
67 |
if ($model eq 'T68_NIL') |
112
|
1 |
29 |
if ($model =~ /^([A-Za-z\d]+)-/) |
127
|
0 |
80 |
if ($model eq '-') |
147
|
1670 |
128 |
if (defined $version) |
202
|
29 |
131 |
if ($useragent =~ /$pattern/i) |
207
|
26 |
3 |
if (defined $6 and length $6) { } |
215
|
29 |
0 |
if (defined $model) |
227
|
69 |
62 |
if ($useragent =~ /$pattern/i) |
234
|
0 |
69 |
if (defined $6 and length $6) { } |
276
|
2 |
191 |
if ($useragent =~ m[^Mozilla/SMB3\((Z105)\)/(Samsung)]) |
280
|
160 |
31 |
unless ($useragent =~ m[^Mozilla/\d+\.\d+\s*\(([^\)]+)\)]i) |
285
|
9 |
18 |
if (@parts >= 4 and $parts[0] eq 'compatible' and $parts[2] eq 'Windows CE') |
287
|
8 |
1 |
if ($parts[3] eq 'PPC' or lc $parts[3] eq 'smartphone') { } |
|
1 |
0 |
elsif (@parts >= 5 and $parts[4] eq 'PPC' || lc $parts[4] eq 'smartphone') { } |
289
|
8 |
0 |
if (@parts >= 5 and $parts[4] =~ /^\d{1,4}x\d{1,4}$/i) |
295
|
1 |
0 |
if ($parts[3] =~ /^\d{1,4}x\d{1,4}$/i) |
299
|
9 |
0 |
if (exists $result{'model'}) |
305
|
18 |
0 |
if (@parts >= 4 and $parts[0] eq 'compatible' and $parts[3] =~ /^(Nokia|Sony)\s*(\S+)$/) |
308
|
18 |
0 |
if ($vendor eq 'Sony') |
315
|
4 |
0 |
if (@parts and $parts[0] =~ m[^MobilePhone ([^/]+)/([A-Z]+/)?(\d+\.\d+)$]) |
320
|
0 |
0 |
if (@parts >= 3 and $parts[0] eq 'compatible' and $parts[1] =~ /^(Nokia)\s*(\S+)$/) |
361
|
0 |
62 |
if ($useragent =~ /(Nokia)\s*(N-Gage|\d+)$/) { } |
|
1 |
61 |
elsif ($useragent =~ m[^(LG)E?/(\w+)(/(\d+\.\d+))?]) { } |
|
60 |
1 |
elsif ($useragent =~ /^(PHILIPS)(.+)/) { } |
|
1 |
0 |
elsif ($useragent =~ /^(Vitelcom)-(Feature Phone)(\d+\.\d+)/) { } |
368
|
1 |
0 |
if (defined $4 and length $4) |
380
|
2 |
58 |
if ($garbage =~ /^-?(\d+)/) { } |
|
29 |
29 |
elsif ($garbage =~ /^-?(FISIO)\s*(\d+)/) { } |
|
8 |
21 |
elsif ($garbage =~ /^-?(XENIUM)/) { } |
|
21 |
0 |
elsif ($garbage =~ m[^-?([^\s/]+)]) { } |
404
|
60 |
0 |
if (defined $model) |
435
|
1798 |
193 |
if ($result = $self->_parseUserAgentStandard($useragent)) |
439
|
33 |
160 |
if ($result = $self->_parseUserAgentMozilla($useragent)) |
443
|
98 |
62 |
if ($result = $self->_parseUserAgentImode($useragent)) |
447
|
62 |
0 |
if ($result = $self->_parseUserAgentRubbish($useragent)) |
561
|
0 |
0 |
unless (defined $$self{'is_series60'}) |