Imported Upstream version 1.66
gregor herrmann
10 years ago
19 | 19 | "Olaf Alders <olaf\@wundercounter.com> (current maintainer)" |
20 | 20 | ], |
21 | 21 | "dist_name" => "HTTP-BrowserDetect", |
22 | "dist_version" => "1.65", | |
22 | "dist_version" => "1.66", | |
23 | 23 | "license" => "perl", |
24 | 24 | "module_name" => "HTTP::BrowserDetect", |
25 | 25 | "recommends" => {}, |
0 | 0 | Revision history for Perl extension HTTP::BrowserDetect. |
1 | ||
2 | 1.66 2013-12-17 11:37:20 America/Toronto | |
3 | - Adds detection for IE Compatibility View (Douglas Christopher Wilson) | |
1 | 4 | |
2 | 5 | 1.65 2013-12-10 21:08:07 America/Toronto |
3 | 6 | - Adds os_version for FireFox in OS X (Hao Wu) |
279 | 282 | Chrome |
280 | 283 | - Have moved repository to GitHub |
281 | 284 | |
282 | 0.99 Thu Feb 22 16:47:00 2007 | |
285 | 0.99 2007-02-22 | |
283 | 286 | - Modifications by Peter Walsham |
284 | 287 | - Added support for Windows Server 2003 and Windows Vista |
285 | 288 | |
286 | 0.98 Tue Jun 21 00:39:00 2004 | |
289 | 0.98 2004-06-21 | |
287 | 290 | - Added more browsers including Mozilla, Firefox, Safari |
288 | 291 | - added Mac OS X, WinXP, Win2k detection |
289 | 292 | - added more test cases |
290 | 293 | |
291 | 0.962 Tues Jan 31 12:45:00 2001 | |
294 | 0.962 2001-01-31 | |
292 | 295 | - changed how minor() method to return minor version as a floating point |
293 | 296 | - added additional browsers |
294 | 297 | - added additional 'up' methods |
297 | 300 | - added Windows ME detection |
298 | 301 | - updated url to javascript browser sniffer page |
299 | 302 | |
300 | 0.95 Sat Aug 4 09:08:00 2000 | |
303 | 0.95 2000-08-04 | |
301 | 304 | - added additional browsers |
302 | 305 | |
303 | 0.94 Sun Mar 19 18:51:00 2000 | |
306 | 0.94 2000-03-19 | |
304 | 307 | - changed copyright notice |
305 | 308 | - changed object's internal structure |
306 | 309 | - added Windows 2000 detection |
307 | 310 | - eliminated AUTOLOAD subroutine |
308 | 311 | |
309 | 0.92 Mon Feb 7 12:34:56 2000 | |
312 | 0.92 2000-02-07 | |
310 | 313 | - fixed version numbering problem, would return '.' instead of undef if |
311 | 314 | useragent's version couldn't be found |
312 | 315 | - added more detection for AOL |
313 | 316 | |
314 | 0.9 Wed Feb 17 23:45:52 1999 | |
317 | 0.9 1999-02-17 | |
315 | 318 | - original version; created by h2xs 1.18 |
7 | 7 | Makefile.PL |
8 | 8 | README |
9 | 9 | TODO |
10 | cpanfile | |
10 | 11 | dist.ini |
11 | 12 | lib/HTTP/BrowserDetect.pm |
12 | 13 | t/01-detect.t |
5 | 5 | "Olaf Alders <olaf@wundercounter.com> (current maintainer)" |
6 | 6 | ], |
7 | 7 | "dynamic_config" : 0, |
8 | "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.132830", | |
8 | "generated_by" : "Dist::Zilla version 5.006, CPAN::Meta::Converter version 2.133380", | |
9 | 9 | "license" : [ |
10 | 10 | "perl_5" |
11 | 11 | ], |
62 | 62 | "web" : "https://github.com/oalders/http-browserdetect" |
63 | 63 | } |
64 | 64 | }, |
65 | "version" : "1.65", | |
65 | "version" : "1.66", | |
66 | 66 | "x_contributors" : [ |
67 | 67 | "Aran Deltac <bluefeet@gmail.com>", |
68 | 68 | "David Ihnen <davidihnen@gmail.com>", |
35 | 35 | "Test::Most" => 0, |
36 | 36 | "Test::NoWarnings" => 0 |
37 | 37 | }, |
38 | "VERSION" => "1.65", | |
38 | "VERSION" => "1.66", | |
39 | 39 | "test" => { |
40 | 40 | "TESTS" => "t/*.t" |
41 | 41 | } |
2 | 2 | an HTTP user agent string |
3 | 3 | |
4 | 4 | VERSION |
5 | version 1.65 | |
5 | version 1.66 | |
6 | 6 | |
7 | 7 | SYNOPSIS |
8 | 8 | use HTTP::BrowserDetect; |
230 | 230 | gecko |
231 | 231 | icab |
232 | 232 | ie ie3 ie4 ie4up ie5 ie55 ie6 ie7 ie8 ie9 ie10 ie11 |
233 | ie_compat_mode | |
234 | The ie_compat_mode is used to determine if the IE user agent is for the | |
235 | compatibility mode view, in which case the real version of IE is higher | |
236 | than that detected. The true version of IE can be inferred from the | |
237 | version of Trident in the engine_version method. | |
238 | ||
233 | 239 | java |
234 | 240 | konqueror |
235 | 241 | lotusnotes |
0 | requires "strict" => "0"; | |
1 | requires "vars" => "0"; | |
2 | requires "warnings" => "0"; | |
3 | ||
4 | on 'build' => sub { | |
5 | requires "Module::Build" => "0.3601"; | |
6 | }; | |
7 | ||
8 | on 'test' => sub { | |
9 | requires "File::Slurp" => "0"; | |
10 | requires "FindBin" => "0"; | |
11 | requires "JSON::PP" => "0"; | |
12 | requires "Test::FailWarnings" => "0"; | |
13 | requires "Test::More" => "0"; | |
14 | requires "Test::Most" => "0"; | |
15 | requires "Test::NoWarnings" => "0"; | |
16 | }; | |
17 | ||
18 | on 'configure' => sub { | |
19 | requires "ExtUtils::MakeMaker" => "6.30"; | |
20 | requires "Module::Build" => "0.3601"; | |
21 | }; | |
22 | ||
23 | on 'develop' => sub { | |
24 | requires "Test::CPAN::Changes" => "0.19"; | |
25 | }; |
4 | 4 | license = Perl_5 |
5 | 5 | copyright_holder = Lee Semel |
6 | 6 | copyright_year = 2013 |
7 | version = 1.65 | |
7 | version = 1.66 | |
8 | 8 | main_module = lib/HTTP/BrowserDetect.pm |
9 | 9 | |
10 | 10 | [GatherDir] |
47 | 47 | [ContributorsFile] |
48 | 48 | |
49 | 49 | [@Git] |
50 | ||
51 | [CPANFile] |
2 | 2 | |
3 | 3 | package HTTP::BrowserDetect; |
4 | 4 | { |
5 | $HTTP::BrowserDetect::VERSION = '1.65'; | |
5 | $HTTP::BrowserDetect::VERSION = '1.66'; | |
6 | 6 | } |
7 | 7 | |
8 | 8 | use vars qw(@ALL_TESTS); |
89 | 89 | ie55up ie6 ie7 |
90 | 90 | ie8 ie9 ie10 |
91 | 91 | ie11 |
92 | ie_compat_mode | |
92 | 93 | ); |
93 | 94 | |
94 | 95 | our @OPERA_TESTS = qw( |
281 | 282 | # Trident Engine (detect early for sniffing out IE) |
282 | 283 | $tests->{TRIDENT} = ( index( $ua, "trident/" ) != -1 ); |
283 | 284 | |
285 | if ( $tests->{TRIDENT} && $ua =~ /trident\/([\w\.\d]*)/ ) { | |
286 | $self->{engine_version} = $1; | |
287 | } | |
288 | ||
284 | 289 | # Browser version |
285 | 290 | my ( $major, $minor, $beta ) = ( |
286 | 291 | $ua =~ m{ |
497 | 502 | $tests->{IE9} = ( $tests->{IE} && $major == 9 ); |
498 | 503 | $tests->{IE10} = ( $tests->{IE} && $major == 10 ); |
499 | 504 | $tests->{IE11} = ( $tests->{IE} && $major == 11 ); |
505 | ||
506 | $tests->{IE_COMPAT_MODE} | |
507 | = ( $tests->{IE7} | |
508 | && $tests->{TRIDENT} | |
509 | && $self->{engine_version} + 0 >= 4 ); | |
500 | 510 | |
501 | 511 | # Neoplanet browsers |
502 | 512 | |
673 | 683 | if ( $tests->{GECKO} ) { |
674 | 684 | if ( $ua =~ /\([^)]*rv:([\w.\d]*)/ ) { |
675 | 685 | $self->{gecko_version} = $1; |
686 | $self->{engine_version} = $1; | |
676 | 687 | } |
677 | } | |
678 | ||
679 | # Engines | |
680 | ||
681 | $self->{engine_version} = $self->{gecko_version}; | |
682 | ||
683 | if ( $ua =~ /trident\/([\w\.\d]*)/ ) { | |
684 | $self->{engine_version} = $1; | |
685 | 688 | } |
686 | 689 | |
687 | 690 | # RealPlayer |
1479 | 1482 | |
1480 | 1483 | =pod |
1481 | 1484 | |
1485 | =encoding UTF-8 | |
1486 | ||
1482 | 1487 | =head1 NAME |
1483 | 1488 | |
1484 | 1489 | HTTP::BrowserDetect - Determine Web browser, version, and platform from an HTTP user agent string |
1485 | 1490 | |
1486 | 1491 | =head1 VERSION |
1487 | 1492 | |
1488 | version 1.65 | |
1493 | version 1.66 | |
1489 | 1494 | |
1490 | 1495 | =head1 SYNOPSIS |
1491 | 1496 | |
1751 | 1756 | |
1752 | 1757 | =head3 ie ie3 ie4 ie4up ie5 ie55 ie6 ie7 ie8 ie9 ie10 ie11 |
1753 | 1758 | |
1759 | =head3 ie_compat_mode | |
1760 | ||
1761 | The ie_compat_mode is used to determine if the IE user agent is for | |
1762 | the compatibility mode view, in which case the real version of IE is | |
1763 | higher than that detected. The true version of IE can be inferred from | |
1764 | the version of Trident in the engine_version method. | |
1765 | ||
1754 | 1766 | =head3 java |
1755 | 1767 | |
1756 | 1768 | =head3 konqueror |
454 | 454 | "other" : null, |
455 | 455 | "version" : "3.03" |
456 | 456 | }, |
457 | "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)" : { | |
458 | "match" : [ | |
459 | "dotnet", | |
460 | "ie", | |
461 | "ie_compat_mode", | |
462 | "ie4up", | |
463 | "ie55up", | |
464 | "ie5up", | |
465 | "ie7", | |
466 | "trident", | |
467 | "windows", | |
468 | "winnt", | |
469 | "win32", | |
470 | "win7" | |
471 | ], | |
472 | "public_major" : "7", | |
473 | "public_minor" : "0", | |
474 | "public_version" : "7.0", | |
475 | "version" : "7.0", | |
476 | "engine_major" : "5", | |
477 | "engine_minor" : "0", | |
478 | "engine_version" : "5.0", | |
479 | "engine_string" : "Trident" | |
480 | }, | |
481 | "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/6.0; .NET4.0E; .NET4.0C)" : { | |
482 | "match" : [ | |
483 | "ie", | |
484 | "ie_compat_mode", | |
485 | "ie4up", | |
486 | "ie55up", | |
487 | "ie5up", | |
488 | "ie7", | |
489 | "trident", | |
490 | "win32", | |
491 | "win8", | |
492 | "win8_0", | |
493 | "windows", | |
494 | "winnt" | |
495 | ], | |
496 | "public_major" : "7", | |
497 | "public_minor" : "0", | |
498 | "public_version" : "7.0", | |
499 | "version" : "7.0", | |
500 | "engine_major" : "6", | |
501 | "engine_minor" : "0", | |
502 | "engine_version" : "6.0", | |
503 | "engine_string" : "Trident" | |
504 | }, | |
505 | "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0)" : { | |
506 | "match" : [ | |
507 | "ie", | |
508 | "ie_compat_mode", | |
509 | "ie4up", | |
510 | "ie55up", | |
511 | "ie5up", | |
512 | "ie7", | |
513 | "trident", | |
514 | "win32", | |
515 | "win8", | |
516 | "win8_1", | |
517 | "windows", | |
518 | "winnt" | |
519 | ], | |
520 | "public_major" : "7", | |
521 | "public_minor" : "0", | |
522 | "public_version" : "7.0", | |
523 | "version" : "7.0", | |
524 | "engine_major" : "7", | |
525 | "engine_minor" : "0", | |
526 | "engine_version" : "7.0", | |
527 | "engine_string" : "Trident" | |
528 | }, | |
457 | 529 | "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GoogleT5; .NET CLR 1.1.4322; .NET CLR 2.0.50727)" : { |
458 | 530 | "major" : "8", |
459 | 531 | "match" : [ |
471 | 543 | ], |
472 | 544 | "minor" : "0", |
473 | 545 | "no_match" : [ |
546 | "ie_compat_mode", | |
474 | 547 | "robot" |
475 | 548 | ], |
476 | 549 | "public_major" : "8", |
499 | 572 | ], |
500 | 573 | "minor" : "0", |
501 | 574 | "no_match" : [ |
575 | "ie_compat_mode", | |
502 | 576 | "robot" |
503 | 577 | ], |
504 | 578 | "public_major" : "8", |
854 | 928 | "dotnet", |
855 | 929 | "trident", |
856 | 930 | "ie", |
931 | "ie_compat_mode", | |
857 | 932 | "ie7", |
858 | 933 | "ie4up", |
859 | 934 | "ie5up", |
976 | 1051 | "ie55up", |
977 | 1052 | "ie5up", |
978 | 1053 | "ie8" |
1054 | ], | |
1055 | "no_match": [ | |
1056 | "ie_compat_mode" | |
979 | 1057 | ], |
980 | 1058 | "os" : "WinXP", |
981 | 1059 | "public_major" : "8", |
1002 | 1080 | "ie5up", |
1003 | 1081 | "ie4up" |
1004 | 1082 | ], |
1083 | "no_match": [ | |
1084 | "ie_compat_mode" | |
1085 | ], | |
1005 | 1086 | "minor" : "0", |
1006 | 1087 | "no_match" : null, |
1007 | 1088 | "os" : "Win7", |
1027 | 1108 | "ie5up", |
1028 | 1109 | "ie4up" |
1029 | 1110 | ], |
1111 | "no_match": [ | |
1112 | "ie_compat_mode" | |
1113 | ], | |
1030 | 1114 | "minor" : "0", |
1031 | 1115 | "no_match" : null, |
1032 | 1116 | "os" : "Win7", |
1052 | 1136 | "ie5up", |
1053 | 1137 | "ie4up" |
1054 | 1138 | ], |
1139 | "no_match": [ | |
1140 | "ie_compat_mode" | |
1141 | ], | |
1055 | 1142 | "minor" : "0", |
1056 | 1143 | "no_match" : null, |
1057 | 1144 | "os" : "Win7", |
1077 | 1164 | "ie5up", |
1078 | 1165 | "ie4up" |
1079 | 1166 | ], |
1167 | "no_match": [ | |
1168 | "ie_compat_mode" | |
1169 | ], | |
1080 | 1170 | "minor" : "0", |
1081 | 1171 | "no_match" : null, |
1082 | 1172 | "os" : "Win7", |
1105 | 1195 | "windows", |
1106 | 1196 | "winnt" |
1107 | 1197 | ], |
1198 | "no_match": [ | |
1199 | "ie_compat_mode" | |
1200 | ], | |
1108 | 1201 | "minor" : "0", |
1109 | 1202 | "no_match" : null, |
1110 | 1203 | "os_string" : "Win8", |
1131 | 1224 | "ie5up", |
1132 | 1225 | "ie4up" |
1133 | 1226 | ], |
1227 | "no_match": [ | |
1228 | "ie_compat_mode" | |
1229 | ], | |
1134 | 1230 | "minor" : "0", |
1135 | 1231 | "no_match" : null, |
1136 | 1232 | "os_string" : "Win8", |
1156 | 1252 | "ie5up", |
1157 | 1253 | "ie4up" |
1158 | 1254 | ], |
1255 | "no_match": [ | |
1256 | "ie_compat_mode" | |
1257 | ], | |
1159 | 1258 | "minor" : "0", |
1160 | 1259 | "no_match" : null, |
1161 | 1260 | "os_string" : "Win7", |
1181 | 1280 | "ie55up", |
1182 | 1281 | "ie5up", |
1183 | 1282 | "ie4up" |
1283 | ], | |
1284 | "no_match": [ | |
1285 | "ie_compat_mode" | |
1184 | 1286 | ], |
1185 | 1287 | "minor" : "0", |
1186 | 1288 | "no_match" : null, |
2748 | 2850 | "language" : null, |
2749 | 2851 | "major" : null, |
2750 | 2852 | "match" : [ |
2853 | "dotnet", | |
2854 | "ie", | |
2855 | "ie_compat_mode", | |
2856 | "ie55up", | |
2857 | "ie5up", | |
2858 | "ie4up", | |
2859 | "ie7", | |
2860 | "trident", | |
2861 | "realplayer", | |
2862 | "win32", | |
2751 | 2863 | "win7", |
2752 | 2864 | "windows", |
2753 | "winnt", | |
2754 | "win32", | |
2755 | "dotnet", | |
2756 | "realplayer", | |
2757 | "trident", | |
2758 | "ie", | |
2759 | "ie7", | |
2760 | "ie55up", | |
2761 | "ie5up", | |
2762 | "ie4up" | |
2865 | "winnt" | |
2763 | 2866 | ], |
2764 | 2867 | "minor" : "0", |
2765 | 2868 | "no_match" : [ |
3091 | 3194 | "windows", |
3092 | 3195 | "winnt", |
3093 | 3196 | "winxp" |
3197 | ], | |
3198 | "no_match": [ | |
3199 | "ie_compat_mode" | |
3094 | 3200 | ] |
3095 | 3201 | }, |
3096 | 3202 | "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; HTC; T7575)" : { |
3107 | 3213 | "ie55up", |
3108 | 3214 | "ie5up", |
3109 | 3215 | "ie7" |
3216 | ], | |
3217 | "no_match": [ | |
3218 | "ie_compat_mode" | |
3110 | 3219 | ], |
3111 | 3220 | "os" : "WinPhone", |
3112 | 3221 | "os_string" : "Windows Phone", |
3128 | 3237 | "ie5up", |
3129 | 3238 | "ie9" |
3130 | 3239 | ], |
3240 | "no_match": [ | |
3241 | "ie_compat_mode" | |
3242 | ], | |
3131 | 3243 | "os" : "WinPhone", |
3132 | 3244 | "os_string" : "Windows Phone", |
3133 | 3245 | "os_versin" : "7.5", |
3149 | 3261 | "ie5up", |
3150 | 3262 | "ie9" |
3151 | 3263 | ], |
3264 | "no_match": [ | |
3265 | "ie_compat_mode" | |
3266 | ], | |
3152 | 3267 | "os" : "WinPhone", |
3153 | 3268 | "os_string" : "Windows Phone", |
3154 | 3269 | "os_version" : "7.5", |
3170 | 3285 | "ie5up", |
3171 | 3286 | "ie10" |
3172 | 3287 | ], |
3288 | "no_match": [ | |
3289 | "ie_compat_mode" | |
3290 | ], | |
3173 | 3291 | "os" : "WinPhone", |
3174 | 3292 | "os_string" : "Windows Phone", |
3175 | 3293 | "os_version" : "8.0", |
3176 | 3294 | "device_name" : "HTC 8X" |
3177 | 3295 | }, |
3178 | "Mozilla/4.0 (compatible; MSIE 8.0; AOL 9.6; AOLBuild 4340.168; Windows NT 5.1; Trident/5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; IE0006_ver1;EN_US)" : { | |
3296 | "Mozilla/4.0 (compatible; MSIE 8.0; AOL 9.6; AOLBuild 4340.168; Windows NT 5.1; Trident/4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; IE0006_ver1;EN_US)" : { | |
3179 | 3297 | "browser_string" : "AOL Browser", |
3180 | 3298 | "major" : "8", |
3181 | 3299 | "minor" : "0", |
3195 | 3313 | "winxp", |
3196 | 3314 | "dotnet" |
3197 | 3315 | ], |
3316 | "no_match": [ | |
3317 | "ie_compat_mode" | |
3318 | ], | |
3198 | 3319 | "os" : "WinXP" |
3199 | 3320 | }, |
3200 | 3321 | "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Crossrider130)" : { |
3214 | 3335 | "dotnet" |
3215 | 3336 | ], |
3216 | 3337 | "minor" : "0", |
3217 | "no_match" : [ | |
3218 | "robot" | |
3338 | "no_match": [ | |
3339 | "ie_compat_mode", | |
3340 | "robot" | |
3219 | 3341 | ], |
3220 | 3342 | "public_major" : "8", |
3221 | 3343 | "public_minor" : "0", |
3394 | 3516 | "public_minor" : ".0", |
3395 | 3517 | "public_version" : "4", |
3396 | 3518 | "version" : "5.34" |
3397 | }, | |
3398 | "Mozilla/5.0 (compatible; MSIE 6; Windows NT 5.1; Trident/5.0)" : { | |
3399 | "browser_string" : "MSIE", | |
3400 | "major" : "6", | |
3401 | "match" : [ | |
3402 | "ie", | |
3403 | "ie4up", | |
3404 | "ie55up", | |
3405 | "ie5up", | |
3406 | "ie6", | |
3407 | "trident", | |
3408 | "win32", | |
3409 | "windows", | |
3410 | "winnt", | |
3411 | "winxp" | |
3412 | ], | |
3413 | "minor" : "0", | |
3414 | "public_major" : "6", | |
3415 | "public_minor" : "0", | |
3416 | "version" : "6" | |
3417 | 3519 | }, |
3418 | 3520 | "SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html)" : { |
3419 | 3521 | "major" : "2", |