New upstream version 3.20
gregor herrmann
5 years ago
14 | 14 | * David Ihnen |
15 | 15 | * Douglas Christopher Wilson |
16 | 16 | * Graham Barr |
17 | * gregor herrmann | |
17 | 18 | * Hao Wu |
18 | 19 | * joatis |
19 | 20 | * Jon Jensen |
0 | 0 | Revision history for Perl extension HTTP::BrowserDetect. |
1 | ||
2 | 3.20 2018-12-04 18:37:08Z | |
3 | - Fix minor version warning (GH#152) (Olaf Alders) | |
4 | - Fix a typo in the POD. (GH#149) (gregor herrmann) | |
1 | 5 | |
2 | 6 | 3.19 2018-10-11 16:04:00Z |
3 | 7 | - Detect ltx71 bot (GH#147) (Olaf Alders) |
47 | 47 | "configure_requires" key of META.yml or the |
48 | 48 | "{prereqs}{configure}{requires}" key of META.json. |
49 | 49 | |
50 | ## Other Prerequisites | |
51 | ||
52 | This distribution may require additional modules to be installed after running | |
53 | Makefile.PL. | |
54 | Look for prerequisites in the following phases: | |
55 | ||
56 | * to run make, PHASE = build | |
57 | * to use the module code itself, PHASE = runtime | |
58 | * to run tests, PHASE = test | |
59 | ||
60 | They can all be found in the "PHASE_requires" key of MYMETA.yml or the | |
61 | "{prereqs}{PHASE}{requires}" key of MYMETA.json. | |
62 | ||
50 | 63 | ## Documentation |
51 | 64 | |
52 | 65 | HTTP-BrowserDetect documentation is available as POD. |
28 | 28 | t/perlcriticrc |
29 | 29 | t/useragents.json |
30 | 30 | tidyall.ini |
31 | xt/author/pod-syntax.t | |
31 | 32 | xt/author/synopsis.t |
32 | 33 | xt/author/tidyall.t |
33 | 34 | xt/release/cpan-changes.t |
35 | 35 | "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007" |
36 | 36 | }, |
37 | 37 | "requires" : { |
38 | "Code::TidyAll" : "0.71", | |
39 | "Code::TidyAll::Plugin::SortLines::Naturally" : "0.000003", | |
40 | "Code::TidyAll::Plugin::Test::Vars" : "0.04", | |
41 | "Parallel::ForkManager" : "1.19", | |
42 | "Perl::Critic" : "1.132", | |
43 | "Perl::Tidy" : "20180220", | |
38 | 44 | "Test::CPAN::Changes" : "0.19", |
39 | 45 | "Test::Code::TidyAll" : "0.50", |
40 | 46 | "Test::More" : "0.96", |
41 | "Test::Synopsis" : "0" | |
47 | "Test::Pod" : "1.41", | |
48 | "Test::Synopsis" : "0", | |
49 | "Test::Vars" : "0.014" | |
42 | 50 | } |
43 | 51 | }, |
44 | 52 | "runtime" : { |
80 | 88 | "web" : "https://github.com/oalders/http-browserdetect" |
81 | 89 | } |
82 | 90 | }, |
83 | "version" : "3.19", | |
91 | "version" : "3.20", | |
84 | 92 | "x_Dist_Zilla" : { |
85 | 93 | "perl" : { |
86 | 94 | "version" : "5.026001" |
121 | 129 | { |
122 | 130 | "class" : "Dist::Zilla::Plugin::MAXMIND::TidyAll", |
123 | 131 | "name" : "@Author::OALDERS/MAXMIND::TidyAll", |
124 | "version" : "0.13" | |
132 | "version" : "0.83" | |
125 | 133 | }, |
126 | 134 | { |
127 | 135 | "class" : "Dist::Zilla::Plugin::AutoPrereqs", |
191 | 199 | { |
192 | 200 | "class" : "Dist::Zilla::Plugin::InstallGuide", |
193 | 201 | "name" : "@Author::OALDERS/InstallGuide", |
194 | "version" : "1.200011" | |
202 | "version" : "1.200012" | |
195 | 203 | }, |
196 | 204 | { |
197 | 205 | "class" : "Dist::Zilla::Plugin::Prereqs", |
198 | 206 | "config" : { |
199 | 207 | "Dist::Zilla::Plugin::Prereqs" : { |
200 | "phase" : "runtime", | |
208 | "phase" : "develop", | |
201 | 209 | "type" : "requires" |
202 | 210 | } |
203 | 211 | }, |
204 | "name" : "@Author::OALDERS/Prereqs", | |
212 | "name" : "@Author::OALDERS/Modules for use with tidyall", | |
205 | 213 | "version" : "6.012" |
206 | 214 | }, |
207 | 215 | { |
208 | 216 | "class" : "Dist::Zilla::Plugin::ExecDir", |
209 | 217 | "name" : "@Author::OALDERS/ExecDir", |
218 | "version" : "6.012" | |
219 | }, | |
220 | { | |
221 | "class" : "Dist::Zilla::Plugin::PodSyntaxTests", | |
222 | "name" : "@Author::OALDERS/PodSyntaxTests", | |
210 | 223 | "version" : "6.012" |
211 | 224 | }, |
212 | 225 | { |
419 | 432 | "changelog" : "Changes" |
420 | 433 | }, |
421 | 434 | "Dist::Zilla::Role::Git::Repo" : { |
422 | "git_version" : "2.19.1", | |
435 | "git_version" : "2.19.2", | |
423 | 436 | "repo_root" : "." |
424 | 437 | } |
425 | 438 | }, |
430 | 443 | "class" : "Dist::Zilla::Plugin::Git::Contributors", |
431 | 444 | "config" : { |
432 | 445 | "Dist::Zilla::Plugin::Git::Contributors" : { |
433 | "git_version" : "2.19.1", | |
446 | "git_version" : "2.19.2", | |
434 | 447 | "include_authors" : 0, |
435 | 448 | "include_releaser" : 1, |
436 | 449 | "order_by" : "name", |
538 | 551 | "changelog" : "Changes" |
539 | 552 | }, |
540 | 553 | "Dist::Zilla::Role::Git::Repo" : { |
541 | "git_version" : "2.19.1", | |
554 | "git_version" : "2.19.2", | |
542 | 555 | "repo_root" : "." |
543 | 556 | }, |
544 | 557 | "Dist::Zilla::Role::Git::StringFormatter" : { |
555 | 568 | "branch" : null, |
556 | 569 | "changelog" : "Changes", |
557 | 570 | "signed" : 0, |
558 | "tag" : "v3.19", | |
571 | "tag" : "v3.20", | |
559 | 572 | "tag_format" : "v%v", |
560 | 573 | "tag_message" : "v%v" |
561 | 574 | }, |
562 | 575 | "Dist::Zilla::Role::Git::Repo" : { |
563 | "git_version" : "2.19.1", | |
576 | "git_version" : "2.19.2", | |
564 | 577 | "repo_root" : "." |
565 | 578 | }, |
566 | 579 | "Dist::Zilla::Role::Git::StringFormatter" : { |
610 | 623 | "changelog" : "Changes" |
611 | 624 | }, |
612 | 625 | "Dist::Zilla::Role::Git::Repo" : { |
613 | "git_version" : "2.19.1", | |
626 | "git_version" : "2.19.2", | |
614 | 627 | "repo_root" : "." |
615 | 628 | }, |
616 | 629 | "Dist::Zilla::Role::Git::StringFormatter" : { |
630 | 643 | "remotes_must_exist" : 1 |
631 | 644 | }, |
632 | 645 | "Dist::Zilla::Role::Git::Repo" : { |
633 | "git_version" : "2.19.1", | |
646 | "git_version" : "2.19.2", | |
634 | 647 | "repo_root" : "." |
635 | 648 | } |
636 | 649 | }, |
706 | 719 | "David Ihnen <davidihnen@gmail.com>", |
707 | 720 | "Douglas Christopher Wilson <doug@somethingdoug.com>", |
708 | 721 | "Graham Barr <gbarr@pobox.com>", |
722 | "gregor herrmann <gregor+github@comodo.priv.at>", | |
709 | 723 | "Hao Wu <hwu@intellisurvey.com>", |
710 | 724 | "joatis <joatis3@gmail.com>", |
711 | 725 | "Jon Jensen <jon@endpoint.com>", |
730 | 744 | "yeahoffline <frank.gasser@gmail.com>" |
731 | 745 | ], |
732 | 746 | "x_generated_by_perl" : "v5.26.1", |
733 | "x_serialization_backend" : "Cpanel::JSON::XS version 4.02" | |
747 | "x_serialization_backend" : "Cpanel::JSON::XS version 4.04" | |
734 | 748 | } |
735 | 749 |
38 | 38 | bugtracker: https://github.com/oalders/http-browserdetect/issues |
39 | 39 | homepage: https://github.com/oalders/http-browserdetect |
40 | 40 | repository: https://github.com/oalders/http-browserdetect.git |
41 | version: '3.19' | |
41 | version: '3.20' | |
42 | 42 | x_Dist_Zilla: |
43 | 43 | perl: |
44 | 44 | version: '5.026001' |
71 | 71 | - |
72 | 72 | class: Dist::Zilla::Plugin::MAXMIND::TidyAll |
73 | 73 | name: '@Author::OALDERS/MAXMIND::TidyAll' |
74 | version: '0.13' | |
74 | version: '0.83' | |
75 | 75 | - |
76 | 76 | class: Dist::Zilla::Plugin::AutoPrereqs |
77 | 77 | name: '@Author::OALDERS/AutoPrereqs' |
126 | 126 | - |
127 | 127 | class: Dist::Zilla::Plugin::InstallGuide |
128 | 128 | name: '@Author::OALDERS/InstallGuide' |
129 | version: '1.200011' | |
129 | version: '1.200012' | |
130 | 130 | - |
131 | 131 | class: Dist::Zilla::Plugin::Prereqs |
132 | 132 | config: |
133 | 133 | Dist::Zilla::Plugin::Prereqs: |
134 | phase: runtime | |
134 | phase: develop | |
135 | 135 | type: requires |
136 | name: '@Author::OALDERS/Prereqs' | |
136 | name: '@Author::OALDERS/Modules for use with tidyall' | |
137 | 137 | version: '6.012' |
138 | 138 | - |
139 | 139 | class: Dist::Zilla::Plugin::ExecDir |
140 | 140 | name: '@Author::OALDERS/ExecDir' |
141 | version: '6.012' | |
142 | - | |
143 | class: Dist::Zilla::Plugin::PodSyntaxTests | |
144 | name: '@Author::OALDERS/PodSyntaxTests' | |
141 | 145 | version: '6.012' |
142 | 146 | - |
143 | 147 | class: Dist::Zilla::Plugin::Test::CPAN::Changes |
303 | 307 | allow_dirty_match: [] |
304 | 308 | changelog: Changes |
305 | 309 | Dist::Zilla::Role::Git::Repo: |
306 | git_version: 2.19.1 | |
310 | git_version: 2.19.2 | |
307 | 311 | repo_root: . |
308 | 312 | name: '@Author::OALDERS/Git::Check' |
309 | 313 | version: '2.045' |
311 | 315 | class: Dist::Zilla::Plugin::Git::Contributors |
312 | 316 | config: |
313 | 317 | Dist::Zilla::Plugin::Git::Contributors: |
314 | git_version: 2.19.1 | |
318 | git_version: 2.19.2 | |
315 | 319 | include_authors: 0 |
316 | 320 | include_releaser: 1 |
317 | 321 | order_by: name |
394 | 398 | allow_dirty_match: [] |
395 | 399 | changelog: Changes |
396 | 400 | Dist::Zilla::Role::Git::Repo: |
397 | git_version: 2.19.1 | |
401 | git_version: 2.19.2 | |
398 | 402 | repo_root: . |
399 | 403 | Dist::Zilla::Role::Git::StringFormatter: |
400 | 404 | time_zone: local |
407 | 411 | branch: ~ |
408 | 412 | changelog: Changes |
409 | 413 | signed: 0 |
410 | tag: v3.19 | |
414 | tag: v3.20 | |
411 | 415 | tag_format: v%v |
412 | 416 | tag_message: v%v |
413 | 417 | Dist::Zilla::Role::Git::Repo: |
414 | git_version: 2.19.1 | |
418 | git_version: 2.19.2 | |
415 | 419 | repo_root: . |
416 | 420 | Dist::Zilla::Role::Git::StringFormatter: |
417 | 421 | time_zone: local |
448 | 452 | - (?^:^lib/.*\.pm$) |
449 | 453 | changelog: Changes |
450 | 454 | Dist::Zilla::Role::Git::Repo: |
451 | git_version: 2.19.1 | |
455 | git_version: 2.19.2 | |
452 | 456 | repo_root: . |
453 | 457 | Dist::Zilla::Role::Git::StringFormatter: |
454 | 458 | time_zone: local |
462 | 466 | - origin |
463 | 467 | remotes_must_exist: 1 |
464 | 468 | Dist::Zilla::Role::Git::Repo: |
465 | git_version: 2.19.1 | |
469 | git_version: 2.19.2 | |
466 | 470 | repo_root: . |
467 | 471 | name: '@Author::OALDERS/Git::Push' |
468 | 472 | version: '2.045' |
521 | 525 | - 'David Ihnen <davidihnen@gmail.com>' |
522 | 526 | - 'Douglas Christopher Wilson <doug@somethingdoug.com>' |
523 | 527 | - 'Graham Barr <gbarr@pobox.com>' |
528 | - 'gregor herrmann <gregor+github@comodo.priv.at>' | |
524 | 529 | - 'Hao Wu <hwu@intellisurvey.com>' |
525 | 530 | - 'joatis <joatis3@gmail.com>' |
526 | 531 | - 'Jon Jensen <jon@endpoint.com>' |
544 | 549 | - 'vti <viacheslav.t@gmail.com>' |
545 | 550 | - 'yeahoffline <frank.gasser@gmail.com>' |
546 | 551 | x_generated_by_perl: v5.26.1 |
547 | x_serialization_backend: 'YAML::Tiny version 1.73' | |
552 | x_serialization_backend: 'YAML::Tiny version 1.70' |
33 | 33 | "Test::Most" => 0, |
34 | 34 | "Test::NoWarnings" => 0 |
35 | 35 | }, |
36 | "VERSION" => "3.19", | |
36 | "VERSION" => "3.20", | |
37 | 37 | "test" => { |
38 | 38 | "TESTS" => "t/*.t" |
39 | 39 | } |
3 | 3 | |
4 | 4 | # VERSION |
5 | 5 | |
6 | version 3.19 | |
6 | version 3.20 | |
7 | 7 | |
8 | 8 | # SYNOPSIS |
9 | 9 | |
347 | 347 | |
348 | 348 | ### pspgameos() |
349 | 349 | |
350 | It may not be possibile to detect Win98 in Netscape 4.x and earlier. On Opera | |
350 | It may not be possible to detect Win98 in Netscape 4.x and earlier. On Opera | |
351 | 351 | 3.0, the userAgent string includes "Windows 95/NT4" on all Win32, so you can't |
352 | 352 | distinguish between Win95 and WinNT. |
353 | 353 |
29 | 29 | }; |
30 | 30 | |
31 | 31 | on 'develop' => sub { |
32 | requires "Code::TidyAll" => "0.71"; | |
33 | requires "Code::TidyAll::Plugin::SortLines::Naturally" => "0.000003"; | |
34 | requires "Code::TidyAll::Plugin::Test::Vars" => "0.04"; | |
35 | requires "Parallel::ForkManager" => "1.19"; | |
36 | requires "Perl::Critic" => "1.132"; | |
37 | requires "Perl::Tidy" => "20180220"; | |
32 | 38 | requires "Test::CPAN::Changes" => "0.19"; |
33 | 39 | requires "Test::Code::TidyAll" => "0.50"; |
34 | 40 | requires "Test::More" => "0.96"; |
41 | requires "Test::Pod" => "1.41"; | |
35 | 42 | requires "Test::Synopsis" => "0"; |
43 | requires "Test::Vars" => "0.014"; | |
36 | 44 | }; |
37 | 45 | |
38 | 46 | on 'develop' => sub { |
4 | 4 | use HTTP::BrowserDetect (); |
5 | 5 | |
6 | 6 | my $ua = shift || die qq{Usage: perl $0 "my UA string"}; |
7 | my $h = HTTP::BrowserDetect->new($ua); | |
7 | my $h = HTTP::BrowserDetect->new($ua); | |
8 | 8 | |
9 | 9 | printf "robot: %s\n", $h->robot || q{ }; |
10 | 10 | printf "robot name: %s\n", $h->robot_name || q{ }; |
4 | 4 | |
5 | 5 | package HTTP::BrowserDetect; |
6 | 6 | |
7 | our $VERSION = '3.19'; | |
7 | our $VERSION = '3.20'; | |
8 | 8 | |
9 | 9 | use vars qw(@ALL_TESTS); |
10 | 10 | |
927 | 927 | $browser_tests->{$browser} = 1; |
928 | 928 | } |
929 | 929 | |
930 | $self->{browser} = $browser; | |
930 | $self->{browser} = $browser; | |
931 | 931 | $self->{browser_string} = $browser_string || $BROWSER_NAMES{$browser} |
932 | 932 | if defined($browser); |
933 | 933 | |
1375 | 1375 | my $ua = lc $self->{user_agent}; |
1376 | 1376 | |
1377 | 1377 | my $os_tests = $self->{os_tests} = {}; |
1378 | my $os = undef; | |
1378 | my $os = undef; | |
1379 | 1379 | my $os_string = undef; |
1380 | 1380 | |
1381 | 1381 | # Windows |
1513 | 1513 | |
1514 | 1514 | # windows, set through some path above |
1515 | 1515 | $os_tests->{windows} = 1; |
1516 | $os_tests->{win32} = 1 if index( $ua, 'win32' ) != -1; | |
1516 | $os_tests->{win32} = 1 if index( $ua, 'win32' ) != -1; | |
1517 | 1517 | } |
1518 | 1518 | elsif ( index( $ua, 'macintosh' ) != -1 || index( $ua, 'mac_' ) != -1 ) { |
1519 | 1519 | |
2568 | 2568 | my ($self) = @_; |
2569 | 2569 | my ( $major, $minor ) = $self->_public; |
2570 | 2570 | |
2571 | $minor ||= q{}; | |
2571 | 2572 | return "$major$minor"; |
2572 | 2573 | } |
2573 | 2574 | |
2595 | 2596 | sub browser_version { |
2596 | 2597 | my ($self) = @_; |
2597 | 2598 | my ( $major, $minor ) = $self->_public; |
2599 | $minor ||= q{}; | |
2598 | 2600 | |
2599 | 2601 | return "$major$minor"; |
2600 | 2602 | } |
2957 | 2959 | |
2958 | 2960 | =head1 VERSION |
2959 | 2961 | |
2960 | version 3.19 | |
2962 | version 3.20 | |
2961 | 2963 | |
2962 | 2964 | =head1 SYNOPSIS |
2963 | 2965 | |
3301 | 3303 | |
3302 | 3304 | =head3 pspgameos() |
3303 | 3305 | |
3304 | It may not be possibile to detect Win98 in Netscape 4.x and earlier. On Opera | |
3306 | It may not be possible to detect Win98 in Netscape 4.x and earlier. On Opera | |
3305 | 3307 | 3.0, the userAgent string includes "Windows 95/NT4" on all Win32, so you can't |
3306 | 3308 | distinguish between Win95 and WinNT. |
3307 | 3309 |
11 | 11 | 'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007' |
12 | 12 | }, |
13 | 13 | 'requires' => { |
14 | 'Code::TidyAll' => '0.71', | |
15 | 'Code::TidyAll::Plugin::SortLines::Naturally' => '0.000003', | |
16 | 'Code::TidyAll::Plugin::Test::Vars' => '0.04', | |
17 | 'Parallel::ForkManager' => '1.19', | |
18 | 'Perl::Critic' => '1.132', | |
19 | 'Perl::Tidy' => '20180220', | |
14 | 20 | 'Test::CPAN::Changes' => '0.19', |
15 | 21 | 'Test::Code::TidyAll' => '0.50', |
16 | 22 | 'Test::More' => '0.96', |
17 | 'Test::Synopsis' => '0' | |
23 | 'Test::Pod' => '1.41', | |
24 | 'Test::Synopsis' => '0', | |
25 | 'Test::Vars' => '0.014' | |
18 | 26 | } |
19 | 27 | }, |
20 | 28 | 'runtime' => { |
42 | 42 | my %ids = map { $_ => 1 } HTTP::BrowserDetect->all_robot_ids; |
43 | 43 | |
44 | 44 | my @methods = ( |
45 | 'browser', 'browser_beta', 'browser_string', 'device', | |
46 | 'device_beta', 'device_name', 'device_string', 'engine', | |
47 | 'engine_beta', 'engine_string', 'language', 'os', 'os_beta', | |
48 | 'os_string', 'robot', 'robot_beta', 'robot_name', 'robot_string', | |
49 | 'webview', | |
45 | 'browser', 'browser_beta', 'browser_string', 'browser_version', | |
46 | 'browser_major', 'browser_minor', 'device', 'device_beta', 'device_name', | |
47 | 'device_string', 'engine', 'engine_beta', 'engine_string', 'language', | |
48 | 'os', 'os_beta', 'os_string', 'robot', 'robot_beta', 'robot_name', | |
49 | 'robot_string', 'webview', | |
50 | 50 | ); |
51 | 51 | |
52 | 52 | foreach my $ua ( sort ( keys %{$all_tests} ) ) { |
18397 | 18397 | "os_version" : "4.2", |
18398 | 18398 | "robot" : null |
18399 | 18399 | }, |
18400 | "Mozilla/5.0 (iPhone; CPU iPhone OS 12_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/10 Mobile/16A366 Safari/605.1.15 GAYL/2.0.8b1" : { | |
18401 | "browser_major" : 10, | |
18402 | "browser_minor" : null, | |
18403 | "browser_version" : 10, | |
18404 | "match" : [ | |
18405 | "device", | |
18406 | "ios", | |
18407 | "iphone", | |
18408 | "mobile", | |
18409 | "safari", | |
18410 | "webkit" | |
18411 | ] | |
18412 | }, | |
18400 | 18413 | "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B208 Safari/7534.48.3" : { |
18401 | 18414 | "browser" : "safari", |
18402 | 18415 | "browser_major" : "5", |