Codebase list libhttp-browserdetect-perl / upstream/3.20
New upstream version 3.20 gregor herrmann 5 years ago
15 changed file(s) with 119 addition(s) and 43 deletion(s). Raw diff Collapse all Expand all
1414 * David Ihnen
1515 * Douglas Christopher Wilson
1616 * Graham Barr
17 * gregor herrmann
1718 * Hao Wu
1819 * joatis
1920 * Jon Jensen
00 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)
15
26 3.19 2018-10-11 16:04:00Z
37 - Detect ltx71 bot (GH#147) (Olaf Alders)
4747 "configure_requires" key of META.yml or the
4848 "{prereqs}{configure}{requires}" key of META.json.
4949
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
5063 ## Documentation
5164
5265 HTTP-BrowserDetect documentation is available as POD.
2828 t/perlcriticrc
2929 t/useragents.json
3030 tidyall.ini
31 xt/author/pod-syntax.t
3132 xt/author/synopsis.t
3233 xt/author/tidyall.t
3334 xt/release/cpan-changes.t
3535 "Dist::Zilla::PluginBundle::Git::VersionManager" : "0.007"
3636 },
3737 "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",
3844 "Test::CPAN::Changes" : "0.19",
3945 "Test::Code::TidyAll" : "0.50",
4046 "Test::More" : "0.96",
41 "Test::Synopsis" : "0"
47 "Test::Pod" : "1.41",
48 "Test::Synopsis" : "0",
49 "Test::Vars" : "0.014"
4250 }
4351 },
4452 "runtime" : {
8088 "web" : "https://github.com/oalders/http-browserdetect"
8189 }
8290 },
83 "version" : "3.19",
91 "version" : "3.20",
8492 "x_Dist_Zilla" : {
8593 "perl" : {
8694 "version" : "5.026001"
121129 {
122130 "class" : "Dist::Zilla::Plugin::MAXMIND::TidyAll",
123131 "name" : "@Author::OALDERS/MAXMIND::TidyAll",
124 "version" : "0.13"
132 "version" : "0.83"
125133 },
126134 {
127135 "class" : "Dist::Zilla::Plugin::AutoPrereqs",
191199 {
192200 "class" : "Dist::Zilla::Plugin::InstallGuide",
193201 "name" : "@Author::OALDERS/InstallGuide",
194 "version" : "1.200011"
202 "version" : "1.200012"
195203 },
196204 {
197205 "class" : "Dist::Zilla::Plugin::Prereqs",
198206 "config" : {
199207 "Dist::Zilla::Plugin::Prereqs" : {
200 "phase" : "runtime",
208 "phase" : "develop",
201209 "type" : "requires"
202210 }
203211 },
204 "name" : "@Author::OALDERS/Prereqs",
212 "name" : "@Author::OALDERS/Modules for use with tidyall",
205213 "version" : "6.012"
206214 },
207215 {
208216 "class" : "Dist::Zilla::Plugin::ExecDir",
209217 "name" : "@Author::OALDERS/ExecDir",
218 "version" : "6.012"
219 },
220 {
221 "class" : "Dist::Zilla::Plugin::PodSyntaxTests",
222 "name" : "@Author::OALDERS/PodSyntaxTests",
210223 "version" : "6.012"
211224 },
212225 {
419432 "changelog" : "Changes"
420433 },
421434 "Dist::Zilla::Role::Git::Repo" : {
422 "git_version" : "2.19.1",
435 "git_version" : "2.19.2",
423436 "repo_root" : "."
424437 }
425438 },
430443 "class" : "Dist::Zilla::Plugin::Git::Contributors",
431444 "config" : {
432445 "Dist::Zilla::Plugin::Git::Contributors" : {
433 "git_version" : "2.19.1",
446 "git_version" : "2.19.2",
434447 "include_authors" : 0,
435448 "include_releaser" : 1,
436449 "order_by" : "name",
538551 "changelog" : "Changes"
539552 },
540553 "Dist::Zilla::Role::Git::Repo" : {
541 "git_version" : "2.19.1",
554 "git_version" : "2.19.2",
542555 "repo_root" : "."
543556 },
544557 "Dist::Zilla::Role::Git::StringFormatter" : {
555568 "branch" : null,
556569 "changelog" : "Changes",
557570 "signed" : 0,
558 "tag" : "v3.19",
571 "tag" : "v3.20",
559572 "tag_format" : "v%v",
560573 "tag_message" : "v%v"
561574 },
562575 "Dist::Zilla::Role::Git::Repo" : {
563 "git_version" : "2.19.1",
576 "git_version" : "2.19.2",
564577 "repo_root" : "."
565578 },
566579 "Dist::Zilla::Role::Git::StringFormatter" : {
610623 "changelog" : "Changes"
611624 },
612625 "Dist::Zilla::Role::Git::Repo" : {
613 "git_version" : "2.19.1",
626 "git_version" : "2.19.2",
614627 "repo_root" : "."
615628 },
616629 "Dist::Zilla::Role::Git::StringFormatter" : {
630643 "remotes_must_exist" : 1
631644 },
632645 "Dist::Zilla::Role::Git::Repo" : {
633 "git_version" : "2.19.1",
646 "git_version" : "2.19.2",
634647 "repo_root" : "."
635648 }
636649 },
706719 "David Ihnen <davidihnen@gmail.com>",
707720 "Douglas Christopher Wilson <doug@somethingdoug.com>",
708721 "Graham Barr <gbarr@pobox.com>",
722 "gregor herrmann <gregor+github@comodo.priv.at>",
709723 "Hao Wu <hwu@intellisurvey.com>",
710724 "joatis <joatis3@gmail.com>",
711725 "Jon Jensen <jon@endpoint.com>",
730744 "yeahoffline <frank.gasser@gmail.com>"
731745 ],
732746 "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"
734748 }
735749
3838 bugtracker: https://github.com/oalders/http-browserdetect/issues
3939 homepage: https://github.com/oalders/http-browserdetect
4040 repository: https://github.com/oalders/http-browserdetect.git
41 version: '3.19'
41 version: '3.20'
4242 x_Dist_Zilla:
4343 perl:
4444 version: '5.026001'
7171 -
7272 class: Dist::Zilla::Plugin::MAXMIND::TidyAll
7373 name: '@Author::OALDERS/MAXMIND::TidyAll'
74 version: '0.13'
74 version: '0.83'
7575 -
7676 class: Dist::Zilla::Plugin::AutoPrereqs
7777 name: '@Author::OALDERS/AutoPrereqs'
126126 -
127127 class: Dist::Zilla::Plugin::InstallGuide
128128 name: '@Author::OALDERS/InstallGuide'
129 version: '1.200011'
129 version: '1.200012'
130130 -
131131 class: Dist::Zilla::Plugin::Prereqs
132132 config:
133133 Dist::Zilla::Plugin::Prereqs:
134 phase: runtime
134 phase: develop
135135 type: requires
136 name: '@Author::OALDERS/Prereqs'
136 name: '@Author::OALDERS/Modules for use with tidyall'
137137 version: '6.012'
138138 -
139139 class: Dist::Zilla::Plugin::ExecDir
140140 name: '@Author::OALDERS/ExecDir'
141 version: '6.012'
142 -
143 class: Dist::Zilla::Plugin::PodSyntaxTests
144 name: '@Author::OALDERS/PodSyntaxTests'
141145 version: '6.012'
142146 -
143147 class: Dist::Zilla::Plugin::Test::CPAN::Changes
303307 allow_dirty_match: []
304308 changelog: Changes
305309 Dist::Zilla::Role::Git::Repo:
306 git_version: 2.19.1
310 git_version: 2.19.2
307311 repo_root: .
308312 name: '@Author::OALDERS/Git::Check'
309313 version: '2.045'
311315 class: Dist::Zilla::Plugin::Git::Contributors
312316 config:
313317 Dist::Zilla::Plugin::Git::Contributors:
314 git_version: 2.19.1
318 git_version: 2.19.2
315319 include_authors: 0
316320 include_releaser: 1
317321 order_by: name
394398 allow_dirty_match: []
395399 changelog: Changes
396400 Dist::Zilla::Role::Git::Repo:
397 git_version: 2.19.1
401 git_version: 2.19.2
398402 repo_root: .
399403 Dist::Zilla::Role::Git::StringFormatter:
400404 time_zone: local
407411 branch: ~
408412 changelog: Changes
409413 signed: 0
410 tag: v3.19
414 tag: v3.20
411415 tag_format: v%v
412416 tag_message: v%v
413417 Dist::Zilla::Role::Git::Repo:
414 git_version: 2.19.1
418 git_version: 2.19.2
415419 repo_root: .
416420 Dist::Zilla::Role::Git::StringFormatter:
417421 time_zone: local
448452 - (?^:^lib/.*\.pm$)
449453 changelog: Changes
450454 Dist::Zilla::Role::Git::Repo:
451 git_version: 2.19.1
455 git_version: 2.19.2
452456 repo_root: .
453457 Dist::Zilla::Role::Git::StringFormatter:
454458 time_zone: local
462466 - origin
463467 remotes_must_exist: 1
464468 Dist::Zilla::Role::Git::Repo:
465 git_version: 2.19.1
469 git_version: 2.19.2
466470 repo_root: .
467471 name: '@Author::OALDERS/Git::Push'
468472 version: '2.045'
521525 - 'David Ihnen <davidihnen@gmail.com>'
522526 - 'Douglas Christopher Wilson <doug@somethingdoug.com>'
523527 - 'Graham Barr <gbarr@pobox.com>'
528 - 'gregor herrmann <gregor+github@comodo.priv.at>'
524529 - 'Hao Wu <hwu@intellisurvey.com>'
525530 - 'joatis <joatis3@gmail.com>'
526531 - 'Jon Jensen <jon@endpoint.com>'
544549 - 'vti <viacheslav.t@gmail.com>'
545550 - 'yeahoffline <frank.gasser@gmail.com>'
546551 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'
3333 "Test::Most" => 0,
3434 "Test::NoWarnings" => 0
3535 },
36 "VERSION" => "3.19",
36 "VERSION" => "3.20",
3737 "test" => {
3838 "TESTS" => "t/*.t"
3939 }
33
44 # VERSION
55
6 version 3.19
6 version 3.20
77
88 # SYNOPSIS
99
347347
348348 ### pspgameos()
349349
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
351351 3.0, the userAgent string includes "Windows 95/NT4" on all Win32, so you can't
352352 distinguish between Win95 and WinNT.
353353
2929 };
3030
3131 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";
3238 requires "Test::CPAN::Changes" => "0.19";
3339 requires "Test::Code::TidyAll" => "0.50";
3440 requires "Test::More" => "0.96";
41 requires "Test::Pod" => "1.41";
3542 requires "Test::Synopsis" => "0";
43 requires "Test::Vars" => "0.014";
3644 };
3745
3846 on 'develop' => sub {
44 use HTTP::BrowserDetect ();
55
66 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);
88
99 printf "robot: %s\n", $h->robot || q{ };
1010 printf "robot name: %s\n", $h->robot_name || q{ };
44
55 package HTTP::BrowserDetect;
66
7 our $VERSION = '3.19';
7 our $VERSION = '3.20';
88
99 use vars qw(@ALL_TESTS);
1010
927927 $browser_tests->{$browser} = 1;
928928 }
929929
930 $self->{browser} = $browser;
930 $self->{browser} = $browser;
931931 $self->{browser_string} = $browser_string || $BROWSER_NAMES{$browser}
932932 if defined($browser);
933933
13751375 my $ua = lc $self->{user_agent};
13761376
13771377 my $os_tests = $self->{os_tests} = {};
1378 my $os = undef;
1378 my $os = undef;
13791379 my $os_string = undef;
13801380
13811381 # Windows
15131513
15141514 # windows, set through some path above
15151515 $os_tests->{windows} = 1;
1516 $os_tests->{win32} = 1 if index( $ua, 'win32' ) != -1;
1516 $os_tests->{win32} = 1 if index( $ua, 'win32' ) != -1;
15171517 }
15181518 elsif ( index( $ua, 'macintosh' ) != -1 || index( $ua, 'mac_' ) != -1 ) {
15191519
25682568 my ($self) = @_;
25692569 my ( $major, $minor ) = $self->_public;
25702570
2571 $minor ||= q{};
25712572 return "$major$minor";
25722573 }
25732574
25952596 sub browser_version {
25962597 my ($self) = @_;
25972598 my ( $major, $minor ) = $self->_public;
2599 $minor ||= q{};
25982600
25992601 return "$major$minor";
26002602 }
29572959
29582960 =head1 VERSION
29592961
2960 version 3.19
2962 version 3.20
29612963
29622964 =head1 SYNOPSIS
29632965
33013303
33023304 =head3 pspgameos()
33033305
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
33053307 3.0, the userAgent string includes "Windows 95/NT4" on all Win32, so you can't
33063308 distinguish between Win95 and WinNT.
33073309
1111 'Dist::Zilla::PluginBundle::Git::VersionManager' => '0.007'
1212 },
1313 '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',
1420 'Test::CPAN::Changes' => '0.19',
1521 'Test::Code::TidyAll' => '0.50',
1622 'Test::More' => '0.96',
17 'Test::Synopsis' => '0'
23 'Test::Pod' => '1.41',
24 'Test::Synopsis' => '0',
25 'Test::Vars' => '0.014'
1826 }
1927 },
2028 'runtime' => {
4242 my %ids = map { $_ => 1 } HTTP::BrowserDetect->all_robot_ids;
4343
4444 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',
5050 );
5151
5252 foreach my $ua ( sort ( keys %{$all_tests} ) ) {
1839718397 "os_version" : "4.2",
1839818398 "robot" : null
1839918399 },
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 },
1840018413 "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" : {
1840118414 "browser" : "safari",
1840218415 "browser_major" : "5",
0 #!perl
1 # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
2 use strict; use warnings;
3 use Test::More;
4 use Test::Pod 1.41;
5
6 all_pod_files_ok();