Codebase list libhttp-browserdetect-perl / 1c60eb4
Imported Upstream version 1.66 gregor herrmann 10 years ago
10 changed file(s) with 208 addition(s) and 56 deletion(s). Raw diff Collapse all Expand all
1919 "Olaf Alders <olaf\@wundercounter.com> (current maintainer)"
2020 ],
2121 "dist_name" => "HTTP-BrowserDetect",
22 "dist_version" => "1.65",
22 "dist_version" => "1.66",
2323 "license" => "perl",
2424 "module_name" => "HTTP::BrowserDetect",
2525 "recommends" => {},
00 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)
14
25 1.65 2013-12-10 21:08:07 America/Toronto
36 - Adds os_version for FireFox in OS X (Hao Wu)
279282 Chrome
280283 - Have moved repository to GitHub
281284
282 0.99 Thu Feb 22 16:47:00 2007
285 0.99 2007-02-22
283286 - Modifications by Peter Walsham
284287 - Added support for Windows Server 2003 and Windows Vista
285288
286 0.98 Tue Jun 21 00:39:00 2004
289 0.98 2004-06-21
287290 - Added more browsers including Mozilla, Firefox, Safari
288291 - added Mac OS X, WinXP, Win2k detection
289292 - added more test cases
290293
291 0.962 Tues Jan 31 12:45:00 2001
294 0.962 2001-01-31
292295 - changed how minor() method to return minor version as a floating point
293296 - added additional browsers
294297 - added additional 'up' methods
297300 - added Windows ME detection
298301 - updated url to javascript browser sniffer page
299302
300 0.95 Sat Aug 4 09:08:00 2000
303 0.95 2000-08-04
301304 - added additional browsers
302305
303 0.94 Sun Mar 19 18:51:00 2000
306 0.94 2000-03-19
304307 - changed copyright notice
305308 - changed object's internal structure
306309 - added Windows 2000 detection
307310 - eliminated AUTOLOAD subroutine
308311
309 0.92 Mon Feb 7 12:34:56 2000
312 0.92 2000-02-07
310313 - fixed version numbering problem, would return '.' instead of undef if
311314 useragent's version couldn't be found
312315 - added more detection for AOL
313316
314 0.9 Wed Feb 17 23:45:52 1999
317 0.9 1999-02-17
315318 - original version; created by h2xs 1.18
77 Makefile.PL
88 README
99 TODO
10 cpanfile
1011 dist.ini
1112 lib/HTTP/BrowserDetect.pm
1213 t/01-detect.t
55 "Olaf Alders <olaf@wundercounter.com> (current maintainer)"
66 ],
77 "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",
99 "license" : [
1010 "perl_5"
1111 ],
6262 "web" : "https://github.com/oalders/http-browserdetect"
6363 }
6464 },
65 "version" : "1.65",
65 "version" : "1.66",
6666 "x_contributors" : [
6767 "Aran Deltac <bluefeet@gmail.com>",
6868 "David Ihnen <davidihnen@gmail.com>",
3535 "Test::Most" => 0,
3636 "Test::NoWarnings" => 0
3737 },
38 "VERSION" => "1.65",
38 "VERSION" => "1.66",
3939 "test" => {
4040 "TESTS" => "t/*.t"
4141 }
22 an HTTP user agent string
33
44 VERSION
5 version 1.65
5 version 1.66
66
77 SYNOPSIS
88 use HTTP::BrowserDetect;
230230 gecko
231231 icab
232232 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
233239 java
234240 konqueror
235241 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 };
44 license = Perl_5
55 copyright_holder = Lee Semel
66 copyright_year = 2013
7 version = 1.65
7 version = 1.66
88 main_module = lib/HTTP/BrowserDetect.pm
99
1010 [GatherDir]
4747 [ContributorsFile]
4848
4949 [@Git]
50
51 [CPANFile]
22
33 package HTTP::BrowserDetect;
44 {
5 $HTTP::BrowserDetect::VERSION = '1.65';
5 $HTTP::BrowserDetect::VERSION = '1.66';
66 }
77
88 use vars qw(@ALL_TESTS);
8989 ie55up ie6 ie7
9090 ie8 ie9 ie10
9191 ie11
92 ie_compat_mode
9293 );
9394
9495 our @OPERA_TESTS = qw(
281282 # Trident Engine (detect early for sniffing out IE)
282283 $tests->{TRIDENT} = ( index( $ua, "trident/" ) != -1 );
283284
285 if ( $tests->{TRIDENT} && $ua =~ /trident\/([\w\.\d]*)/ ) {
286 $self->{engine_version} = $1;
287 }
288
284289 # Browser version
285290 my ( $major, $minor, $beta ) = (
286291 $ua =~ m{
497502 $tests->{IE9} = ( $tests->{IE} && $major == 9 );
498503 $tests->{IE10} = ( $tests->{IE} && $major == 10 );
499504 $tests->{IE11} = ( $tests->{IE} && $major == 11 );
505
506 $tests->{IE_COMPAT_MODE}
507 = ( $tests->{IE7}
508 && $tests->{TRIDENT}
509 && $self->{engine_version} + 0 >= 4 );
500510
501511 # Neoplanet browsers
502512
673683 if ( $tests->{GECKO} ) {
674684 if ( $ua =~ /\([^)]*rv:([\w.\d]*)/ ) {
675685 $self->{gecko_version} = $1;
686 $self->{engine_version} = $1;
676687 }
677 }
678
679 # Engines
680
681 $self->{engine_version} = $self->{gecko_version};
682
683 if ( $ua =~ /trident\/([\w\.\d]*)/ ) {
684 $self->{engine_version} = $1;
685688 }
686689
687690 # RealPlayer
14791482
14801483 =pod
14811484
1485 =encoding UTF-8
1486
14821487 =head1 NAME
14831488
14841489 HTTP::BrowserDetect - Determine Web browser, version, and platform from an HTTP user agent string
14851490
14861491 =head1 VERSION
14871492
1488 version 1.65
1493 version 1.66
14891494
14901495 =head1 SYNOPSIS
14911496
17511756
17521757 =head3 ie ie3 ie4 ie4up ie5 ie55 ie6 ie7 ie8 ie9 ie10 ie11
17531758
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
17541766 =head3 java
17551767
17561768 =head3 konqueror
454454 "other" : null,
455455 "version" : "3.03"
456456 },
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 },
457529 "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)" : {
458530 "major" : "8",
459531 "match" : [
471543 ],
472544 "minor" : "0",
473545 "no_match" : [
546 "ie_compat_mode",
474547 "robot"
475548 ],
476549 "public_major" : "8",
499572 ],
500573 "minor" : "0",
501574 "no_match" : [
575 "ie_compat_mode",
502576 "robot"
503577 ],
504578 "public_major" : "8",
854928 "dotnet",
855929 "trident",
856930 "ie",
931 "ie_compat_mode",
857932 "ie7",
858933 "ie4up",
859934 "ie5up",
9761051 "ie55up",
9771052 "ie5up",
9781053 "ie8"
1054 ],
1055 "no_match": [
1056 "ie_compat_mode"
9791057 ],
9801058 "os" : "WinXP",
9811059 "public_major" : "8",
10021080 "ie5up",
10031081 "ie4up"
10041082 ],
1083 "no_match": [
1084 "ie_compat_mode"
1085 ],
10051086 "minor" : "0",
10061087 "no_match" : null,
10071088 "os" : "Win7",
10271108 "ie5up",
10281109 "ie4up"
10291110 ],
1111 "no_match": [
1112 "ie_compat_mode"
1113 ],
10301114 "minor" : "0",
10311115 "no_match" : null,
10321116 "os" : "Win7",
10521136 "ie5up",
10531137 "ie4up"
10541138 ],
1139 "no_match": [
1140 "ie_compat_mode"
1141 ],
10551142 "minor" : "0",
10561143 "no_match" : null,
10571144 "os" : "Win7",
10771164 "ie5up",
10781165 "ie4up"
10791166 ],
1167 "no_match": [
1168 "ie_compat_mode"
1169 ],
10801170 "minor" : "0",
10811171 "no_match" : null,
10821172 "os" : "Win7",
11051195 "windows",
11061196 "winnt"
11071197 ],
1198 "no_match": [
1199 "ie_compat_mode"
1200 ],
11081201 "minor" : "0",
11091202 "no_match" : null,
11101203 "os_string" : "Win8",
11311224 "ie5up",
11321225 "ie4up"
11331226 ],
1227 "no_match": [
1228 "ie_compat_mode"
1229 ],
11341230 "minor" : "0",
11351231 "no_match" : null,
11361232 "os_string" : "Win8",
11561252 "ie5up",
11571253 "ie4up"
11581254 ],
1255 "no_match": [
1256 "ie_compat_mode"
1257 ],
11591258 "minor" : "0",
11601259 "no_match" : null,
11611260 "os_string" : "Win7",
11811280 "ie55up",
11821281 "ie5up",
11831282 "ie4up"
1283 ],
1284 "no_match": [
1285 "ie_compat_mode"
11841286 ],
11851287 "minor" : "0",
11861288 "no_match" : null,
27482850 "language" : null,
27492851 "major" : null,
27502852 "match" : [
2853 "dotnet",
2854 "ie",
2855 "ie_compat_mode",
2856 "ie55up",
2857 "ie5up",
2858 "ie4up",
2859 "ie7",
2860 "trident",
2861 "realplayer",
2862 "win32",
27512863 "win7",
27522864 "windows",
2753 "winnt",
2754 "win32",
2755 "dotnet",
2756 "realplayer",
2757 "trident",
2758 "ie",
2759 "ie7",
2760 "ie55up",
2761 "ie5up",
2762 "ie4up"
2865 "winnt"
27632866 ],
27642867 "minor" : "0",
27652868 "no_match" : [
30913194 "windows",
30923195 "winnt",
30933196 "winxp"
3197 ],
3198 "no_match": [
3199 "ie_compat_mode"
30943200 ]
30953201 },
30963202 "Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; HTC; T7575)" : {
31073213 "ie55up",
31083214 "ie5up",
31093215 "ie7"
3216 ],
3217 "no_match": [
3218 "ie_compat_mode"
31103219 ],
31113220 "os" : "WinPhone",
31123221 "os_string" : "Windows Phone",
31283237 "ie5up",
31293238 "ie9"
31303239 ],
3240 "no_match": [
3241 "ie_compat_mode"
3242 ],
31313243 "os" : "WinPhone",
31323244 "os_string" : "Windows Phone",
31333245 "os_versin" : "7.5",
31493261 "ie5up",
31503262 "ie9"
31513263 ],
3264 "no_match": [
3265 "ie_compat_mode"
3266 ],
31523267 "os" : "WinPhone",
31533268 "os_string" : "Windows Phone",
31543269 "os_version" : "7.5",
31703285 "ie5up",
31713286 "ie10"
31723287 ],
3288 "no_match": [
3289 "ie_compat_mode"
3290 ],
31733291 "os" : "WinPhone",
31743292 "os_string" : "Windows Phone",
31753293 "os_version" : "8.0",
31763294 "device_name" : "HTC 8X"
31773295 },
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)" : {
31793297 "browser_string" : "AOL Browser",
31803298 "major" : "8",
31813299 "minor" : "0",
31953313 "winxp",
31963314 "dotnet"
31973315 ],
3316 "no_match": [
3317 "ie_compat_mode"
3318 ],
31983319 "os" : "WinXP"
31993320 },
32003321 "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)" : {
32143335 "dotnet"
32153336 ],
32163337 "minor" : "0",
3217 "no_match" : [
3218 "robot"
3338 "no_match": [
3339 "ie_compat_mode",
3340 "robot"
32193341 ],
32203342 "public_major" : "8",
32213343 "public_minor" : "0",
33943516 "public_minor" : ".0",
33953517 "public_version" : "4",
33963518 "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"
34173519 },
34183520 "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)" : {
34193521 "major" : "2",