New upstream version 3.16
gregor herrmann
6 years ago
0 | ||
1 | # This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v5.047. | |
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | use Module::Build 0.28; | |
6 | ||
7 | ||
8 | my %module_build_args = ( | |
9 | "build_requires" => { | |
10 | "Module::Build" => "0.28" | |
11 | }, | |
12 | "configure_requires" => { | |
13 | "ExtUtils::MakeMaker" => 0, | |
14 | "Module::Build" => "0.28" | |
15 | }, | |
16 | "dist_abstract" => "Determine Web browser, version, and platform from an HTTP user agent string", | |
17 | "dist_author" => [ | |
18 | "Lee Semel <lee\@semel.net>", | |
19 | "Peter Walsham", | |
20 | "Olaf Alders <olaf\@wundercounter.com> (current maintainer)" | |
21 | ], | |
22 | "dist_name" => "HTTP-BrowserDetect", | |
23 | "dist_version" => "3.14", | |
24 | "license" => "perl", | |
25 | "module_name" => "HTTP::BrowserDetect", | |
26 | "recursive_test_files" => 1, | |
27 | "requires" => { | |
28 | "perl" => "5.006", | |
29 | "strict" => 0, | |
30 | "vars" => 0, | |
31 | "warnings" => 0 | |
32 | }, | |
33 | "test_requires" => { | |
34 | "FindBin" => 0, | |
35 | "JSON::PP" => 0, | |
36 | "Path::Tiny" => 0, | |
37 | "Test::FailWarnings" => 0, | |
38 | "Test::More" => 0, | |
39 | "Test::Most" => 0, | |
40 | "Test::NoWarnings" => 0 | |
41 | } | |
42 | ); | |
43 | ||
44 | ||
45 | my %fallback_build_requires = ( | |
46 | "FindBin" => 0, | |
47 | "JSON::PP" => 0, | |
48 | "Module::Build" => "0.28", | |
49 | "Path::Tiny" => 0, | |
50 | "Test::FailWarnings" => 0, | |
51 | "Test::More" => 0, | |
52 | "Test::Most" => 0, | |
53 | "Test::NoWarnings" => 0 | |
54 | ); | |
55 | ||
56 | ||
57 | unless ( eval { Module::Build->VERSION(0.4004) } ) { | |
58 | delete $module_build_args{test_requires}; | |
59 | $module_build_args{build_requires} = \%fallback_build_requires; | |
60 | } | |
61 | ||
62 | my $build = Module::Build->new(%module_build_args); | |
63 | ||
64 | ||
65 | $build->create_build_script; |
0 | 0 | Revision history for Perl extension HTTP::BrowserDetect. |
1 | ||
2 | 3.16 2017-12-14 17:38:34Z | |
3 | - Fixes detection for bots added in 3.15 | |
4 | - Adds all_robot_ids() method | |
5 | ||
6 | 3.15 2017-12-13 03:25:42Z | |
7 | - Adds browserdetect.org to documentation | |
8 | - Adds more bots to robot detection | |
9 | - Adds robot_id(), which is currently in beta | |
1 | 10 | |
2 | 11 | 3.14 2016-05-25 11:44:10 America/Toronto |
3 | 12 | - Slightly refactor the detection of several browsers that |
7 | 7 | |
8 | 8 | % cpanm HTTP::BrowserDetect |
9 | 9 | |
10 | If you are installing into a system-wide directory, you may need to pass the | |
11 | "-S" flag to cpanm, which uses sudo to install the module: | |
12 | ||
13 | % cpanm -S HTTP::BrowserDetect | |
10 | If it does not have permission to install modules to the current perl, cpanm | |
11 | will automatically set up and install to a local::lib in your home directory. | |
12 | See the local::lib documentation (https://metacpan.org/pod/local::lib) for | |
13 | details on enabling it in your environment. | |
14 | 14 | |
15 | 15 | ## Installing with the CPAN shell |
16 | 16 | |
23 | 23 | As a last resort, you can manually install it. Download the tarball, untar it, |
24 | 24 | then build it: |
25 | 25 | |
26 | % perl Build.PL | |
27 | % ./Build && ./Build test | |
26 | % perl Makefile.PL | |
27 | % make && make test | |
28 | 28 | |
29 | 29 | Then install it: |
30 | 30 | |
31 | % ./Build install | |
31 | % make install | |
32 | 32 | |
33 | If you are installing into a system-wide directory, you may need to run: | |
34 | ||
35 | % sudo ./Build install | |
33 | If your perl is system-managed, you can create a local::lib in your home | |
34 | directory to install modules to. For details, see the local::lib documentation: | |
35 | https://metacpan.org/pod/local::lib | |
36 | 36 | |
37 | 37 | ## Documentation |
38 | 38 |
0 | This software is copyright (c) 2016 by Lee Semel. | |
0 | This software is copyright (c) 2017 by Lee Semel. | |
1 | 1 | |
2 | 2 | This is free software; you can redistribute it and/or modify it under |
3 | 3 | the same terms as the Perl 5 programming language system itself. |
11 | 11 | |
12 | 12 | --- The GNU General Public License, Version 1, February 1989 --- |
13 | 13 | |
14 | This software is Copyright (c) 2016 by Lee Semel. | |
14 | This software is Copyright (c) 2017 by Lee Semel. | |
15 | 15 | |
16 | 16 | This is free software, licensed under: |
17 | 17 | |
271 | 271 | |
272 | 272 | --- The Artistic License 1.0 --- |
273 | 273 | |
274 | This software is Copyright (c) 2016 by Lee Semel. | |
274 | This software is Copyright (c) 2017 by Lee Semel. | |
275 | 275 | |
276 | 276 | This is free software, licensed under: |
277 | 277 |
0 | # This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.047. | |
1 | Build.PL | |
0 | # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.010. | |
2 | 1 | CONTRIBUTORS |
3 | 2 | Changes |
4 | 3 | INSTALL |
5 | 4 | LICENSE |
6 | 5 | MANIFEST |
6 | MANIFEST.SKIP | |
7 | 7 | META.json |
8 | 8 | META.yml |
9 | 9 | Makefile.PL |
10 | README.md | |
10 | 11 | TODO |
11 | 12 | cpanfile |
12 | 13 | dist.ini |
14 | examples/ua.pl | |
13 | 15 | lib/HTTP/BrowserDetect.pm |
16 | perlcriticrc | |
17 | perltidyrc | |
18 | t/00-report-prereqs.dd | |
19 | t/00-report-prereqs.t | |
14 | 20 | t/01-detect.t |
15 | 21 | t/03-language.t |
16 | 22 | t/04-random-order.t |
23 | t/05_robot.t | |
17 | 24 | t/99_blank_ua.t |
18 | 25 | t/add-field.pl |
19 | 26 | t/make-more-useragents.pl |
20 | 27 | t/more-useragents.json |
21 | t/release-cpan-changes.t | |
22 | t/release-tidyall.t | |
28 | t/perlcriticrc | |
23 | 29 | t/useragents.json |
30 | tidyall.ini | |
31 | xt/author/synopsis.t | |
32 | xt/author/tidyall.t | |
33 | xt/release/cpan-changes.t |
0 | .travis.yml | |
1 | t/perlcriticrc | |
2 | t/pod_coverage.t | |
3 | t/02-critic.t | |
4 | MANIFEST.SKIP | |
5 | README.pod | |
6 | README.txt | |
7 | http-browserdetect.kpf | |
8 | blib | |
9 | http-browserdetect.komodoproject |
5 | 5 | "Olaf Alders <olaf@wundercounter.com> (current maintainer)" |
6 | 6 | ], |
7 | 7 | "dynamic_config" : 0, |
8 | "generated_by" : "Dist::Zilla version 5.047, CPAN::Meta::Converter version 2.150005", | |
8 | "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010", | |
9 | 9 | "license" : [ |
10 | 10 | "perl_5" |
11 | 11 | ], |
14 | 14 | "version" : 2 |
15 | 15 | }, |
16 | 16 | "name" : "HTTP-BrowserDetect", |
17 | "no_index" : { | |
18 | "directory" : [ | |
19 | "examples", | |
20 | "t", | |
21 | "xt" | |
22 | ] | |
23 | }, | |
17 | 24 | "prereqs" : { |
18 | "build" : { | |
19 | "requires" : { | |
20 | "Module::Build" : "0.28" | |
21 | } | |
22 | }, | |
23 | 25 | "configure" : { |
24 | 26 | "requires" : { |
25 | "ExtUtils::MakeMaker" : "0", | |
26 | "Module::Build" : "0.28" | |
27 | "ExtUtils::MakeMaker" : "0" | |
27 | 28 | }, |
28 | 29 | "suggests" : { |
29 | 30 | "JSON::PP" : "2.27300" |
32 | 33 | "develop" : { |
33 | 34 | "requires" : { |
34 | 35 | "Test::CPAN::Changes" : "0.19", |
35 | "Test::Code::TidyAll" : "0.24", | |
36 | "Test::More" : "0.88" | |
36 | "Test::Code::TidyAll" : "0.50", | |
37 | "Test::More" : "0.96", | |
38 | "Test::Synopsis" : "0" | |
39 | }, | |
40 | "suggests" : { | |
41 | "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : "0.004", | |
42 | "Dist::Zilla::Plugin::CopyFilesFromRelease" : "0", | |
43 | "Dist::Zilla::Plugin::Git::Commit" : "2.020", | |
44 | "Dist::Zilla::Plugin::Git::Tag" : "0", | |
45 | "Dist::Zilla::Plugin::NextRelease" : "5.033", | |
46 | "Dist::Zilla::Plugin::RewriteVersion::Transitional" : "0.004" | |
37 | 47 | } |
38 | 48 | }, |
39 | 49 | "runtime" : { |
45 | 55 | } |
46 | 56 | }, |
47 | 57 | "test" : { |
58 | "recommends" : { | |
59 | "CPAN::Meta" : "2.120900" | |
60 | }, | |
48 | 61 | "requires" : { |
62 | "ExtUtils::MakeMaker" : "0", | |
63 | "File::Spec" : "0", | |
49 | 64 | "FindBin" : "0", |
50 | 65 | "JSON::PP" : "0", |
66 | "List::Util" : "1.49", | |
51 | 67 | "Path::Tiny" : "0", |
52 | 68 | "Test::FailWarnings" : "0", |
53 | 69 | "Test::More" : "0", |
59 | 75 | "release_status" : "stable", |
60 | 76 | "resources" : { |
61 | 77 | "bugtracker" : { |
62 | "web" : "http://github.com/oalders/HTTP-BrowserDetect/issues" | |
78 | "web" : "https://github.com/oalders/http-browserdetect/issues" | |
63 | 79 | }, |
64 | "homepage" : "https://metacpan.org/release/HTTP-BrowserDetect", | |
80 | "homepage" : "https://github.com/oalders/http-browserdetect", | |
65 | 81 | "repository" : { |
66 | 82 | "type" : "git", |
67 | 83 | "url" : "https://github.com/oalders/http-browserdetect.git", |
68 | 84 | "web" : "https://github.com/oalders/http-browserdetect" |
69 | 85 | } |
70 | 86 | }, |
71 | "version" : "3.14", | |
87 | "version" : "3.16", | |
88 | "x_Dist_Zilla" : { | |
89 | "perl" : { | |
90 | "version" : "5.026000" | |
91 | }, | |
92 | "plugins" : [ | |
93 | { | |
94 | "class" : "Dist::Zilla::Plugin::PromptIfStale", | |
95 | "config" : { | |
96 | "Dist::Zilla::Plugin::PromptIfStale" : { | |
97 | "check_all_plugins" : 0, | |
98 | "check_all_prereqs" : 0, | |
99 | "modules" : [ | |
100 | "Dist::Zilla::PluginBundle::Author::OALDERS" | |
101 | ], | |
102 | "phase" : "build", | |
103 | "run_under_travis" : 0, | |
104 | "skip" : [] | |
105 | } | |
106 | }, | |
107 | "name" : "@Author::OALDERS/stale modules, build", | |
108 | "version" : "0.054" | |
109 | }, | |
110 | { | |
111 | "class" : "Dist::Zilla::Plugin::PromptIfStale", | |
112 | "config" : { | |
113 | "Dist::Zilla::Plugin::PromptIfStale" : { | |
114 | "check_all_plugins" : 1, | |
115 | "check_all_prereqs" : 1, | |
116 | "modules" : [], | |
117 | "phase" : "release", | |
118 | "run_under_travis" : 0, | |
119 | "skip" : [] | |
120 | } | |
121 | }, | |
122 | "name" : "@Author::OALDERS/stale modules, release", | |
123 | "version" : "0.054" | |
124 | }, | |
125 | { | |
126 | "class" : "Dist::Zilla::Plugin::MAXMIND::TidyAll", | |
127 | "name" : "@Author::OALDERS/MAXMIND::TidyAll", | |
128 | "version" : "0.82" | |
129 | }, | |
130 | { | |
131 | "class" : "Dist::Zilla::Plugin::AutoPrereqs", | |
132 | "name" : "@Author::OALDERS/AutoPrereqs", | |
133 | "version" : "6.010" | |
134 | }, | |
135 | { | |
136 | "class" : "Dist::Zilla::Plugin::CheckChangesHasContent", | |
137 | "name" : "@Author::OALDERS/CheckChangesHasContent", | |
138 | "version" : "0.011" | |
139 | }, | |
140 | { | |
141 | "class" : "Dist::Zilla::Plugin::MakeMaker", | |
142 | "config" : { | |
143 | "Dist::Zilla::Role::TestRunner" : { | |
144 | "default_jobs" : 1 | |
145 | } | |
146 | }, | |
147 | "name" : "@Author::OALDERS/MakeMaker", | |
148 | "version" : "6.010" | |
149 | }, | |
150 | { | |
151 | "class" : "Dist::Zilla::Plugin::CPANFile", | |
152 | "name" : "@Author::OALDERS/CPANFile", | |
153 | "version" : "6.010" | |
154 | }, | |
155 | { | |
156 | "class" : "Dist::Zilla::Plugin::ContributorsFile", | |
157 | "name" : "@Author::OALDERS/ContributorsFile", | |
158 | "version" : "0.3.0" | |
159 | }, | |
160 | { | |
161 | "class" : "Dist::Zilla::Plugin::MetaJSON", | |
162 | "name" : "@Author::OALDERS/MetaJSON", | |
163 | "version" : "6.010" | |
164 | }, | |
165 | { | |
166 | "class" : "Dist::Zilla::Plugin::MetaYAML", | |
167 | "name" : "@Author::OALDERS/MetaYAML", | |
168 | "version" : "6.010" | |
169 | }, | |
170 | { | |
171 | "class" : "Dist::Zilla::Plugin::Manifest", | |
172 | "name" : "@Author::OALDERS/Manifest", | |
173 | "version" : "6.010" | |
174 | }, | |
175 | { | |
176 | "class" : "Dist::Zilla::Plugin::MetaNoIndex", | |
177 | "name" : "@Author::OALDERS/MetaNoIndex", | |
178 | "version" : "6.010" | |
179 | }, | |
180 | { | |
181 | "class" : "Dist::Zilla::Plugin::MetaConfig", | |
182 | "name" : "@Author::OALDERS/MetaConfig", | |
183 | "version" : "6.010" | |
184 | }, | |
185 | { | |
186 | "class" : "Dist::Zilla::Plugin::MetaResources", | |
187 | "name" : "@Author::OALDERS/MetaResources", | |
188 | "version" : "6.010" | |
189 | }, | |
190 | { | |
191 | "class" : "Dist::Zilla::Plugin::License", | |
192 | "name" : "@Author::OALDERS/License", | |
193 | "version" : "6.010" | |
194 | }, | |
195 | { | |
196 | "class" : "Dist::Zilla::Plugin::InstallGuide", | |
197 | "name" : "@Author::OALDERS/InstallGuide", | |
198 | "version" : "1.200007" | |
199 | }, | |
200 | { | |
201 | "class" : "Dist::Zilla::Plugin::Prereqs", | |
202 | "config" : { | |
203 | "Dist::Zilla::Plugin::Prereqs" : { | |
204 | "phase" : "runtime", | |
205 | "type" : "requires" | |
206 | } | |
207 | }, | |
208 | "name" : "@Author::OALDERS/Prereqs", | |
209 | "version" : "6.010" | |
210 | }, | |
211 | { | |
212 | "class" : "Dist::Zilla::Plugin::ExecDir", | |
213 | "name" : "@Author::OALDERS/ExecDir", | |
214 | "version" : "6.010" | |
215 | }, | |
216 | { | |
217 | "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes", | |
218 | "config" : { | |
219 | "Dist::Zilla::Plugin::Test::CPAN::Changes" : { | |
220 | "changelog" : "Changes" | |
221 | } | |
222 | }, | |
223 | "name" : "@Author::OALDERS/Test::CPAN::Changes", | |
224 | "version" : "0.012" | |
225 | }, | |
226 | { | |
227 | "class" : "Dist::Zilla::Plugin::TestRelease", | |
228 | "name" : "@Author::OALDERS/TestRelease", | |
229 | "version" : "6.010" | |
230 | }, | |
231 | { | |
232 | "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs", | |
233 | "name" : "@Author::OALDERS/Test::ReportPrereqs", | |
234 | "version" : "0.027" | |
235 | }, | |
236 | { | |
237 | "class" : "Dist::Zilla::Plugin::Test::Synopsis", | |
238 | "name" : "@Author::OALDERS/Test::Synopsis", | |
239 | "version" : "2.000007" | |
240 | }, | |
241 | { | |
242 | "class" : "Dist::Zilla::Plugin::Test::TidyAll", | |
243 | "name" : "@Author::OALDERS/Test::TidyAll", | |
244 | "version" : "0.04" | |
245 | }, | |
246 | { | |
247 | "class" : "Dist::Zilla::Plugin::RunExtraTests", | |
248 | "config" : { | |
249 | "Dist::Zilla::Role::TestRunner" : { | |
250 | "default_jobs" : 1 | |
251 | } | |
252 | }, | |
253 | "name" : "@Author::OALDERS/RunExtraTests", | |
254 | "version" : "0.029" | |
255 | }, | |
256 | { | |
257 | "class" : "Dist::Zilla::Plugin::PodWeaver", | |
258 | "config" : { | |
259 | "Dist::Zilla::Plugin::PodWeaver" : { | |
260 | "finder" : [ | |
261 | ":InstallModules", | |
262 | ":ExecFiles" | |
263 | ], | |
264 | "plugins" : [ | |
265 | { | |
266 | "class" : "Pod::Weaver::Plugin::EnsurePod5", | |
267 | "name" : "@CorePrep/EnsurePod5", | |
268 | "version" : "4.015" | |
269 | }, | |
270 | { | |
271 | "class" : "Pod::Weaver::Plugin::H1Nester", | |
272 | "name" : "@CorePrep/H1Nester", | |
273 | "version" : "4.015" | |
274 | }, | |
275 | { | |
276 | "class" : "Pod::Weaver::Plugin::SingleEncoding", | |
277 | "name" : "@Default/SingleEncoding", | |
278 | "version" : "4.015" | |
279 | }, | |
280 | { | |
281 | "class" : "Pod::Weaver::Section::Name", | |
282 | "name" : "@Default/Name", | |
283 | "version" : "4.015" | |
284 | }, | |
285 | { | |
286 | "class" : "Pod::Weaver::Section::Version", | |
287 | "name" : "@Default/Version", | |
288 | "version" : "4.015" | |
289 | }, | |
290 | { | |
291 | "class" : "Pod::Weaver::Section::Region", | |
292 | "name" : "@Default/prelude", | |
293 | "version" : "4.015" | |
294 | }, | |
295 | { | |
296 | "class" : "Pod::Weaver::Section::Generic", | |
297 | "name" : "SYNOPSIS", | |
298 | "version" : "4.015" | |
299 | }, | |
300 | { | |
301 | "class" : "Pod::Weaver::Section::Generic", | |
302 | "name" : "DESCRIPTION", | |
303 | "version" : "4.015" | |
304 | }, | |
305 | { | |
306 | "class" : "Pod::Weaver::Section::Generic", | |
307 | "name" : "OVERVIEW", | |
308 | "version" : "4.015" | |
309 | }, | |
310 | { | |
311 | "class" : "Pod::Weaver::Section::Collect", | |
312 | "name" : "ATTRIBUTES", | |
313 | "version" : "4.015" | |
314 | }, | |
315 | { | |
316 | "class" : "Pod::Weaver::Section::Collect", | |
317 | "name" : "METHODS", | |
318 | "version" : "4.015" | |
319 | }, | |
320 | { | |
321 | "class" : "Pod::Weaver::Section::Collect", | |
322 | "name" : "FUNCTIONS", | |
323 | "version" : "4.015" | |
324 | }, | |
325 | { | |
326 | "class" : "Pod::Weaver::Section::Leftovers", | |
327 | "name" : "@Default/Leftovers", | |
328 | "version" : "4.015" | |
329 | }, | |
330 | { | |
331 | "class" : "Pod::Weaver::Section::Region", | |
332 | "name" : "@Default/postlude", | |
333 | "version" : "4.015" | |
334 | }, | |
335 | { | |
336 | "class" : "Pod::Weaver::Section::Authors", | |
337 | "name" : "@Default/Authors", | |
338 | "version" : "4.015" | |
339 | }, | |
340 | { | |
341 | "class" : "Pod::Weaver::Section::Legal", | |
342 | "name" : "@Default/Legal", | |
343 | "version" : "4.015" | |
344 | } | |
345 | ] | |
346 | } | |
347 | }, | |
348 | "name" : "@Author::OALDERS/PodWeaver", | |
349 | "version" : "4.008" | |
350 | }, | |
351 | { | |
352 | "class" : "Dist::Zilla::Plugin::PruneCruft", | |
353 | "name" : "@Author::OALDERS/PruneCruft", | |
354 | "version" : "6.010" | |
355 | }, | |
356 | { | |
357 | "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild", | |
358 | "name" : "@Author::OALDERS/CopyFilesFromBuild", | |
359 | "version" : "0.170880" | |
360 | }, | |
361 | { | |
362 | "class" : "Dist::Zilla::Plugin::GithubMeta", | |
363 | "name" : "@Author::OALDERS/GithubMeta", | |
364 | "version" : "0.54" | |
365 | }, | |
366 | { | |
367 | "class" : "Dist::Zilla::Plugin::Git::GatherDir", | |
368 | "config" : { | |
369 | "Dist::Zilla::Plugin::GatherDir" : { | |
370 | "exclude_filename" : [ | |
371 | "Install", | |
372 | "LICENSE", | |
373 | "META.json", | |
374 | "Makefile.PL", | |
375 | "README.md", | |
376 | "cpanfile" | |
377 | ], | |
378 | "exclude_match" : [], | |
379 | "follow_symlinks" : 0, | |
380 | "include_dotfiles" : 0, | |
381 | "prefix" : "", | |
382 | "prune_directory" : [], | |
383 | "root" : "." | |
384 | }, | |
385 | "Dist::Zilla::Plugin::Git::GatherDir" : { | |
386 | "include_untracked" : 0 | |
387 | } | |
388 | }, | |
389 | "name" : "@Author::OALDERS/Git::GatherDir", | |
390 | "version" : "2.043" | |
391 | }, | |
392 | { | |
393 | "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", | |
394 | "config" : { | |
395 | "Dist::Zilla::Plugin::CopyFilesFromRelease" : { | |
396 | "filename" : [ | |
397 | "Install" | |
398 | ], | |
399 | "match" : [] | |
400 | } | |
401 | }, | |
402 | "name" : "@Author::OALDERS/CopyFilesFromRelease", | |
403 | "version" : "0.006" | |
404 | }, | |
405 | { | |
406 | "class" : "Dist::Zilla::Plugin::Git::Check", | |
407 | "config" : { | |
408 | "Dist::Zilla::Plugin::Git::Check" : { | |
409 | "untracked_files" : "die" | |
410 | }, | |
411 | "Dist::Zilla::Role::Git::DirtyFiles" : { | |
412 | "allow_dirty" : [ | |
413 | "Changes", | |
414 | "Install", | |
415 | "LICENSE", | |
416 | "META.json", | |
417 | "Makefile.PL", | |
418 | "README.md", | |
419 | "cpanfile", | |
420 | "dist.ini" | |
421 | ], | |
422 | "allow_dirty_match" : [], | |
423 | "changelog" : "Changes" | |
424 | }, | |
425 | "Dist::Zilla::Role::Git::Repo" : { | |
426 | "git_version" : "2.15.1", | |
427 | "repo_root" : "." | |
428 | } | |
429 | }, | |
430 | "name" : "@Author::OALDERS/Git::Check", | |
431 | "version" : "2.043" | |
432 | }, | |
433 | { | |
434 | "class" : "Dist::Zilla::Plugin::Git::Contributors", | |
435 | "config" : { | |
436 | "Dist::Zilla::Plugin::Git::Contributors" : { | |
437 | "git_version" : "2.15.1", | |
438 | "include_authors" : 0, | |
439 | "include_releaser" : 1, | |
440 | "order_by" : "name", | |
441 | "paths" : [] | |
442 | } | |
443 | }, | |
444 | "name" : "@Author::OALDERS/Git::Contributors", | |
445 | "version" : "0.032" | |
446 | }, | |
447 | { | |
448 | "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod", | |
449 | "config" : { | |
450 | "Dist::Zilla::Role::FileWatcher" : { | |
451 | "version" : "0.006" | |
452 | } | |
453 | }, | |
454 | "name" : "@Author::OALDERS/ReadmeMdInBuild", | |
455 | "version" : "0.163250" | |
456 | }, | |
457 | { | |
458 | "class" : "Dist::Zilla::Plugin::ShareDir", | |
459 | "name" : "@Author::OALDERS/ShareDir", | |
460 | "version" : "6.010" | |
461 | }, | |
462 | { | |
463 | "class" : "Dist::Zilla::Plugin::TravisCI::StatusBadge", | |
464 | "name" : "@Author::OALDERS/TravisCI::StatusBadge", | |
465 | "version" : "0.007" | |
466 | }, | |
467 | { | |
468 | "class" : "Dist::Zilla::Plugin::ConfirmRelease", | |
469 | "name" : "@Author::OALDERS/ConfirmRelease", | |
470 | "version" : "6.010" | |
471 | }, | |
472 | { | |
473 | "class" : "Dist::Zilla::Plugin::UploadToCPAN", | |
474 | "name" : "@Author::OALDERS/UploadToCPAN", | |
475 | "version" : "6.010" | |
476 | }, | |
477 | { | |
478 | "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional", | |
479 | "config" : { | |
480 | "Dist::Zilla::Plugin::RewriteVersion" : { | |
481 | "add_tarball_name" : 0, | |
482 | "finders" : [ | |
483 | ":ExecFiles", | |
484 | ":InstallModules" | |
485 | ], | |
486 | "global" : 0, | |
487 | "skip_version_provider" : 0 | |
488 | }, | |
489 | "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {} | |
490 | }, | |
491 | "name" : "@Author::OALDERS/@Git::VersionManager/RewriteVersion::Transitional", | |
492 | "version" : "0.008" | |
493 | }, | |
494 | { | |
495 | "class" : "Dist::Zilla::Plugin::MetaProvides::Update", | |
496 | "name" : "@Author::OALDERS/@Git::VersionManager/MetaProvides::Update", | |
497 | "version" : "0.003" | |
498 | }, | |
499 | { | |
500 | "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease", | |
501 | "config" : { | |
502 | "Dist::Zilla::Plugin::CopyFilesFromRelease" : { | |
503 | "filename" : [ | |
504 | "Changes" | |
505 | ], | |
506 | "match" : [] | |
507 | } | |
508 | }, | |
509 | "name" : "@Author::OALDERS/@Git::VersionManager/CopyFilesFromRelease", | |
510 | "version" : "0.006" | |
511 | }, | |
512 | { | |
513 | "class" : "Dist::Zilla::Plugin::Git::Commit", | |
514 | "config" : { | |
515 | "Dist::Zilla::Plugin::Git::Commit" : { | |
516 | "add_files_in" : [], | |
517 | "commit_msg" : "v%v%n%n%c" | |
518 | }, | |
519 | "Dist::Zilla::Role::Git::DirtyFiles" : { | |
520 | "allow_dirty" : [ | |
521 | "Changes", | |
522 | "Install", | |
523 | "LICENSE", | |
524 | "META.json", | |
525 | "Makefile.PL", | |
526 | "README.md", | |
527 | "cpanfile", | |
528 | "dist.ini" | |
529 | ], | |
530 | "allow_dirty_match" : [], | |
531 | "changelog" : "Changes" | |
532 | }, | |
533 | "Dist::Zilla::Role::Git::Repo" : { | |
534 | "git_version" : "2.15.1", | |
535 | "repo_root" : "." | |
536 | }, | |
537 | "Dist::Zilla::Role::Git::StringFormatter" : { | |
538 | "time_zone" : "local" | |
539 | } | |
540 | }, | |
541 | "name" : "@Author::OALDERS/@Git::VersionManager/release snapshot", | |
542 | "version" : "2.043" | |
543 | }, | |
544 | { | |
545 | "class" : "Dist::Zilla::Plugin::Git::Tag", | |
546 | "config" : { | |
547 | "Dist::Zilla::Plugin::Git::Tag" : { | |
548 | "branch" : null, | |
549 | "changelog" : "Changes", | |
550 | "signed" : 0, | |
551 | "tag" : "v3.16", | |
552 | "tag_format" : "v%v", | |
553 | "tag_message" : "v%v" | |
554 | }, | |
555 | "Dist::Zilla::Role::Git::Repo" : { | |
556 | "git_version" : "2.15.1", | |
557 | "repo_root" : "." | |
558 | }, | |
559 | "Dist::Zilla::Role::Git::StringFormatter" : { | |
560 | "time_zone" : "local" | |
561 | } | |
562 | }, | |
563 | "name" : "@Author::OALDERS/@Git::VersionManager/Git::Tag", | |
564 | "version" : "2.043" | |
565 | }, | |
566 | { | |
567 | "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional", | |
568 | "config" : { | |
569 | "Dist::Zilla::Plugin::BumpVersionAfterRelease" : { | |
570 | "finders" : [ | |
571 | ":ExecFiles", | |
572 | ":InstallModules" | |
573 | ], | |
574 | "global" : 0, | |
575 | "munge_makefile_pl" : 1 | |
576 | }, | |
577 | "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {} | |
578 | }, | |
579 | "name" : "@Author::OALDERS/@Git::VersionManager/BumpVersionAfterRelease::Transitional", | |
580 | "version" : "0.008" | |
581 | }, | |
582 | { | |
583 | "class" : "Dist::Zilla::Plugin::NextRelease", | |
584 | "name" : "@Author::OALDERS/@Git::VersionManager/NextRelease", | |
585 | "version" : "6.010" | |
586 | }, | |
587 | { | |
588 | "class" : "Dist::Zilla::Plugin::Git::Commit", | |
589 | "config" : { | |
590 | "Dist::Zilla::Plugin::Git::Commit" : { | |
591 | "add_files_in" : [], | |
592 | "commit_msg" : "increment $VERSION after %v release" | |
593 | }, | |
594 | "Dist::Zilla::Role::Git::DirtyFiles" : { | |
595 | "allow_dirty" : [ | |
596 | "Build.PL", | |
597 | "Changes", | |
598 | "Makefile.PL" | |
599 | ], | |
600 | "allow_dirty_match" : [ | |
601 | "(?^:^lib/.*\\.pm$)" | |
602 | ], | |
603 | "changelog" : "Changes" | |
604 | }, | |
605 | "Dist::Zilla::Role::Git::Repo" : { | |
606 | "git_version" : "2.15.1", | |
607 | "repo_root" : "." | |
608 | }, | |
609 | "Dist::Zilla::Role::Git::StringFormatter" : { | |
610 | "time_zone" : "local" | |
611 | } | |
612 | }, | |
613 | "name" : "@Author::OALDERS/@Git::VersionManager/post-release commit", | |
614 | "version" : "2.043" | |
615 | }, | |
616 | { | |
617 | "class" : "Dist::Zilla::Plugin::Prereqs", | |
618 | "config" : { | |
619 | "Dist::Zilla::Plugin::Prereqs" : { | |
620 | "phase" : "develop", | |
621 | "type" : "suggests" | |
622 | } | |
623 | }, | |
624 | "name" : "@Author::OALDERS/@Git::VersionManager/prereqs for @Git::VersionManager", | |
625 | "version" : "6.010" | |
626 | }, | |
627 | { | |
628 | "class" : "Dist::Zilla::Plugin::Git::Push", | |
629 | "config" : { | |
630 | "Dist::Zilla::Plugin::Git::Push" : { | |
631 | "push_to" : [ | |
632 | "origin" | |
633 | ], | |
634 | "remotes_must_exist" : 1 | |
635 | }, | |
636 | "Dist::Zilla::Role::Git::Repo" : { | |
637 | "git_version" : "2.15.1", | |
638 | "repo_root" : "." | |
639 | } | |
640 | }, | |
641 | "name" : "@Author::OALDERS/Git::Push", | |
642 | "version" : "2.043" | |
643 | }, | |
644 | { | |
645 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
646 | "name" : ":InstallModules", | |
647 | "version" : "6.010" | |
648 | }, | |
649 | { | |
650 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
651 | "name" : ":IncModules", | |
652 | "version" : "6.010" | |
653 | }, | |
654 | { | |
655 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
656 | "name" : ":TestFiles", | |
657 | "version" : "6.010" | |
658 | }, | |
659 | { | |
660 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
661 | "name" : ":ExtraTestFiles", | |
662 | "version" : "6.010" | |
663 | }, | |
664 | { | |
665 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
666 | "name" : ":ExecFiles", | |
667 | "version" : "6.010" | |
668 | }, | |
669 | { | |
670 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
671 | "name" : ":PerlExecFiles", | |
672 | "version" : "6.010" | |
673 | }, | |
674 | { | |
675 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
676 | "name" : ":ShareFiles", | |
677 | "version" : "6.010" | |
678 | }, | |
679 | { | |
680 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
681 | "name" : ":MainModule", | |
682 | "version" : "6.010" | |
683 | }, | |
684 | { | |
685 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
686 | "name" : ":AllFiles", | |
687 | "version" : "6.010" | |
688 | }, | |
689 | { | |
690 | "class" : "Dist::Zilla::Plugin::FinderCode", | |
691 | "name" : ":NoFiles", | |
692 | "version" : "6.010" | |
693 | } | |
694 | ], | |
695 | "zilla" : { | |
696 | "class" : "Dist::Zilla::Dist::Builder", | |
697 | "config" : { | |
698 | "is_trial" : 0 | |
699 | }, | |
700 | "version" : "6.010" | |
701 | } | |
702 | }, | |
72 | 703 | "x_contributors" : [ |
73 | 704 | "Andrew Moise <andrew.moise@gmail.com>", |
74 | 705 | "Aran Deltac <bluefeet@gmail.com>", |
98 | 729 | "Uwe <uwe@uwevoelker.de>", |
99 | 730 | "vti <viacheslav.t@gmail.com>", |
100 | 731 | "yeahoffline <frank.gasser@gmail.com>" |
101 | ] | |
732 | ], | |
733 | "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233" | |
102 | 734 | } |
103 | 735 |
4 | 4 | - 'Peter Walsham' |
5 | 5 | - 'Olaf Alders <olaf@wundercounter.com> (current maintainer)' |
6 | 6 | build_requires: |
7 | ExtUtils::MakeMaker: '0' | |
8 | File::Spec: '0' | |
7 | 9 | FindBin: '0' |
8 | 10 | JSON::PP: '0' |
9 | Module::Build: '0.28' | |
11 | List::Util: '1.49' | |
10 | 12 | Path::Tiny: '0' |
11 | 13 | Test::FailWarnings: '0' |
12 | 14 | Test::More: '0' |
14 | 16 | Test::NoWarnings: '0' |
15 | 17 | configure_requires: |
16 | 18 | ExtUtils::MakeMaker: '0' |
17 | Module::Build: '0.28' | |
18 | 19 | dynamic_config: 0 |
19 | generated_by: 'Dist::Zilla version 5.047, CPAN::Meta::Converter version 2.150005' | |
20 | generated_by: 'Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010' | |
20 | 21 | license: perl |
21 | 22 | meta-spec: |
22 | 23 | url: http://module-build.sourceforge.net/META-spec-v1.4.html |
23 | 24 | version: '1.4' |
24 | 25 | name: HTTP-BrowserDetect |
26 | no_index: | |
27 | directory: | |
28 | - examples | |
29 | - t | |
30 | - xt | |
25 | 31 | requires: |
26 | 32 | perl: '5.006' |
27 | 33 | strict: '0' |
28 | 34 | vars: '0' |
29 | 35 | warnings: '0' |
30 | 36 | resources: |
31 | bugtracker: http://github.com/oalders/HTTP-BrowserDetect/issues | |
32 | homepage: https://metacpan.org/release/HTTP-BrowserDetect | |
37 | bugtracker: https://github.com/oalders/http-browserdetect/issues | |
38 | homepage: https://github.com/oalders/http-browserdetect | |
33 | 39 | repository: https://github.com/oalders/http-browserdetect.git |
34 | version: '3.14' | |
40 | version: '3.16' | |
41 | x_Dist_Zilla: | |
42 | perl: | |
43 | version: '5.026000' | |
44 | plugins: | |
45 | - | |
46 | class: Dist::Zilla::Plugin::PromptIfStale | |
47 | config: | |
48 | Dist::Zilla::Plugin::PromptIfStale: | |
49 | check_all_plugins: 0 | |
50 | check_all_prereqs: 0 | |
51 | modules: | |
52 | - Dist::Zilla::PluginBundle::Author::OALDERS | |
53 | phase: build | |
54 | run_under_travis: 0 | |
55 | skip: [] | |
56 | name: '@Author::OALDERS/stale modules, build' | |
57 | version: '0.054' | |
58 | - | |
59 | class: Dist::Zilla::Plugin::PromptIfStale | |
60 | config: | |
61 | Dist::Zilla::Plugin::PromptIfStale: | |
62 | check_all_plugins: 1 | |
63 | check_all_prereqs: 1 | |
64 | modules: [] | |
65 | phase: release | |
66 | run_under_travis: 0 | |
67 | skip: [] | |
68 | name: '@Author::OALDERS/stale modules, release' | |
69 | version: '0.054' | |
70 | - | |
71 | class: Dist::Zilla::Plugin::MAXMIND::TidyAll | |
72 | name: '@Author::OALDERS/MAXMIND::TidyAll' | |
73 | version: '0.82' | |
74 | - | |
75 | class: Dist::Zilla::Plugin::AutoPrereqs | |
76 | name: '@Author::OALDERS/AutoPrereqs' | |
77 | version: '6.010' | |
78 | - | |
79 | class: Dist::Zilla::Plugin::CheckChangesHasContent | |
80 | name: '@Author::OALDERS/CheckChangesHasContent' | |
81 | version: '0.011' | |
82 | - | |
83 | class: Dist::Zilla::Plugin::MakeMaker | |
84 | config: | |
85 | Dist::Zilla::Role::TestRunner: | |
86 | default_jobs: 1 | |
87 | name: '@Author::OALDERS/MakeMaker' | |
88 | version: '6.010' | |
89 | - | |
90 | class: Dist::Zilla::Plugin::CPANFile | |
91 | name: '@Author::OALDERS/CPANFile' | |
92 | version: '6.010' | |
93 | - | |
94 | class: Dist::Zilla::Plugin::ContributorsFile | |
95 | name: '@Author::OALDERS/ContributorsFile' | |
96 | version: 0.3.0 | |
97 | - | |
98 | class: Dist::Zilla::Plugin::MetaJSON | |
99 | name: '@Author::OALDERS/MetaJSON' | |
100 | version: '6.010' | |
101 | - | |
102 | class: Dist::Zilla::Plugin::MetaYAML | |
103 | name: '@Author::OALDERS/MetaYAML' | |
104 | version: '6.010' | |
105 | - | |
106 | class: Dist::Zilla::Plugin::Manifest | |
107 | name: '@Author::OALDERS/Manifest' | |
108 | version: '6.010' | |
109 | - | |
110 | class: Dist::Zilla::Plugin::MetaNoIndex | |
111 | name: '@Author::OALDERS/MetaNoIndex' | |
112 | version: '6.010' | |
113 | - | |
114 | class: Dist::Zilla::Plugin::MetaConfig | |
115 | name: '@Author::OALDERS/MetaConfig' | |
116 | version: '6.010' | |
117 | - | |
118 | class: Dist::Zilla::Plugin::MetaResources | |
119 | name: '@Author::OALDERS/MetaResources' | |
120 | version: '6.010' | |
121 | - | |
122 | class: Dist::Zilla::Plugin::License | |
123 | name: '@Author::OALDERS/License' | |
124 | version: '6.010' | |
125 | - | |
126 | class: Dist::Zilla::Plugin::InstallGuide | |
127 | name: '@Author::OALDERS/InstallGuide' | |
128 | version: '1.200007' | |
129 | - | |
130 | class: Dist::Zilla::Plugin::Prereqs | |
131 | config: | |
132 | Dist::Zilla::Plugin::Prereqs: | |
133 | phase: runtime | |
134 | type: requires | |
135 | name: '@Author::OALDERS/Prereqs' | |
136 | version: '6.010' | |
137 | - | |
138 | class: Dist::Zilla::Plugin::ExecDir | |
139 | name: '@Author::OALDERS/ExecDir' | |
140 | version: '6.010' | |
141 | - | |
142 | class: Dist::Zilla::Plugin::Test::CPAN::Changes | |
143 | config: | |
144 | Dist::Zilla::Plugin::Test::CPAN::Changes: | |
145 | changelog: Changes | |
146 | name: '@Author::OALDERS/Test::CPAN::Changes' | |
147 | version: '0.012' | |
148 | - | |
149 | class: Dist::Zilla::Plugin::TestRelease | |
150 | name: '@Author::OALDERS/TestRelease' | |
151 | version: '6.010' | |
152 | - | |
153 | class: Dist::Zilla::Plugin::Test::ReportPrereqs | |
154 | name: '@Author::OALDERS/Test::ReportPrereqs' | |
155 | version: '0.027' | |
156 | - | |
157 | class: Dist::Zilla::Plugin::Test::Synopsis | |
158 | name: '@Author::OALDERS/Test::Synopsis' | |
159 | version: '2.000007' | |
160 | - | |
161 | class: Dist::Zilla::Plugin::Test::TidyAll | |
162 | name: '@Author::OALDERS/Test::TidyAll' | |
163 | version: '0.04' | |
164 | - | |
165 | class: Dist::Zilla::Plugin::RunExtraTests | |
166 | config: | |
167 | Dist::Zilla::Role::TestRunner: | |
168 | default_jobs: 1 | |
169 | name: '@Author::OALDERS/RunExtraTests' | |
170 | version: '0.029' | |
171 | - | |
172 | class: Dist::Zilla::Plugin::PodWeaver | |
173 | config: | |
174 | Dist::Zilla::Plugin::PodWeaver: | |
175 | finder: | |
176 | - ':InstallModules' | |
177 | - ':ExecFiles' | |
178 | plugins: | |
179 | - | |
180 | class: Pod::Weaver::Plugin::EnsurePod5 | |
181 | name: '@CorePrep/EnsurePod5' | |
182 | version: '4.015' | |
183 | - | |
184 | class: Pod::Weaver::Plugin::H1Nester | |
185 | name: '@CorePrep/H1Nester' | |
186 | version: '4.015' | |
187 | - | |
188 | class: Pod::Weaver::Plugin::SingleEncoding | |
189 | name: '@Default/SingleEncoding' | |
190 | version: '4.015' | |
191 | - | |
192 | class: Pod::Weaver::Section::Name | |
193 | name: '@Default/Name' | |
194 | version: '4.015' | |
195 | - | |
196 | class: Pod::Weaver::Section::Version | |
197 | name: '@Default/Version' | |
198 | version: '4.015' | |
199 | - | |
200 | class: Pod::Weaver::Section::Region | |
201 | name: '@Default/prelude' | |
202 | version: '4.015' | |
203 | - | |
204 | class: Pod::Weaver::Section::Generic | |
205 | name: SYNOPSIS | |
206 | version: '4.015' | |
207 | - | |
208 | class: Pod::Weaver::Section::Generic | |
209 | name: DESCRIPTION | |
210 | version: '4.015' | |
211 | - | |
212 | class: Pod::Weaver::Section::Generic | |
213 | name: OVERVIEW | |
214 | version: '4.015' | |
215 | - | |
216 | class: Pod::Weaver::Section::Collect | |
217 | name: ATTRIBUTES | |
218 | version: '4.015' | |
219 | - | |
220 | class: Pod::Weaver::Section::Collect | |
221 | name: METHODS | |
222 | version: '4.015' | |
223 | - | |
224 | class: Pod::Weaver::Section::Collect | |
225 | name: FUNCTIONS | |
226 | version: '4.015' | |
227 | - | |
228 | class: Pod::Weaver::Section::Leftovers | |
229 | name: '@Default/Leftovers' | |
230 | version: '4.015' | |
231 | - | |
232 | class: Pod::Weaver::Section::Region | |
233 | name: '@Default/postlude' | |
234 | version: '4.015' | |
235 | - | |
236 | class: Pod::Weaver::Section::Authors | |
237 | name: '@Default/Authors' | |
238 | version: '4.015' | |
239 | - | |
240 | class: Pod::Weaver::Section::Legal | |
241 | name: '@Default/Legal' | |
242 | version: '4.015' | |
243 | name: '@Author::OALDERS/PodWeaver' | |
244 | version: '4.008' | |
245 | - | |
246 | class: Dist::Zilla::Plugin::PruneCruft | |
247 | name: '@Author::OALDERS/PruneCruft' | |
248 | version: '6.010' | |
249 | - | |
250 | class: Dist::Zilla::Plugin::CopyFilesFromBuild | |
251 | name: '@Author::OALDERS/CopyFilesFromBuild' | |
252 | version: '0.170880' | |
253 | - | |
254 | class: Dist::Zilla::Plugin::GithubMeta | |
255 | name: '@Author::OALDERS/GithubMeta' | |
256 | version: '0.54' | |
257 | - | |
258 | class: Dist::Zilla::Plugin::Git::GatherDir | |
259 | config: | |
260 | Dist::Zilla::Plugin::GatherDir: | |
261 | exclude_filename: | |
262 | - Install | |
263 | - LICENSE | |
264 | - META.json | |
265 | - Makefile.PL | |
266 | - README.md | |
267 | - cpanfile | |
268 | exclude_match: [] | |
269 | follow_symlinks: 0 | |
270 | include_dotfiles: 0 | |
271 | prefix: '' | |
272 | prune_directory: [] | |
273 | root: . | |
274 | Dist::Zilla::Plugin::Git::GatherDir: | |
275 | include_untracked: 0 | |
276 | name: '@Author::OALDERS/Git::GatherDir' | |
277 | version: '2.043' | |
278 | - | |
279 | class: Dist::Zilla::Plugin::CopyFilesFromRelease | |
280 | config: | |
281 | Dist::Zilla::Plugin::CopyFilesFromRelease: | |
282 | filename: | |
283 | - Install | |
284 | match: [] | |
285 | name: '@Author::OALDERS/CopyFilesFromRelease' | |
286 | version: '0.006' | |
287 | - | |
288 | class: Dist::Zilla::Plugin::Git::Check | |
289 | config: | |
290 | Dist::Zilla::Plugin::Git::Check: | |
291 | untracked_files: die | |
292 | Dist::Zilla::Role::Git::DirtyFiles: | |
293 | allow_dirty: | |
294 | - Changes | |
295 | - Install | |
296 | - LICENSE | |
297 | - META.json | |
298 | - Makefile.PL | |
299 | - README.md | |
300 | - cpanfile | |
301 | - dist.ini | |
302 | allow_dirty_match: [] | |
303 | changelog: Changes | |
304 | Dist::Zilla::Role::Git::Repo: | |
305 | git_version: 2.15.1 | |
306 | repo_root: . | |
307 | name: '@Author::OALDERS/Git::Check' | |
308 | version: '2.043' | |
309 | - | |
310 | class: Dist::Zilla::Plugin::Git::Contributors | |
311 | config: | |
312 | Dist::Zilla::Plugin::Git::Contributors: | |
313 | git_version: 2.15.1 | |
314 | include_authors: 0 | |
315 | include_releaser: 1 | |
316 | order_by: name | |
317 | paths: [] | |
318 | name: '@Author::OALDERS/Git::Contributors' | |
319 | version: '0.032' | |
320 | - | |
321 | class: Dist::Zilla::Plugin::ReadmeAnyFromPod | |
322 | config: | |
323 | Dist::Zilla::Role::FileWatcher: | |
324 | version: '0.006' | |
325 | name: '@Author::OALDERS/ReadmeMdInBuild' | |
326 | version: '0.163250' | |
327 | - | |
328 | class: Dist::Zilla::Plugin::ShareDir | |
329 | name: '@Author::OALDERS/ShareDir' | |
330 | version: '6.010' | |
331 | - | |
332 | class: Dist::Zilla::Plugin::TravisCI::StatusBadge | |
333 | name: '@Author::OALDERS/TravisCI::StatusBadge' | |
334 | version: '0.007' | |
335 | - | |
336 | class: Dist::Zilla::Plugin::ConfirmRelease | |
337 | name: '@Author::OALDERS/ConfirmRelease' | |
338 | version: '6.010' | |
339 | - | |
340 | class: Dist::Zilla::Plugin::UploadToCPAN | |
341 | name: '@Author::OALDERS/UploadToCPAN' | |
342 | version: '6.010' | |
343 | - | |
344 | class: Dist::Zilla::Plugin::RewriteVersion::Transitional | |
345 | config: | |
346 | Dist::Zilla::Plugin::RewriteVersion: | |
347 | add_tarball_name: 0 | |
348 | finders: | |
349 | - ':ExecFiles' | |
350 | - ':InstallModules' | |
351 | global: 0 | |
352 | skip_version_provider: 0 | |
353 | Dist::Zilla::Plugin::RewriteVersion::Transitional: {} | |
354 | name: '@Author::OALDERS/@Git::VersionManager/RewriteVersion::Transitional' | |
355 | version: '0.008' | |
356 | - | |
357 | class: Dist::Zilla::Plugin::MetaProvides::Update | |
358 | name: '@Author::OALDERS/@Git::VersionManager/MetaProvides::Update' | |
359 | version: '0.003' | |
360 | - | |
361 | class: Dist::Zilla::Plugin::CopyFilesFromRelease | |
362 | config: | |
363 | Dist::Zilla::Plugin::CopyFilesFromRelease: | |
364 | filename: | |
365 | - Changes | |
366 | match: [] | |
367 | name: '@Author::OALDERS/@Git::VersionManager/CopyFilesFromRelease' | |
368 | version: '0.006' | |
369 | - | |
370 | class: Dist::Zilla::Plugin::Git::Commit | |
371 | config: | |
372 | Dist::Zilla::Plugin::Git::Commit: | |
373 | add_files_in: [] | |
374 | commit_msg: v%v%n%n%c | |
375 | Dist::Zilla::Role::Git::DirtyFiles: | |
376 | allow_dirty: | |
377 | - Changes | |
378 | - Install | |
379 | - LICENSE | |
380 | - META.json | |
381 | - Makefile.PL | |
382 | - README.md | |
383 | - cpanfile | |
384 | - dist.ini | |
385 | allow_dirty_match: [] | |
386 | changelog: Changes | |
387 | Dist::Zilla::Role::Git::Repo: | |
388 | git_version: 2.15.1 | |
389 | repo_root: . | |
390 | Dist::Zilla::Role::Git::StringFormatter: | |
391 | time_zone: local | |
392 | name: '@Author::OALDERS/@Git::VersionManager/release snapshot' | |
393 | version: '2.043' | |
394 | - | |
395 | class: Dist::Zilla::Plugin::Git::Tag | |
396 | config: | |
397 | Dist::Zilla::Plugin::Git::Tag: | |
398 | branch: ~ | |
399 | changelog: Changes | |
400 | signed: 0 | |
401 | tag: v3.16 | |
402 | tag_format: v%v | |
403 | tag_message: v%v | |
404 | Dist::Zilla::Role::Git::Repo: | |
405 | git_version: 2.15.1 | |
406 | repo_root: . | |
407 | Dist::Zilla::Role::Git::StringFormatter: | |
408 | time_zone: local | |
409 | name: '@Author::OALDERS/@Git::VersionManager/Git::Tag' | |
410 | version: '2.043' | |
411 | - | |
412 | class: Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional | |
413 | config: | |
414 | Dist::Zilla::Plugin::BumpVersionAfterRelease: | |
415 | finders: | |
416 | - ':ExecFiles' | |
417 | - ':InstallModules' | |
418 | global: 0 | |
419 | munge_makefile_pl: 1 | |
420 | Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional: {} | |
421 | name: '@Author::OALDERS/@Git::VersionManager/BumpVersionAfterRelease::Transitional' | |
422 | version: '0.008' | |
423 | - | |
424 | class: Dist::Zilla::Plugin::NextRelease | |
425 | name: '@Author::OALDERS/@Git::VersionManager/NextRelease' | |
426 | version: '6.010' | |
427 | - | |
428 | class: Dist::Zilla::Plugin::Git::Commit | |
429 | config: | |
430 | Dist::Zilla::Plugin::Git::Commit: | |
431 | add_files_in: [] | |
432 | commit_msg: 'increment $VERSION after %v release' | |
433 | Dist::Zilla::Role::Git::DirtyFiles: | |
434 | allow_dirty: | |
435 | - Build.PL | |
436 | - Changes | |
437 | - Makefile.PL | |
438 | allow_dirty_match: | |
439 | - (?^:^lib/.*\.pm$) | |
440 | changelog: Changes | |
441 | Dist::Zilla::Role::Git::Repo: | |
442 | git_version: 2.15.1 | |
443 | repo_root: . | |
444 | Dist::Zilla::Role::Git::StringFormatter: | |
445 | time_zone: local | |
446 | name: '@Author::OALDERS/@Git::VersionManager/post-release commit' | |
447 | version: '2.043' | |
448 | - | |
449 | class: Dist::Zilla::Plugin::Prereqs | |
450 | config: | |
451 | Dist::Zilla::Plugin::Prereqs: | |
452 | phase: develop | |
453 | type: suggests | |
454 | name: '@Author::OALDERS/@Git::VersionManager/prereqs for @Git::VersionManager' | |
455 | version: '6.010' | |
456 | - | |
457 | class: Dist::Zilla::Plugin::Git::Push | |
458 | config: | |
459 | Dist::Zilla::Plugin::Git::Push: | |
460 | push_to: | |
461 | - origin | |
462 | remotes_must_exist: 1 | |
463 | Dist::Zilla::Role::Git::Repo: | |
464 | git_version: 2.15.1 | |
465 | repo_root: . | |
466 | name: '@Author::OALDERS/Git::Push' | |
467 | version: '2.043' | |
468 | - | |
469 | class: Dist::Zilla::Plugin::FinderCode | |
470 | name: ':InstallModules' | |
471 | version: '6.010' | |
472 | - | |
473 | class: Dist::Zilla::Plugin::FinderCode | |
474 | name: ':IncModules' | |
475 | version: '6.010' | |
476 | - | |
477 | class: Dist::Zilla::Plugin::FinderCode | |
478 | name: ':TestFiles' | |
479 | version: '6.010' | |
480 | - | |
481 | class: Dist::Zilla::Plugin::FinderCode | |
482 | name: ':ExtraTestFiles' | |
483 | version: '6.010' | |
484 | - | |
485 | class: Dist::Zilla::Plugin::FinderCode | |
486 | name: ':ExecFiles' | |
487 | version: '6.010' | |
488 | - | |
489 | class: Dist::Zilla::Plugin::FinderCode | |
490 | name: ':PerlExecFiles' | |
491 | version: '6.010' | |
492 | - | |
493 | class: Dist::Zilla::Plugin::FinderCode | |
494 | name: ':ShareFiles' | |
495 | version: '6.010' | |
496 | - | |
497 | class: Dist::Zilla::Plugin::FinderCode | |
498 | name: ':MainModule' | |
499 | version: '6.010' | |
500 | - | |
501 | class: Dist::Zilla::Plugin::FinderCode | |
502 | name: ':AllFiles' | |
503 | version: '6.010' | |
504 | - | |
505 | class: Dist::Zilla::Plugin::FinderCode | |
506 | name: ':NoFiles' | |
507 | version: '6.010' | |
508 | zilla: | |
509 | class: Dist::Zilla::Dist::Builder | |
510 | config: | |
511 | is_trial: '0' | |
512 | version: '6.010' | |
35 | 513 | x_contributors: |
36 | 514 | - 'Andrew Moise <andrew.moise@gmail.com>' |
37 | 515 | - 'Aran Deltac <bluefeet@gmail.com>' |
61 | 539 | - 'Uwe <uwe@uwevoelker.de>' |
62 | 540 | - 'vti <viacheslav.t@gmail.com>' |
63 | 541 | - 'yeahoffline <frank.gasser@gmail.com>' |
542 | x_serialization_backend: 'YAML::Tiny version 1.70' |
0 | # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.047. | |
0 | # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010. | |
1 | 1 | use strict; |
2 | 2 | use warnings; |
3 | 3 | |
8 | 8 | my %WriteMakefileArgs = ( |
9 | 9 | "ABSTRACT" => "Determine Web browser, version, and platform from an HTTP user agent string", |
10 | 10 | "AUTHOR" => "Lee Semel <lee\@semel.net>, Peter Walsham, Olaf Alders <olaf\@wundercounter.com> (current maintainer)", |
11 | "BUILD_REQUIRES" => { | |
12 | "Module::Build" => "0.28" | |
13 | }, | |
14 | 11 | "CONFIGURE_REQUIRES" => { |
15 | "ExtUtils::MakeMaker" => 0, | |
16 | "Module::Build" => "0.28" | |
12 | "ExtUtils::MakeMaker" => 0 | |
17 | 13 | }, |
18 | 14 | "DISTNAME" => "HTTP-BrowserDetect", |
19 | 15 | "LICENSE" => "perl", |
25 | 21 | "warnings" => 0 |
26 | 22 | }, |
27 | 23 | "TEST_REQUIRES" => { |
24 | "ExtUtils::MakeMaker" => 0, | |
25 | "File::Spec" => 0, | |
28 | 26 | "FindBin" => 0, |
29 | 27 | "JSON::PP" => 0, |
28 | "List::Util" => "1.49", | |
30 | 29 | "Path::Tiny" => 0, |
31 | 30 | "Test::FailWarnings" => 0, |
32 | 31 | "Test::More" => 0, |
33 | 32 | "Test::Most" => 0, |
34 | 33 | "Test::NoWarnings" => 0 |
35 | 34 | }, |
36 | "VERSION" => "3.14", | |
35 | "VERSION" => "3.16", | |
37 | 36 | "test" => { |
38 | 37 | "TESTS" => "t/*.t" |
39 | 38 | } |
41 | 40 | |
42 | 41 | |
43 | 42 | my %FallbackPrereqs = ( |
43 | "ExtUtils::MakeMaker" => 0, | |
44 | "File::Spec" => 0, | |
44 | 45 | "FindBin" => 0, |
45 | 46 | "JSON::PP" => 0, |
46 | "Module::Build" => "0.28", | |
47 | "List::Util" => "1.49", | |
47 | 48 | "Path::Tiny" => 0, |
48 | 49 | "Test::FailWarnings" => 0, |
49 | 50 | "Test::More" => 0, |
0 | # NAME | |
1 | ||
2 | HTTP::BrowserDetect - Determine Web browser, version, and platform from an HTTP user agent string | |
3 | ||
4 | # VERSION | |
5 | ||
6 | version 3.16 | |
7 | ||
8 | # SYNOPSIS | |
9 | ||
10 | use HTTP::BrowserDetect; | |
11 | ||
12 | my $user_agent_string | |
13 | = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'; | |
14 | my $ua = HTTP::BrowserDetect->new($user_agent_string); | |
15 | ||
16 | # Print general information | |
17 | print "Browser: $ua->browser_string\n" | |
18 | if $ua->browser_string; | |
19 | print "Version: $ua->browser_version$ua->browser_beta\n" | |
20 | if $ua->browser_version; | |
21 | print "OS: $ua->os_string\n" | |
22 | if $ua->os_string; | |
23 | ||
24 | # Detect operating system | |
25 | if ( $ua->windows ) { | |
26 | if ( $ua->winnt ) { | |
27 | # do something | |
28 | } | |
29 | if ( $ua->win95 ) { | |
30 | # do something | |
31 | } | |
32 | } | |
33 | print "Mac\n" if $ua->macosx; | |
34 | ||
35 | # Detect browser vendor and version | |
36 | print "Safari\n" if $ua->safari; | |
37 | print "MSIE\n" if $ua->ie; | |
38 | print "Mobile\n" if $ua->mobile; | |
39 | if ( $ua->browser_major(4) ) { | |
40 | if ( $ua->browser_minor() > .5 ) { | |
41 | # ...; | |
42 | } | |
43 | } | |
44 | if ( $ua->browser_version() > 4.5 ) { | |
45 | # ...; | |
46 | } | |
47 | ||
48 | # DESCRIPTION | |
49 | ||
50 | The HTTP::BrowserDetect object does a number of tests on an HTTP user agent | |
51 | string. The results of these tests are available via methods of the object. | |
52 | ||
53 | For an online demonstration of this module's parsing, you can check out | |
54 | [http://www.browserdetect.org/](http://www.browserdetect.org/) | |
55 | ||
56 | This module was originally based upon the JavaScript browser detection | |
57 | code available at | |
58 | [http://www.mozilla.org/docs/web-developer/sniffer/browser\_type.html](http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html). | |
59 | ||
60 | # CONSTRUCTOR AND STARTUP | |
61 | ||
62 | ## new() | |
63 | ||
64 | HTTP::BrowserDetect->new( $user_agent_string ) | |
65 | ||
66 | The constructor may be called with a user agent string specified. Otherwise, it | |
67 | will use the value specified by $ENV{'HTTP\_USER\_AGENT'}, which is set by the | |
68 | web server when calling a CGI script. | |
69 | ||
70 | # SUBROUTINES/METHODS | |
71 | ||
72 | # Browser Information | |
73 | ||
74 | ## browser() | |
75 | ||
76 | Returns the browser, as one of the following values: | |
77 | ||
78 | chrome, firefox, ie, opera, safari, adm, applecoremedia, blackberry, | |
79 | brave, browsex, dalvik, elinks, links, lynx, emacs, epiphany, galeon, | |
80 | konqueror, icab, lotusnotes, mosaic, mozilla, netfront, netscape, | |
81 | n3ds, dsi, obigo, polaris, pubsub, realplayer, seamonkey, silk, | |
82 | staroffice, ucbrowser, webtv | |
83 | ||
84 | If the browser could not be identified (either because unrecognized | |
85 | or because it is a robot), returns `undef`. | |
86 | ||
87 | ## browser\_string() | |
88 | ||
89 | Returns a human formatted version of the browser name. These names are | |
90 | subject to change and are meant for display purposes. This may include | |
91 | information additional to what's in browser() (e.g. distinguishing | |
92 | Firefox from Iceweasel). | |
93 | ||
94 | If the user agent could not be identified, or if it was identified as | |
95 | a robot instead, returns `undef`. | |
96 | ||
97 | # Browser Version | |
98 | ||
99 | Please note that that the version(), major() and minor() methods have been | |
100 | deprecated as of release 1.78 of this module. They should be replaced | |
101 | with browser\_version(), browser\_major(), browser\_minor(), and browser\_beta(). | |
102 | ||
103 | The reasoning behind this is that version() method will, in the case of Safari, | |
104 | return the Safari/XXX numbers even when Version/XXX numbers are present in the | |
105 | UserAgent string (i.e. it will return incorrect versions for Safari in | |
106 | some cases). | |
107 | ||
108 | ## browser\_version() | |
109 | ||
110 | Returns the browser version (major and minor) as a string. For | |
111 | example, for Chrome 36.0.1985.67, this returns "36.0". | |
112 | ||
113 | ## browser\_major() | |
114 | ||
115 | Returns the major part of the version as a string. For example, for | |
116 | Chrome 36.0.1985.67, this returns "36". | |
117 | ||
118 | Returns undef if no version information can be detected. | |
119 | ||
120 | ## browser\_minor() | |
121 | ||
122 | Returns the minor part of the version as a string. This includes the | |
123 | decimal point; for example, for Chrome 36.0.1985.67, this returns | |
124 | ".0". | |
125 | ||
126 | Returns undef if no version information can be detected. | |
127 | ||
128 | ## browser\_beta() | |
129 | ||
130 | Returns any part of the version after the major and minor version, as | |
131 | a string. For example, for Chrome 36.0.1985.67, this returns | |
132 | ".1985.67". The beta part of the string can contain any type of | |
133 | alphanumeric characters. | |
134 | ||
135 | Returns undef if no version information can be detected. Returns an | |
136 | empty string if version information is detected but it contains only | |
137 | a major and minor version with nothing following. | |
138 | ||
139 | # Operating System | |
140 | ||
141 | ## os() | |
142 | ||
143 | Returns one of the following strings, or `undef`: | |
144 | ||
145 | windows, winphone, mac, macosx, linux, android, ios, os2, unix, vms, | |
146 | chromeos, firefoxos, ps3, psp, rimtabletos, blackberry, amiga, brew | |
147 | ||
148 | ## os\_string() | |
149 | ||
150 | Returns a human formatted version of the OS name. These names are | |
151 | subject to change and are really meant for display purposes. This may | |
152 | include information additional to what's in os() (e.g. distinguishing | |
153 | various editions of Windows from one another) (although for a way to | |
154 | do that that's more suitable for use in program logic, see below under | |
155 | "OS related properties"). | |
156 | ||
157 | Returns `undef` if no OS information could be detected. | |
158 | ||
159 | ## os\_version(), os\_major(), os\_minor(), os\_beta() | |
160 | ||
161 | Returns version information for the OS, if any could be detected. The | |
162 | format is the same as for the browser\_version() functions. | |
163 | ||
164 | # Mobile Devices | |
165 | ||
166 | ## mobile() | |
167 | ||
168 | Returns true if the browser appears to belong to a mobile phone or | |
169 | similar device (i.e. one small enough that the mobile version of a | |
170 | page is probably preferable over the desktop version). | |
171 | ||
172 | In previous versions, tablet devices sometimes had mobile() return | |
173 | true. They are now mutually exclusive. | |
174 | ||
175 | ## tablet() | |
176 | ||
177 | Returns true if the browser appears to belong to a tablet device. | |
178 | ||
179 | ## device() | |
180 | ||
181 | Returns the type of mobile / tablet hardware, if it can be detected. | |
182 | ||
183 | Currently returns one of: android, audrey, avantgo, blackberry, dsi, iopener, ipad, | |
184 | iphone, ipod, kindle, n3ds, palm, ps3, psp, wap, webos, winphone. | |
185 | ||
186 | Returns `undef` if this is not a tablet/mobile device or no hardware | |
187 | information can be detected. | |
188 | ||
189 | ## device\_string() | |
190 | ||
191 | Returns a human formatted version of the hardware device name. These names are | |
192 | subject to change and are really meant for display purposes. You should use | |
193 | the device() method in your logic. This may include additional | |
194 | information (such as the model of phone if it is detectable). | |
195 | ||
196 | Returns `undef` if this is not a portable device or if no device name | |
197 | can be detected. | |
198 | ||
199 | # Robots | |
200 | ||
201 | ## robot() | |
202 | ||
203 | If the user agent appears to be a robot, spider, crawler, or other | |
204 | automated Web client, this returns one of the following values: | |
205 | ||
206 | lwp, slurp, yahoo, bingbot, msnmobile, msn, msoffice, ahrefs, | |
207 | altavista, apache, askjeeves, baidu, curl, facebook, getright, | |
208 | googleadsbot, googleadsense, googlebotimage, googlebotnews, | |
209 | googlebotvideo, googlefavicon, googlemobile, google, golib, indy, | |
210 | infoseek, ipsagent, linkchecker, linkexchange, lycos, malware, | |
211 | mj12bot, nutch, phplib, puf, rubylib, scooter, specialarchiver, | |
212 | wget, yandexbot, yandeximages, java, unknown | |
213 | ||
214 | Returns "unknown" when the user agent is believed to be a robot but | |
215 | is not identified as one of the above specific robots. | |
216 | ||
217 | Returns `undef` if the user agent is not a robot or cannot be | |
218 | identified. | |
219 | ||
220 | Note that if a robot crafts a user agent designed to impersonate a | |
221 | particular browser, we generally set properties appropriate to both | |
222 | the actual robot, and the browser it is impersonating. For example, | |
223 | googlebot-mobile pretends to be mobile safari so that it will get | |
224 | mobile versions of pages. In this case, browser() will return | |
225 | 'safari', the properties will generally be set as if for Mobile | |
226 | Safari, the 'robot' property will be set, and robot() will return | |
227 | 'googlemobile'. | |
228 | ||
229 | ### lib() | |
230 | ||
231 | Returns true if the user agent appears to be an HTTP library or tool | |
232 | (e.g. LWP, curl, wget, java). Generally libraries are also classified | |
233 | as robots, although it is impossible to tell whether they are being | |
234 | operated by an automated system or a human. | |
235 | ||
236 | ### robot\_string() | |
237 | ||
238 | Returns a human formatted version of the robot name. These names are | |
239 | subject to change and are meant for display purposes. This may include | |
240 | additional information (e.g. robots which return "unknown" from | |
241 | robot() generally can be identified in a human-readable fashion by | |
242 | reading robot\_string() ). | |
243 | ||
244 | ### robot\_id() | |
245 | ||
246 | This method is currently in beta. | |
247 | ||
248 | Returns an id consisting of lower case letters, numbers and dashes. This id | |
249 | will remain constant, so you can use it for matching against a particular | |
250 | robot. The ids were introduced in version 3.14. There may still be a few | |
251 | corrections to ids in subsequent releases. Once this method becomes stable the | |
252 | ids will also be frozen. | |
253 | ||
254 | ### all\_robot\_ids() | |
255 | ||
256 | This method returns an c<ArrayRef> of all possible `robot_id` values. | |
257 | ||
258 | ## robot\_version(), robot\_major(), robot\_minor(), robot\_beta() | |
259 | ||
260 | Returns version information for the robot, if any could be | |
261 | detected. The format is the same as for the browser\_version() | |
262 | functions. | |
263 | ||
264 | Note that if a robot crafts a user agent designed to impersonate a | |
265 | particular browser, we generally return results appropriate to both | |
266 | the actual robot, and the browser it is impersonating. For example, | |
267 | googlebot-mobile pretends to be mobile safari so that it will get | |
268 | mobile versions of pages. In this case, robot\_version() will return | |
269 | the version of googlebot-mobile, and browser\_version() will return the | |
270 | version of Safari that googlebot-mobile is impersonating. | |
271 | ||
272 | # Browser Properties | |
273 | ||
274 | Operating systems, devices, browser names, rendering engines, and | |
275 | true-or-false methods (e.g. "mobile" and "lib") are all browser | |
276 | properties. For example, calling browser\_properties() for Mobile | |
277 | Safari running on an Android will return this list: | |
278 | ||
279 | ('android', 'device', 'mobile', 'mobile\_safari', 'safari', 'webkit') | |
280 | ||
281 | ## browser\_properties() | |
282 | ||
283 | Returns all properties for this user agent, as a list. Note that | |
284 | because a large number of cases must be considered, this will take | |
285 | significantly more time than simply querying the particular methods | |
286 | you care about. | |
287 | ||
288 | A mostly complete list of properties follows (i.e. each of these | |
289 | methods is both a method you can call, and also a property that may | |
290 | be in the list returned by browser\_properties() ). In addition to this | |
291 | list, robot(), lib(), device(), mobile(), and tablet() are all | |
292 | browser properties. | |
293 | ||
294 | ## OS related properties | |
295 | ||
296 | The following methods are available, each returning a true or false value. | |
297 | Some methods also test for the operating system version. The indentations | |
298 | below show the hierarchy of tests (for example, win2k is considered a type of | |
299 | winnt, which is a type of win32) | |
300 | ||
301 | ### windows() | |
302 | ||
303 | win16 win3x win31 | |
304 | win32 | |
305 | winme win95 win98 | |
306 | winnt | |
307 | win2k winxp win2k3 winvista win7 | |
308 | win8 | |
309 | win8_0 win8_1 | |
310 | win10 | |
311 | win10_0 | |
312 | wince | |
313 | winphone | |
314 | winphone7 winphone7_5 winphone8 winphone10 | |
315 | ||
316 | ### dotnet() | |
317 | ||
318 | ### chromeos() | |
319 | ||
320 | ### firefoxos() | |
321 | ||
322 | ### mac() | |
323 | ||
324 | mac68k macppc macosx ios | |
325 | ||
326 | ### os2() | |
327 | ||
328 | ### bb10() | |
329 | ||
330 | ### rimtabletos() | |
331 | ||
332 | ### unix() | |
333 | ||
334 | sun sun4 sun5 suni86 irix irix5 irix6 hpux hpux9 hpux10 | |
335 | aix aix1 aix2 aix3 aix4 linux sco unixware mpras reliant | |
336 | dec sinix freebsd bsd | |
337 | ||
338 | ### vms() | |
339 | ||
340 | ### amiga() | |
341 | ||
342 | ### ps3gameos() | |
343 | ||
344 | ### pspgameos() | |
345 | ||
346 | It may not be possibile to detect Win98 in Netscape 4.x and earlier. On Opera | |
347 | 3.0, the userAgent string includes "Windows 95/NT4" on all Win32, so you can't | |
348 | distinguish between Win95 and WinNT. | |
349 | ||
350 | ## Browser related properties | |
351 | ||
352 | The following methods are available, each returning a true or false value. | |
353 | Some methods also test for the browser version, saving you from checking the | |
354 | version separately. | |
355 | ||
356 | ### adm | |
357 | ||
358 | ### aol aol3 aol4 aol5 aol6 | |
359 | ||
360 | ### applecoremedia | |
361 | ||
362 | ### avantgo | |
363 | ||
364 | ### browsex | |
365 | ||
366 | ### chrome | |
367 | ||
368 | ### dalvik | |
369 | ||
370 | ### emacs | |
371 | ||
372 | ### epiphany | |
373 | ||
374 | ### firefox | |
375 | ||
376 | ### galeon | |
377 | ||
378 | ### icab | |
379 | ||
380 | ### ie ie3 ie4 ie4up ie5 ie5up ie55 ie55up ie6 ie7 ie8 ie9 ie10 ie11 | |
381 | ||
382 | ### ie\_compat\_mode | |
383 | ||
384 | The ie\_compat\_mode is used to determine if the IE user agent is for | |
385 | the compatibility mode view, in which case the real version of IE is | |
386 | higher than that detected. The true version of IE can be inferred from | |
387 | the version of Trident in the engine\_version method. | |
388 | ||
389 | ### konqueror | |
390 | ||
391 | ### lotusnotes | |
392 | ||
393 | ### lynx links elinks | |
394 | ||
395 | ### mobile\_safari | |
396 | ||
397 | ### mosaic | |
398 | ||
399 | ### mozilla | |
400 | ||
401 | ### neoplanet neoplanet2 | |
402 | ||
403 | ### netfront | |
404 | ||
405 | ### netscape nav2 nav3 nav4 nav4up nav45 nav45up navgold nav6 nav6up | |
406 | ||
407 | ### obigo | |
408 | ||
409 | ### opera opera3 opera4 opera5 opera6 opera7 | |
410 | ||
411 | ### polaris | |
412 | ||
413 | ### pubsub | |
414 | ||
415 | ### realplayer | |
416 | ||
417 | The realplayer method above tests for the presence of either the RealPlayer | |
418 | plug-in "(r1 " or the browser "RealPlayer". | |
419 | ||
420 | ### realplayer\_browser | |
421 | ||
422 | The realplayer\_browser method tests for the presence of the RealPlayer | |
423 | browser (but returns 0 for the plugin). | |
424 | ||
425 | ### safari | |
426 | ||
427 | ### seamonkey | |
428 | ||
429 | ### silk | |
430 | ||
431 | ### staroffice | |
432 | ||
433 | ### ucbrowser | |
434 | ||
435 | ### webtv | |
436 | ||
437 | Netscape 6, even though it's called six, in the User-Agent string has version | |
438 | number 5. The nav6 and nav6up methods correctly handle this quirk. The Firefox | |
439 | test correctly detects the older-named versions of the browser (Phoenix, | |
440 | Firebird). | |
441 | ||
442 | ## Device related properties | |
443 | ||
444 | The following methods are available, each returning a true or false value. | |
445 | ||
446 | ### android | |
447 | ||
448 | ### audrey | |
449 | ||
450 | ### avantgo | |
451 | ||
452 | ### blackberry | |
453 | ||
454 | ### dsi | |
455 | ||
456 | ### iopener | |
457 | ||
458 | ### iphone | |
459 | ||
460 | ### ipod | |
461 | ||
462 | ### ipad | |
463 | ||
464 | ### kindle | |
465 | ||
466 | ### kindlefire | |
467 | ||
468 | ### n3ds | |
469 | ||
470 | ### palm | |
471 | ||
472 | ### webos | |
473 | ||
474 | ### wap | |
475 | ||
476 | Note that 'wap' indicates that the device is capable of WAP, not | |
477 | necessarily that the device is limited to WAP only. Most modern WAP | |
478 | devices are also capable of rendering standard HTML. | |
479 | ||
480 | ### psp | |
481 | ||
482 | ### ps3 | |
483 | ||
484 | ## Robot properties | |
485 | ||
486 | These methods are now deprecated and will be removed in a future release. | |
487 | Please use the `robot()` and `robot_id()` methods to identify the bots. Use | |
488 | `robot_id()` if you need to match on a string, since the value that is | |
489 | returned by `robot` could possibly change in a future release. | |
490 | ||
491 | The following additional methods are available, each returning a true or false | |
492 | value. This is by no means a complete list of robots that exist on the Web. | |
493 | ||
494 | ### ahrefs | |
495 | ||
496 | ### altavista | |
497 | ||
498 | ### apache | |
499 | ||
500 | ### askjeeves | |
501 | ||
502 | ### baidu | |
503 | ||
504 | ### bingbot | |
505 | ||
506 | ### curl | |
507 | ||
508 | ||
509 | ||
510 | ### getright | |
511 | ||
512 | ### golib | |
513 | ||
514 | ||
515 | ||
516 | ### googleadsbot | |
517 | ||
518 | ### googleadsense | |
519 | ||
520 | ### googlemobile | |
521 | ||
522 | ### indy | |
523 | ||
524 | ### infoseek | |
525 | ||
526 | ### ipsagent | |
527 | ||
528 | ### java | |
529 | ||
530 | ### linkexchange | |
531 | ||
532 | ### lwp | |
533 | ||
534 | ### lycos | |
535 | ||
536 | ### malware | |
537 | ||
538 | ### mj12bot | |
539 | ||
540 | ### msn | |
541 | ||
542 | ### msoffice | |
543 | ||
544 | ### puf | |
545 | ||
546 | ### rubylib | |
547 | ||
548 | ### slurp | |
549 | ||
550 | ### wget | |
551 | ||
552 | ### yahoo | |
553 | ||
554 | ### yandex | |
555 | ||
556 | ### yandeximages | |
557 | ||
558 | ## Engine properties | |
559 | ||
560 | The following properties indicate if a particular rendering engine is | |
561 | being used. | |
562 | ||
563 | ### webkit | |
564 | ||
565 | ### gecko | |
566 | ||
567 | ### trident | |
568 | ||
569 | ### presto | |
570 | ||
571 | ### khtml | |
572 | ||
573 | # Other methods | |
574 | ||
575 | ## user\_agent() | |
576 | ||
577 | Returns the value of the user agent string. | |
578 | ||
579 | Calling this method with a parameter to set the user agent has now | |
580 | been removed; please use HTTP::BrowserDetect->new() to pass the user | |
581 | agent string. | |
582 | ||
583 | ## country() | |
584 | ||
585 | Returns the country string as it may be found in the user agent string. This | |
586 | will be in the form of an upper case 2 character code. ie: US, DE, etc | |
587 | ||
588 | ## language() | |
589 | ||
590 | Returns the language string as it is found in the user agent string. This will | |
591 | be in the form of an upper case 2 character code. ie: EN, DE, etc | |
592 | ||
593 | ## engine() | |
594 | ||
595 | Returns the rendering engine, one of the following: | |
596 | ||
597 | gecko, webkit, khtml, trident, ie, presto, netfront | |
598 | ||
599 | Note that this returns "webkit" for webkit based browsers (including | |
600 | Chrome/Blink). This is a change from previous versions of this | |
601 | library, which returned "KHTML" for webkit. | |
602 | ||
603 | Returns `undef` if none of the above rendering engines can be | |
604 | detected. | |
605 | ||
606 | ## engine\_string() | |
607 | ||
608 | Returns a human formatted version of the rendering engine. | |
609 | ||
610 | Note that this returns "WebKit" for webkit based browsers (including | |
611 | Chrome/Blink). This is a change from previous versions of this | |
612 | library, which returned "KHTML" for webkit. | |
613 | ||
614 | Returns `undef` if none of the known rendering engines can be | |
615 | detected. | |
616 | ||
617 | ## engine\_version(), engine\_major(), engine\_minor(), engine\_beta() | |
618 | ||
619 | Returns version information for the rendering engine, if any could be | |
620 | detected. The format is the same as for the browser\_version() | |
621 | functions. | |
622 | ||
623 | # Deprecated methods | |
624 | ||
625 | ## device\_name() | |
626 | ||
627 | Deprecated alternate name for device\_string() | |
628 | ||
629 | ## version() | |
630 | ||
631 | This is probably not what you want. Please use either browser\_version() or | |
632 | engine\_version() instead. | |
633 | ||
634 | Returns the version (major and minor) as a string. | |
635 | ||
636 | This function returns wrong values for some Safari versions, for | |
637 | compatibility with earlier code. browser\_version() returns correct | |
638 | version numbers for Safari. | |
639 | ||
640 | ## major() | |
641 | ||
642 | This is probably not what you want. Please use either browser\_major() | |
643 | or engine\_major() instead. | |
644 | ||
645 | Returns the integer portion of the browser version as a string. | |
646 | ||
647 | This function returns wrong values for some Safari versions, for | |
648 | compatibility with earlier code. browser\_version() returns correct | |
649 | version numbers for Safari. | |
650 | ||
651 | ## minor() | |
652 | ||
653 | This is probably not what you want. Please use either browser\_minor() | |
654 | or engine\_minor() instead. | |
655 | ||
656 | Returns the decimal portion of the browser version as a string. | |
657 | ||
658 | This function returns wrong values for some Safari versions, for | |
659 | compatibility with earlier code. browser\_version() returns correct | |
660 | version numbers for Safari. | |
661 | ||
662 | ## beta() | |
663 | ||
664 | This is probably not what you want. Please use browser\_beta() instead. | |
665 | ||
666 | Returns the beta version, consisting of any characters after the major | |
667 | and minor version number, as a string. | |
668 | ||
669 | This function returns wrong values for some Safari versions, for | |
670 | compatibility with earlier code. browser\_version() returns correct | |
671 | version numbers for Safari. | |
672 | ||
673 | ## public\_version(), public\_major(), public\_minor(), public\_beta() | |
674 | ||
675 | Deprecated. Please use browser\_version() and related functions | |
676 | instead. | |
677 | ||
678 | ## gecko\_version() | |
679 | ||
680 | If a Gecko rendering engine is used (as in Mozilla or Firefox), returns the | |
681 | engine version. If no Gecko browser is being used, or the version | |
682 | number can't be detected, returns undef. | |
683 | ||
684 | This is an old function, preserved for compatibility; please use | |
685 | engine\_version() in new code. | |
686 | ||
687 | # CREDITS | |
688 | ||
689 | Lee Semel, lee@semel.net (Original Author) | |
690 | ||
691 | Peter Walsham (co-maintainer) | |
692 | ||
693 | Olaf Alders, `olaf at wundercounter.com` (co-maintainer) | |
694 | ||
695 | # ACKNOWLEDGEMENTS | |
696 | ||
697 | Thanks to the following for their contributions: | |
698 | ||
699 | cho45 | |
700 | ||
701 | Leonardo Herrera | |
702 | ||
703 | Denis F. Latypoff | |
704 | ||
705 | merlynkline | |
706 | ||
707 | Simon Waters | |
708 | ||
709 | Toni Cebrin | |
710 | ||
711 | Florian Merges | |
712 | ||
713 | david.hilton.p | |
714 | ||
715 | Steve Purkis | |
716 | ||
717 | Andrew McGregor | |
718 | ||
719 | Robin Smidsrod | |
720 | ||
721 | Richard Noble | |
722 | ||
723 | Josh Ritter | |
724 | ||
725 | Mike Clarke | |
726 | ||
727 | Marc Sebastian Pelzer | |
728 | ||
729 | Alexey Surikov | |
730 | ||
731 | Maros Kollar | |
732 | ||
733 | Jay Rifkin | |
734 | ||
735 | Luke Saunders | |
736 | ||
737 | Jacob Rask | |
738 | ||
739 | Heiko Weber | |
740 | ||
741 | Jon Jensen | |
742 | ||
743 | Jesse Thompson | |
744 | ||
745 | Graham Barr | |
746 | ||
747 | Enrico Sorcinelli | |
748 | ||
749 | Olivier Bilodeau | |
750 | ||
751 | Yoshiki Kurihara | |
752 | ||
753 | Paul Findlay | |
754 | ||
755 | Uwe Voelker | |
756 | ||
757 | Douglas Christopher Wilson | |
758 | ||
759 | John Oatis | |
760 | ||
761 | Atsushi Kato | |
762 | ||
763 | Ronald J. Kimball | |
764 | ||
765 | Bill Rhodes | |
766 | ||
767 | Thom Blake | |
768 | ||
769 | Aran Deltac | |
770 | ||
771 | yeahoffline | |
772 | ||
773 | David Ihnen | |
774 | ||
775 | Hao Wu | |
776 | ||
777 | Perlover | |
778 | ||
779 | Daniel Stadie | |
780 | ||
781 | ben hengst | |
782 | ||
783 | Andrew Moise | |
784 | ||
785 | Atsushi Kato | |
786 | ||
787 | Marco Fontani | |
788 | ||
789 | Nicolas Doye | |
790 | ||
791 | # TO DO | |
792 | ||
793 | POD coverage is not 100%. | |
794 | ||
795 | # SEE ALSO | |
796 | ||
797 | "Browser ID (User-Agent) Strings", [http://www.zytrax.com/tech/web/browser\_ids.htm](http://www.zytrax.com/tech/web/browser_ids.htm) | |
798 | ||
799 | [HTML::ParseBrowser](https://metacpan.org/pod/HTML::ParseBrowser). | |
800 | ||
801 | # | |
802 | ||
803 | # SUPPORT | |
804 | ||
805 | You can find documentation for this module with the perldoc command. | |
806 | ||
807 | perldoc HTTP::BrowserDetect | |
808 | ||
809 | You can also look for information at: | |
810 | ||
811 | - GitHub Source Repository | |
812 | ||
813 | [http://github.com/oalders/http-browserdetect](http://github.com/oalders/http-browserdetect) | |
814 | ||
815 | - Reporting Issues | |
816 | ||
817 | [https://github.com/oalders/http-browserdetect/issues](https://github.com/oalders/http-browserdetect/issues) | |
818 | ||
819 | - AnnoCPAN: Annotated CPAN documentation | |
820 | ||
821 | [http://annocpan.org/dist/HTTP-BrowserDetect](http://annocpan.org/dist/HTTP-BrowserDetect) | |
822 | ||
823 | - CPAN Ratings | |
824 | ||
825 | [http://cpanratings.perl.org/d/HTTP-BrowserDetect](http://cpanratings.perl.org/d/HTTP-BrowserDetect) | |
826 | ||
827 | - Search CPAN | |
828 | ||
829 | [https://metacpan.org/module/HTTP::BrowserDetect](https://metacpan.org/module/HTTP::BrowserDetect) | |
830 | ||
831 | # BUGS AND LIMITATIONS | |
832 | ||
833 | The biggest limitation at this point is the test suite, which really needs to | |
834 | have many more UserAgent strings to test against. | |
835 | ||
836 | # CONTRIBUTING | |
837 | ||
838 | Patches are certainly welcome, with many thanks for the excellent contributions | |
839 | which have already been received. The preferred method of patching would be to | |
840 | fork the GitHub repo and then send me a pull request, but plain old patch files | |
841 | are also welcome. | |
842 | ||
843 | If you're able to add test cases, this will speed up the time to release your | |
844 | changes. Just edit t/useragents.json so that the test coverage includes any | |
845 | changes you have made. Please contact me if you have any questions. | |
846 | ||
847 | This distribution uses [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla). If you're not familiar with this module, | |
848 | please see [https://github.com/oalders/http-browserdetect/issues/5](https://github.com/oalders/http-browserdetect/issues/5) for some | |
849 | helpful tips to get you started. | |
850 | ||
851 | # AUTHORS | |
852 | ||
853 | - Lee Semel <lee@semel.net> | |
854 | - Peter Walsham | |
855 | - Olaf Alders <olaf@wundercounter.com> (current maintainer) | |
856 | ||
857 | # COPYRIGHT AND LICENSE | |
858 | ||
859 | This software is copyright (c) 2017 by Lee Semel. | |
860 | ||
861 | This is free software; you can redistribute it and/or modify it under | |
862 | the same terms as the Perl 5 programming language system itself. |
2 | 2 | requires "vars" => "0"; |
3 | 3 | requires "warnings" => "0"; |
4 | 4 | |
5 | on 'build' => sub { | |
6 | requires "Module::Build" => "0.28"; | |
7 | }; | |
8 | ||
9 | 5 | on 'test' => sub { |
6 | requires "ExtUtils::MakeMaker" => "0"; | |
7 | requires "File::Spec" => "0"; | |
10 | 8 | requires "FindBin" => "0"; |
11 | 9 | requires "JSON::PP" => "0"; |
10 | requires "List::Util" => "1.49"; | |
12 | 11 | requires "Path::Tiny" => "0"; |
13 | 12 | requires "Test::FailWarnings" => "0"; |
14 | 13 | requires "Test::More" => "0"; |
16 | 15 | requires "Test::NoWarnings" => "0"; |
17 | 16 | }; |
18 | 17 | |
18 | on 'test' => sub { | |
19 | recommends "CPAN::Meta" => "2.120900"; | |
20 | }; | |
21 | ||
19 | 22 | on 'configure' => sub { |
20 | 23 | requires "ExtUtils::MakeMaker" => "0"; |
21 | requires "Module::Build" => "0.28"; | |
22 | 24 | }; |
23 | 25 | |
24 | 26 | on 'configure' => sub { |
27 | 29 | |
28 | 30 | on 'develop' => sub { |
29 | 31 | requires "Test::CPAN::Changes" => "0.19"; |
30 | requires "Test::Code::TidyAll" => "0.24"; | |
31 | requires "Test::More" => "0.88"; | |
32 | requires "Test::Code::TidyAll" => "0.50"; | |
33 | requires "Test::More" => "0.96"; | |
34 | requires "Test::Synopsis" => "0"; | |
32 | 35 | }; |
36 | ||
37 | on 'develop' => sub { | |
38 | suggests "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" => "0.004"; | |
39 | suggests "Dist::Zilla::Plugin::CopyFilesFromRelease" => "0"; | |
40 | suggests "Dist::Zilla::Plugin::Git::Commit" => "2.020"; | |
41 | suggests "Dist::Zilla::Plugin::Git::Tag" => "0"; | |
42 | suggests "Dist::Zilla::Plugin::NextRelease" => "5.033"; | |
43 | suggests "Dist::Zilla::Plugin::RewriteVersion::Transitional" => "0.004"; | |
44 | }; |
3 | 3 | author = Olaf Alders <olaf@wundercounter.com> (current maintainer) |
4 | 4 | license = Perl_5 |
5 | 5 | copyright_holder = Lee Semel |
6 | copyright_year = 2016 | |
7 | version = 3.14 | |
6 | copyright_year = 2017 | |
8 | 7 | main_module = lib/HTTP/BrowserDetect.pm |
9 | 8 | |
10 | [GatherDir] | |
11 | exclude_filename = cpanfile | |
12 | exclude_filename = README | |
13 | ||
14 | [PruneCruft] | |
15 | [ManifestSkip] | |
16 | [License] | |
17 | [ExtraTests] | |
18 | [ExecDir] | |
19 | [ShareDir] | |
20 | [PkgVersion] | |
21 | ||
22 | [MakeMaker] | |
23 | [Manifest] | |
24 | ||
25 | [TestRelease] | |
26 | [ConfirmRelease] | |
27 | [UploadToCPAN] | |
28 | ||
29 | [MetaResources] | |
30 | [MetaJSON] | |
31 | [MetaYAML] | |
32 | [Bugtracker] | |
33 | web = http://github.com/oalders/%s/issues | |
34 | [GithubMeta] | |
35 | homepage = https://metacpan.org/release/HTTP-BrowserDetect | |
36 | ||
37 | [AutoPrereqs] | |
38 | ||
39 | ;[Test::Perl::Critic] | |
40 | ||
41 | [Test::CPAN::Changes] | |
42 | [Test::TidyAll] | |
43 | [ReadmeFromPod] | |
44 | [InstallGuide] | |
45 | [ModuleBuild] | |
46 | [PodWeaver] | |
47 | [NextRelease] | |
48 | format = %-1v %{yyyy-MM-dd HH:mm:ss VVVV}d | |
49 | ||
50 | [Git::Contributors] | |
51 | [ContributorsFile] | |
52 | ||
53 | [@Git] | |
54 | ||
55 | [CPANFile] | |
56 | [CopyFilesFromBuild] | |
57 | copy = cpanfile | |
58 | copy = README | |
9 | [@Author::OALDERS] | |
10 | -remove = MinimumPerl | |
11 | -remove = Test::Perl::Critic | |
12 | -remove = Test::PodSpelling | |
13 | -remove = PodCoverageTests |
0 | use strict; | |
1 | use warnings; | |
2 | use feature qw( say ); | |
3 | ||
4 | use HTTP::BrowserDetect (); | |
5 | ||
6 | my $ua = shift || die qq{Usage: perl $0 "my UA string"}; | |
7 | my $h = HTTP::BrowserDetect->new($ua); | |
8 | ||
9 | printf "robot: %s\n", $h->robot || q{ }; | |
10 | printf "robot name: %s\n", $h->robot_name || q{ }; | |
11 | printf "robot string %s\n", $h->robot_string || q{ }; | |
12 | printf "robot id: %s\n", $h->robot_id || q{ }; |
3 | 3 | use 5.006; |
4 | 4 | |
5 | 5 | package HTTP::BrowserDetect; |
6 | $HTTP::BrowserDetect::VERSION = '3.14'; | |
6 | ||
7 | our $VERSION = '3.16'; | |
8 | ||
7 | 9 | use vars qw(@ALL_TESTS); |
8 | 10 | |
9 | 11 | # Operating Systems |
116 | 118 | presto khtml edgehtml |
117 | 119 | ); |
118 | 120 | |
119 | our @ROBOT_TESTS = qw( | |
120 | puf curl wget | |
121 | getright robot slurp | |
122 | yahoo mj12bot ahrefs | |
123 | altavista lycos infoseek | |
124 | lwp linkexchange | |
125 | googlemobile msn msnmobile | |
126 | facebook baidu googleadsbot | |
127 | askjeeves googleadsense googlebotvideo | |
128 | googlebotnews googlebotimage google | |
129 | googlefavicon yandeximages specialarchiver | |
130 | yandex java lib | |
131 | indy golib rubylib | |
132 | apache malware phplib | |
133 | msoffice ipsagent nutch | |
134 | linkchecker bingbot | |
121 | # These bot names get turned into methods. Crazy, right? (I don't even think | |
122 | # this is documented anymore.) We'll leave this in place for back compat, but | |
123 | # we won't add any new methods moving forward. | |
124 | ||
125 | my @OLD_ROBOT_TESTS = qw( | |
126 | ahrefs | |
127 | altavista | |
128 | apache | |
129 | askjeeves | |
130 | baidu | |
131 | bingbot | |
132 | curl | |
133 | ||
134 | getright | |
135 | golib | |
136 | ||
137 | googleadsbot | |
138 | googleadsense | |
139 | googlebotimage | |
140 | googlebotnews | |
141 | googlebotvideo | |
142 | googlefavicon | |
143 | googlemobile | |
144 | indy | |
145 | infoseek | |
146 | ipsagent | |
147 | java | |
148 | linkchecker | |
149 | linkexchange | |
150 | lwp | |
151 | lycos | |
152 | malware | |
153 | mj12bot | |
154 | msn | |
155 | msnmobile | |
156 | msoffice | |
157 | nutch | |
158 | phplib | |
159 | puf | |
160 | rubylib | |
161 | slurp | |
162 | specialarchiver | |
163 | wget | |
164 | yahoo | |
165 | yandex | |
166 | yandeximages | |
167 | ); | |
168 | ||
169 | our @ROBOT_TESTS = ( | |
170 | [ 'Applebot', 'apple' ], | |
171 | [ 'baiduspider', 'baidu' ], | |
172 | [ 'bitlybot', 'bitly' ], | |
173 | [ 'developers.google.com//web/snippet', 'google-plus-snippet' ], | |
174 | [ 'Discordbot', 'discordbot' ], | |
175 | [ 'embedly', 'embedly' ], | |
176 | [ 'facebookexternalhit', 'facebook' ], | |
177 | [ 'flipboard', 'flipboard' ], | |
178 | [ 'Google Page Speed', 'google-page-speed' ], | |
179 | [ 'linkedinbot', 'linkedin' ], | |
180 | [ 'nuzzel', 'nuzzel' ], | |
181 | [ 'outbrain', 'outbrain' ], | |
182 | [ 'pinterest/0.', 'pinterest' ], | |
183 | [ 'pinterestbot', 'pinterest' ], | |
184 | [ 'Pro-Sitemaps', 'pro-sitemaps' ], | |
185 | [ 'quora link preview', 'quora-link-preview' ], | |
186 | [ 'Qwantify', 'qwantify' ], | |
187 | [ 'redditbot', 'reddit', ], | |
188 | [ 'rogerbot', 'rogerbot' ], | |
189 | [ 'ShowyouBot', 'showyou' ], | |
190 | [ 'SkypeUriPreview', 'skype-uri-preview' ], | |
191 | [ 'slackbot', 'slack' ], | |
192 | [ 'Swiftbot', 'swiftbot' ], | |
193 | [ 'tumblr', 'tumblr' ], | |
194 | [ 'twitterbot', 'twitter' ], | |
195 | [ 'vkShare', 'vkshare' ], | |
196 | [ 'W3C_Validator', 'w3c-validator' ], | |
197 | [ 'WhatsApp', 'whatsapp' ], | |
135 | 198 | ); |
136 | 199 | |
137 | 200 | our @MISC_TESTS = qw( |
140 | 203 | |
141 | 204 | push @ALL_TESTS, |
142 | 205 | ( |
143 | @OS_TESTS, @WINDOWS_TESTS, | |
144 | @MAC_TESTS, @UNIX_TESTS, | |
145 | @BSD_TESTS, @GAMING_TESTS, | |
146 | @DEVICE_TESTS, @BROWSER_TESTS, | |
147 | @IE_TESTS, @OPERA_TESTS, | |
148 | @AOL_TESTS, @NETSCAPE_TESTS, | |
149 | @FIREFOX_TESTS, @ENGINE_TESTS, | |
150 | @ROBOT_TESTS, @MISC_TESTS, | |
206 | @OS_TESTS, @WINDOWS_TESTS, | |
207 | @MAC_TESTS, @UNIX_TESTS, | |
208 | @BSD_TESTS, @GAMING_TESTS, | |
209 | @DEVICE_TESTS, @BROWSER_TESTS, | |
210 | @IE_TESTS, @OPERA_TESTS, | |
211 | @AOL_TESTS, @NETSCAPE_TESTS, | |
212 | @FIREFOX_TESTS, @ENGINE_TESTS, | |
213 | @OLD_ROBOT_TESTS, @MISC_TESTS, | |
151 | 214 | ); |
152 | 215 | |
153 | sub _all_tests { | |
154 | return @ALL_TESTS; | |
155 | } | |
156 | ||
157 | 216 | # https://support.google.com/webmasters/answer/1061943?hl=en |
158 | 217 | |
159 | 218 | my %ROBOT_NAMES = ( |
160 | ahrefs => 'Ahrefs', | |
161 | altavista => 'AltaVista', | |
162 | apache => 'Apache http client', | |
163 | askjeeves => 'AskJeeves', | |
164 | baidu => 'Baidu Spider', | |
165 | bingbot => 'Bingbot', | |
219 | ahrefs => 'Ahrefs', | |
220 | altavista => 'AltaVista', | |
221 | 'apache-http-client' => 'Apache HttpClient', | |
222 | apple => 'Apple', | |
223 | 'archive-org' => 'Internet Archive', | |
224 | askjeeves => 'AskJeeves', | |
225 | baidu => 'Baidu', | |
226 | baiduspider => 'Baidu Spider', | |
227 | bingbot => 'Bingbot', | |
228 | bitly => 'Bitly', | |
229 | curl => 'curl', | |
230 | discordbot => 'Discord', | |
231 | embedly => 'Embedly', | |
232 | facebook => 'Facebook', | |
233 | facebookexternalhit => 'Facebook', | |
234 | flipboard => 'Flipboard', | |
235 | getright => 'GetRight', | |
236 | golib => 'Go language http library', | |
237 | google => 'Googlebot', | |
238 | 'google-adsbot' => 'Google AdsBot', | |
239 | 'google-adsense' => 'Google AdSense', | |
240 | 'googlebot' => 'Googlebot', | |
241 | 'googlebot-image' => 'Googlebot Images', | |
242 | 'googlebot-mobile' => 'Googlebot Mobile', | |
243 | 'googlebot-news' => 'Googlebot News', | |
244 | 'googlebot-video' => 'Googlebot Video', | |
245 | 'google-favicon' => 'Google Favicon', | |
246 | 'google-mobile' => 'Googlebot Mobile', | |
247 | 'google-page-speed' => 'Google Page Speed', | |
248 | 'google-plus-snippet' => 'Google+ Snippet', | |
249 | 'indy-library' => 'Indy Library', | |
250 | infoseek => 'InfoSeek', | |
251 | java => 'Java', | |
252 | 'libwww-perl' => 'LWP::UserAgent', | |
253 | linkchecker => 'LinkChecker', | |
254 | linkedin => 'LinkedIn', | |
255 | linkexchange => 'LinkExchange', | |
256 | lycos => 'Lycos', | |
257 | malware => 'Malware / hack attempt', | |
258 | 'microsoft-office' => 'Microsoft Office', | |
259 | mj12bot => 'Majestic-12 DSearch', | |
260 | msn => 'MSN', | |
261 | 'msn-mobile' => 'MSN Mobile', | |
262 | nutch => 'Apache Nutch', | |
263 | nuzzel => 'Nuzzel', | |
264 | outbrain => 'Outbrain', | |
265 | phplib => 'PHP http library', | |
266 | pinterest => 'Pinterest', | |
267 | 'pro-sitemaps' => 'Pro Sitemap Service', | |
268 | puf => 'puf', | |
269 | 'quora-link-preview' => 'Quora Link Preview', | |
270 | qwantify => 'Qwantify', | |
271 | reddit => 'Reddit', | |
272 | robot => 'robot', | |
273 | rogerbot => 'Moz', | |
274 | 'ruby-http-library' => 'Ruby http library', | |
275 | showyou => 'Showyou', | |
276 | 'skype-uri-preview' => 'Skype URI Preview', | |
277 | slack => 'slack', | |
278 | swiftbot => 'Swiftbot', | |
279 | tumblr => 'Tumblr', | |
280 | twitter => 'Twitter', | |
281 | unknown => 'Unknown Bot', | |
282 | 'verisign-ips-agent' => 'Verisign ips-agent', | |
283 | vkshare => 'VK Share', | |
284 | 'w3c-validator' => 'W3C Validator', | |
285 | wget => 'Wget', | |
286 | whatsapp => 'WhatsApp', | |
287 | yahoo => 'Yahoo', | |
288 | 'yahoo-slurp' => 'Yahoo! Slurp', | |
289 | yandex => 'Yandex', | |
290 | 'yandex-images' => 'YandexImages', | |
291 | ); | |
292 | ||
293 | my %ROBOT_IDS = ( | |
294 | ahrefs => 'ahrefs', | |
295 | altavista => 'altavista', | |
296 | apache => 'apache-http-client', | |
297 | askjeeves => 'askjeeves', | |
298 | baidu => 'baidu', | |
299 | baiduspider => 'baidu', | |
300 | bingbot => 'bingbot', | |
166 | 301 | curl => 'curl', |
167 | facebook => 'Facebook', | |
168 | getright => 'GetRight', | |
169 | google => 'Googlebot', | |
170 | googleadsbot => 'Google AdsBot', | |
171 | googleadsense => 'Google AdSense', | |
172 | googlebotimage => 'Googlebot Images', | |
173 | googlebotnews => 'Googlebot News', | |
174 | googlebotvideo => 'Googlebot Video', | |
175 | googlefavicon => 'Google Favicon', | |
176 | googlemobile => 'Googlebot Mobile', | |
177 | golib => 'Go language http library', | |
178 | indy => 'Indy Library', | |
179 | infoseek => 'InfoSeek', | |
180 | ipsagent => 'Verisign ips-agent', | |
181 | java => 'Java', | |
182 | linkchecker => 'LinkChecker', | |
183 | linkexchange => 'LinkExchange', | |
184 | lwp => 'LWP::UserAgent', | |
185 | lycos => 'Lycos', | |
186 | malware => 'Malware / hack attempt', | |
187 | mj12bot => 'Majestic-12 DSearch', | |
188 | msn => 'MSN', | |
189 | msnmobile => 'MSN Mobile', | |
190 | msoffice => 'Microsoft Office', | |
191 | nutch => 'Apache Nutch', | |
192 | phplib => 'PHP http library', | |
302 | facebook => 'facebook', | |
303 | getright => 'getright', | |
304 | golib => 'golib', | |
305 | google => 'googlebot', | |
306 | googleadsbot => 'google-adsbot', | |
307 | googleadsense => 'google-adsense', | |
308 | googlebotimage => 'googlebot-image', | |
309 | googlebotnews => 'googlebot-news', | |
310 | googlebotvideo => 'googlebot-video', | |
311 | googlefavicon => 'google-favicon', | |
312 | googlemobile => 'googlebot-mobile', | |
313 | indy => 'indy-library', | |
314 | infoseek => 'infoseek', | |
315 | ipsagent => 'verisign-ips-agent', | |
316 | java => 'java', | |
317 | linkchecker => 'linkchecker', | |
318 | linkexchange => 'linkexchange', | |
319 | lwp => 'libwww-perl', | |
320 | lycos => 'lycos', | |
321 | malware => 'malware', | |
322 | mj12bot => 'mj12bot', | |
323 | msn => 'msn', | |
324 | msnmobile => 'msn-mobile', | |
325 | msoffice => 'microsoft-office', | |
326 | nutch => 'nutch', | |
327 | phplib => 'phplib', | |
193 | 328 | puf => 'puf', |
194 | 329 | robot => 'robot', |
195 | rubylib => 'Ruby http library', | |
196 | slurp => 'Yahoo! Slurp', | |
197 | specialarchiver => 'archive.org_bot', | |
330 | rubylib => 'ruby-http-library', | |
331 | slurp => 'yahoo-slurp', | |
332 | specialarchiver => 'archive-org', | |
198 | 333 | wget => 'wget', |
199 | yahoo => 'Yahoo', | |
200 | yandex => 'Yandex', | |
201 | yandeximages => 'YandexImages', | |
334 | yahoo => 'yahoo', | |
335 | yandex => 'yandex', | |
336 | yandeximages => 'yandex-images', | |
202 | 337 | ); |
203 | 338 | |
204 | 339 | my %BROWSER_NAMES = ( |
379 | 514 | }; |
380 | 515 | } |
381 | 516 | |
382 | foreach my $test (@ROBOT_TESTS) { | |
517 | foreach my $test (@OLD_ROBOT_TESTS) { | |
383 | 518 | no strict 'refs'; |
384 | 519 | |
385 | 520 | # For the 'robot' test, we return undef instead of 0 if it's |
870 | 1005 | my $browser_tests = $self->{browser_tests}; |
871 | 1006 | |
872 | 1007 | my $robot_tests = $self->{robot_tests} = {}; |
873 | my $r = undef; | |
1008 | my $id; | |
1009 | my $r; | |
874 | 1010 | |
875 | 1011 | my $robot_fragment; # The text that indicates it's a robot (we'll |
876 | 1012 | # use this later to detect robot version, and |
1069 | 1205 | $robot_fragment = 'google'; |
1070 | 1206 | } |
1071 | 1207 | |
1208 | # These @ROBOT_TESTS were added in 3.15. Some of them may need more | |
1209 | # individualized treatment, but get them identified as bots for now. | |
1210 | ||
1211 | # XXX | |
1212 | else { | |
1213 | TEST: | |
1214 | for my $set (@ROBOT_TESTS) { | |
1215 | my $match = lc $set->[0]; | |
1216 | ||
1217 | if ( index( $ua, lc($match) ) != -1 ) { | |
1218 | $id = $set->[1]; | |
1219 | $r = $id; | |
1220 | $robot_fragment = lc $match; | |
1221 | last TEST; | |
1222 | } | |
1223 | } | |
1224 | } | |
1225 | ||
1072 | 1226 | if ( $browser_tests->{applecoremedia} |
1073 | 1227 | || $browser_tests->{dalvik} |
1074 | 1228 | || $browser_tests->{adm} ) { |
1078 | 1232 | if ($r) { |
1079 | 1233 | |
1080 | 1234 | # Got a named robot |
1081 | $robot_tests->{$r} = 1; | |
1082 | $self->{robot_string} = $ROBOT_NAMES{$r}; # Including undef | |
1235 | $robot_tests->{$r} = 1; | |
1236 | if ( !$id ) { | |
1237 | $id = $ROBOT_IDS{$r}; | |
1238 | } | |
1239 | ||
1240 | if ( !exists $robot_tests->{robot_id} ) { | |
1241 | $robot_tests->{robot_id} = $id; | |
1242 | } | |
1243 | ||
1244 | # This isn't all keyed on ids (yet) | |
1245 | $self->{robot_string} = $ROBOT_NAMES{$id} || $ROBOT_NAMES{$r}; | |
1083 | 1246 | $robot_tests->{robot} = $r; |
1084 | 1247 | $robot_fragment = $r if !defined($robot_fragment); |
1085 | 1248 | } |
1112 | 1275 | last; |
1113 | 1276 | } |
1114 | 1277 | } |
1278 | } | |
1279 | ||
1280 | if ( exists $robot_tests->{robot} && $robot_tests->{robot} eq 'unknown' ) | |
1281 | { | |
1282 | $robot_tests->{robot_id} = 'unknown'; | |
1115 | 1283 | } |
1116 | 1284 | |
1117 | 1285 | if ( defined($robot_fragment) ) { |
1133 | 1301 | && $self->{user_agent} =~ m{\/.*\/} |
1134 | 1302 | && $self->{user_agent} =~ m{ |
1135 | 1303 | ([\w]* # Words before fragment |
1136 | $robot_fragment # Match the fragment | |
1137 | (\/[\d\.]+)? # Version | |
1138 | [\w]*) # Beta stuff | |
1139 | }ix | |
1304 | $robot_fragment # Match the fragment | |
1305 | (\/[\d\.]+)? # Version | |
1306 | [\w]*) # Beta stuff | |
1307 | }ix | |
1140 | 1308 | ) { |
1141 | 1309 | # We matched the whole string, but it seems to |
1142 | 1310 | # make more sense as whitespace-separated |
2190 | 2358 | return $self->{browser_string}; |
2191 | 2359 | } |
2192 | 2360 | |
2361 | sub robot { | |
2362 | my $self = shift; | |
2363 | ||
2364 | $self->_init_robots unless exists( $self->{robot_string} ); | |
2365 | return $self->{robot_tests}->{robot}; | |
2366 | } | |
2367 | ||
2193 | 2368 | sub robot_string { |
2194 | 2369 | my $self = shift; |
2195 | 2370 | |
2198 | 2373 | } |
2199 | 2374 | |
2200 | 2375 | sub robot_name { |
2201 | my ($self) = @_; | |
2376 | my $self = shift; | |
2202 | 2377 | return $self->robot_string; |
2378 | } | |
2379 | ||
2380 | sub robot_id { | |
2381 | my $self = shift; | |
2382 | return | |
2383 | $self->{robot_tests}->{robot_id} ? $self->{robot_tests}->{robot_id} | |
2384 | : $self->robot ? $ROBOT_IDS{ $self->robot } | |
2385 | : undef; | |
2203 | 2386 | } |
2204 | 2387 | |
2205 | 2388 | sub _robot_version { |
2696 | 2879 | return sort @browser_properties; |
2697 | 2880 | } |
2698 | 2881 | |
2882 | sub lib { | |
2883 | my $self = shift; | |
2884 | $self->_init_robots() unless $self->{robot_tests}; | |
2885 | return $self->{robot_tests}->{lib}; | |
2886 | } | |
2887 | ||
2888 | sub all_robot_ids { | |
2889 | my $self = shift; | |
2890 | return keys %ROBOT_NAMES; | |
2891 | } | |
2892 | ||
2893 | # These method are only used by the test suite. | |
2894 | sub _all_tests { | |
2895 | return @ALL_TESTS; | |
2896 | } | |
2897 | ||
2898 | sub _robot_names { | |
2899 | return %ROBOT_NAMES; | |
2900 | } | |
2901 | ||
2902 | sub _robot_tests { | |
2903 | return @ROBOT_TESTS; | |
2904 | } | |
2905 | ||
2906 | sub _robot_ids { | |
2907 | return %ROBOT_IDS; | |
2908 | } | |
2909 | ||
2699 | 2910 | 1; |
2700 | 2911 | |
2701 | 2912 | # ABSTRACT: Determine Web browser, version, and platform from an HTTP user agent string |
2712 | 2923 | |
2713 | 2924 | =head1 VERSION |
2714 | 2925 | |
2715 | version 3.14 | |
2926 | version 3.16 | |
2716 | 2927 | |
2717 | 2928 | =head1 SYNOPSIS |
2718 | 2929 | |
2719 | 2930 | use HTTP::BrowserDetect; |
2720 | 2931 | |
2932 | my $user_agent_string | |
2933 | = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'; | |
2721 | 2934 | my $ua = HTTP::BrowserDetect->new($user_agent_string); |
2722 | 2935 | |
2723 | 2936 | # Print general information |
2729 | 2942 | if $ua->os_string; |
2730 | 2943 | |
2731 | 2944 | # Detect operating system |
2732 | if ($ua->windows) { | |
2733 | if ($ua->winnt) ... | |
2734 | if ($ua->win95) ... | |
2945 | if ( $ua->windows ) { | |
2946 | if ( $ua->winnt ) { | |
2947 | # do something | |
2948 | } | |
2949 | if ( $ua->win95 ) { | |
2950 | # do something | |
2951 | } | |
2735 | 2952 | } |
2736 | 2953 | print "Mac\n" if $ua->macosx; |
2737 | 2954 | |
2739 | 2956 | print "Safari\n" if $ua->safari; |
2740 | 2957 | print "MSIE\n" if $ua->ie; |
2741 | 2958 | print "Mobile\n" if $ua->mobile; |
2742 | if ($ua->browser_major(4)) { | |
2743 | if ($ua->browser_minor() > .5) { | |
2744 | ... | |
2745 | } | |
2746 | } | |
2747 | if ($ua->browser_version() > 4.5) { | |
2748 | ...; | |
2959 | if ( $ua->browser_major(4) ) { | |
2960 | if ( $ua->browser_minor() > .5 ) { | |
2961 | # ...; | |
2962 | } | |
2963 | } | |
2964 | if ( $ua->browser_version() > 4.5 ) { | |
2965 | # ...; | |
2749 | 2966 | } |
2750 | 2967 | |
2751 | 2968 | =head1 DESCRIPTION |
2752 | 2969 | |
2753 | 2970 | The HTTP::BrowserDetect object does a number of tests on an HTTP user agent |
2754 | 2971 | string. The results of these tests are available via methods of the object. |
2972 | ||
2973 | For an online demonstration of this module's parsing, you can check out | |
2974 | L<http://www.browserdetect.org/> | |
2755 | 2975 | |
2756 | 2976 | This module was originally based upon the JavaScript browser detection |
2757 | 2977 | code available at |
2940 | 3160 | additional information (e.g. robots which return "unknown" from |
2941 | 3161 | robot() generally can be identified in a human-readable fashion by |
2942 | 3162 | reading robot_string() ). |
3163 | ||
3164 | =head3 robot_id() | |
3165 | ||
3166 | This method is currently in beta. | |
3167 | ||
3168 | Returns an id consisting of lower case letters, numbers and dashes. This id | |
3169 | will remain constant, so you can use it for matching against a particular | |
3170 | robot. The ids were introduced in version 3.14. There may still be a few | |
3171 | corrections to ids in subsequent releases. Once this method becomes stable the | |
3172 | ids will also be frozen. | |
3173 | ||
3174 | =head3 all_robot_ids() | |
3175 | ||
3176 | This method returns an c<ArrayRef> of all possible C<robot_id> values. | |
2943 | 3177 | |
2944 | 3178 | =head2 robot_version(), robot_major(), robot_minor(), robot_beta() |
2945 | 3179 | |
3169 | 3403 | |
3170 | 3404 | =head2 Robot properties |
3171 | 3405 | |
3406 | These methods are now deprecated and will be removed in a future release. | |
3407 | Please use the C<robot()> and C<robot_id()> methods to identify the bots. Use | |
3408 | C<robot_id()> if you need to match on a string, since the value that is | |
3409 | returned by C<robot> could possibly change in a future release. | |
3410 | ||
3172 | 3411 | The following additional methods are available, each returning a true or false |
3173 | 3412 | value. This is by no means a complete list of robots that exist on the Web. |
3174 | 3413 | |
3553 | 3792 | |
3554 | 3793 | =head1 COPYRIGHT AND LICENSE |
3555 | 3794 | |
3556 | This software is copyright (c) 2016 by Lee Semel. | |
3795 | This software is copyright (c) 2017 by Lee Semel. | |
3557 | 3796 | |
3558 | 3797 | This is free software; you can redistribute it and/or modify it under |
3559 | 3798 | the same terms as the Perl 5 programming language system itself. |
0 | severity = 3 | |
1 | verbose = 11 | |
2 | ||
3 | theme = core + pbp + bugs + maintenance + cosmetic + complexity + security + tests + moose | |
4 | ||
5 | exclude = Subroutines::ProhibitCallsToUndeclaredSubs | |
6 | ||
7 | [BuiltinFunctions::ProhibitStringySplit] | |
8 | severity = 3 | |
9 | ||
10 | [CodeLayout::RequireTrailingCommas] | |
11 | severity = 3 | |
12 | ||
13 | [ControlStructures::ProhibitCStyleForLoops] | |
14 | severity = 3 | |
15 | ||
16 | [InputOutput::RequireCheckedSyscalls] | |
17 | functions = :builtins | |
18 | exclude_functions = sleep | |
19 | severity = 3 | |
20 | ||
21 | [Moose::RequireCleanNamespace] | |
22 | modules = Moose Moose::Role MooseX::Role::Parameterized Moose::Util::TypeConstraints | |
23 | cleaners = namespace::autoclean | |
24 | ||
25 | [NamingConventions::Capitalization] | |
26 | package_exemptions = [A-Z]\w+|minFraud | |
27 | file_lexical_variables = [A-Z]\w+|[^A-Z]+ | |
28 | global_variables = :starts_with_upper | |
29 | scoped_lexical_variables = [A-Z]\w+|[^A-Z]+ | |
30 | severity = 3 | |
31 | ||
32 | # Given our code base, leaving this at 5 would be a huge pain | |
33 | [Subroutines::ProhibitManyArgs] | |
34 | max_arguments = 10 | |
35 | ||
36 | [RegularExpressions::ProhibitComplexRegexes] | |
37 | max_characters = 200 | |
38 | ||
39 | [RegularExpressions::ProhibitUnusualDelimiters] | |
40 | severity = 3 | |
41 | ||
42 | [Subroutines::ProhibitUnusedPrivateSubroutines] | |
43 | private_name_regex = _(?!build)\w+ | |
44 | skip_when_using = Moo::Role Moose::Role MooseX::Role::Parameterized Role::Tiny Test::Class::Moose::Role | |
45 | ||
46 | [TestingAndDebugging::ProhibitNoWarnings] | |
47 | allow = redefine | |
48 | ||
49 | [ValuesAndExpressions::ProhibitEmptyQuotes] | |
50 | severity = 3 | |
51 | ||
52 | [ValuesAndExpressions::ProhibitInterpolationOfLiterals] | |
53 | severity = 3 | |
54 | ||
55 | [ValuesAndExpressions::RequireUpperCaseHeredocTerminator] | |
56 | severity = 3 | |
57 | ||
58 | [Variables::ProhibitPackageVars] | |
59 | add_packages = Test::Builder | |
60 | ||
61 | [TestingAndDebugging::RequireUseStrict] | |
62 | ||
63 | [TestingAndDebugging::RequireUseWarnings] | |
64 | ||
65 | [-ControlStructures::ProhibitCascadingIfElse] | |
66 | ||
67 | [-ErrorHandling::RequireCarping] | |
68 | [-InputOutput::RequireBriefOpen] | |
69 | ||
70 | [-ValuesAndExpressions::ProhibitConstantPragma] | |
71 | ||
72 | # No need for /xsm everywhere | |
73 | [-RegularExpressions::RequireDotMatchAnything] | |
74 | [-RegularExpressions::RequireExtendedFormatting] | |
75 | [-RegularExpressions::RequireLineBoundaryMatching] | |
76 | ||
77 | [-Subroutines::ProhibitExplicitReturnUndef] | |
78 | ||
79 | # http://stackoverflow.com/questions/2275317/why-does-perlcritic-dislike-using-shift-to-populate-subroutine-variables | |
80 | [-Subroutines::RequireArgUnpacking] | |
81 | ||
82 | [-Subroutines::RequireFinalReturn] | |
83 | ||
84 | # "use v5.14" is more readable than "use 5.014" | |
85 | [-ValuesAndExpressions::ProhibitVersionStrings] |
0 | --blank-lines-before-packages=0 | |
1 | --iterations=2 | |
2 | --no-outdent-long-comments | |
3 | -b | |
4 | -bar | |
5 | -boc | |
6 | -ci=4 | |
7 | -i=4 | |
8 | -l=78 | |
9 | -nolq | |
10 | -se | |
11 | -wbb="% + - * / x != == >= <= =~ !~ < > | & >= < = **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x=" |
0 | do { my $x = { | |
1 | 'configure' => { | |
2 | 'requires' => { | |
3 | 'ExtUtils::MakeMaker' => '0' | |
4 | }, | |
5 | 'suggests' => { | |
6 | 'JSON::PP' => '2.27300' | |
7 | } | |
8 | }, | |
9 | 'develop' => { | |
10 | 'requires' => { | |
11 | 'Test::CPAN::Changes' => '0.19', | |
12 | 'Test::Code::TidyAll' => '0.50', | |
13 | 'Test::More' => '0.96', | |
14 | 'Test::Synopsis' => '0' | |
15 | }, | |
16 | 'suggests' => { | |
17 | 'Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional' => '0.004', | |
18 | 'Dist::Zilla::Plugin::CopyFilesFromRelease' => '0', | |
19 | 'Dist::Zilla::Plugin::Git::Commit' => '2.020', | |
20 | 'Dist::Zilla::Plugin::Git::Tag' => '0', | |
21 | 'Dist::Zilla::Plugin::NextRelease' => '5.033', | |
22 | 'Dist::Zilla::Plugin::RewriteVersion::Transitional' => '0.004' | |
23 | } | |
24 | }, | |
25 | 'runtime' => { | |
26 | 'requires' => { | |
27 | 'perl' => '5.006', | |
28 | 'strict' => '0', | |
29 | 'vars' => '0', | |
30 | 'warnings' => '0' | |
31 | } | |
32 | }, | |
33 | 'test' => { | |
34 | 'recommends' => { | |
35 | 'CPAN::Meta' => '2.120900' | |
36 | }, | |
37 | 'requires' => { | |
38 | 'ExtUtils::MakeMaker' => '0', | |
39 | 'File::Spec' => '0', | |
40 | 'FindBin' => '0', | |
41 | 'JSON::PP' => '0', | |
42 | 'List::Util' => '1.49', | |
43 | 'Path::Tiny' => '0', | |
44 | 'Test::FailWarnings' => '0', | |
45 | 'Test::More' => '0', | |
46 | 'Test::Most' => '0', | |
47 | 'Test::NoWarnings' => '0' | |
48 | } | |
49 | } | |
50 | }; | |
51 | $x; | |
52 | }⏎ |
0 | #!perl | |
1 | ||
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.027 | |
6 | ||
7 | use Test::More tests => 1; | |
8 | ||
9 | use ExtUtils::MakeMaker; | |
10 | use File::Spec; | |
11 | ||
12 | # from $version::LAX | |
13 | my $lax_version_re = | |
14 | qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | |
15 | | | |
16 | (?:\.[0-9]+) (?:_[0-9]+)? | |
17 | ) | (?: | |
18 | v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | |
19 | | | |
20 | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? | |
21 | ) | |
22 | )/x; | |
23 | ||
24 | # hide optional CPAN::Meta modules from prereq scanner | |
25 | # and check if they are available | |
26 | my $cpan_meta = "CPAN::Meta"; | |
27 | my $cpan_meta_pre = "CPAN::Meta::Prereqs"; | |
28 | my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic | |
29 | ||
30 | # Verify requirements? | |
31 | my $DO_VERIFY_PREREQS = 1; | |
32 | ||
33 | sub _max { | |
34 | my $max = shift; | |
35 | $max = ( $_ > $max ) ? $_ : $max for @_; | |
36 | return $max; | |
37 | } | |
38 | ||
39 | sub _merge_prereqs { | |
40 | my ($collector, $prereqs) = @_; | |
41 | ||
42 | # CPAN::Meta::Prereqs object | |
43 | if (ref $collector eq $cpan_meta_pre) { | |
44 | return $collector->with_merged_prereqs( | |
45 | CPAN::Meta::Prereqs->new( $prereqs ) | |
46 | ); | |
47 | } | |
48 | ||
49 | # Raw hashrefs | |
50 | for my $phase ( keys %$prereqs ) { | |
51 | for my $type ( keys %{ $prereqs->{$phase} } ) { | |
52 | for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { | |
53 | $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; | |
54 | } | |
55 | } | |
56 | } | |
57 | ||
58 | return $collector; | |
59 | } | |
60 | ||
61 | my @include = qw( | |
62 | ||
63 | ); | |
64 | ||
65 | my @exclude = qw( | |
66 | ||
67 | ); | |
68 | ||
69 | # Add static prereqs to the included modules list | |
70 | my $static_prereqs = do './t/00-report-prereqs.dd'; | |
71 | ||
72 | # Merge all prereqs (either with ::Prereqs or a hashref) | |
73 | my $full_prereqs = _merge_prereqs( | |
74 | ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), | |
75 | $static_prereqs | |
76 | ); | |
77 | ||
78 | # Add dynamic prereqs to the included modules list (if we can) | |
79 | my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; | |
80 | my $cpan_meta_error; | |
81 | if ( $source && $HAS_CPAN_META | |
82 | && (my $meta = eval { CPAN::Meta->load_file($source) } ) | |
83 | ) { | |
84 | $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); | |
85 | } | |
86 | else { | |
87 | $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) | |
88 | $source = 'static metadata'; | |
89 | } | |
90 | ||
91 | my @full_reports; | |
92 | my @dep_errors; | |
93 | my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; | |
94 | ||
95 | # Add static includes into a fake section | |
96 | for my $mod (@include) { | |
97 | $req_hash->{other}{modules}{$mod} = 0; | |
98 | } | |
99 | ||
100 | for my $phase ( qw(configure build test runtime develop other) ) { | |
101 | next unless $req_hash->{$phase}; | |
102 | next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); | |
103 | ||
104 | for my $type ( qw(requires recommends suggests conflicts modules) ) { | |
105 | next unless $req_hash->{$phase}{$type}; | |
106 | ||
107 | my $title = ucfirst($phase).' '.ucfirst($type); | |
108 | my @reports = [qw/Module Want Have/]; | |
109 | ||
110 | for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { | |
111 | next if $mod eq 'perl'; | |
112 | next if grep { $_ eq $mod } @exclude; | |
113 | ||
114 | my $file = $mod; | |
115 | $file =~ s{::}{/}g; | |
116 | $file .= ".pm"; | |
117 | my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; | |
118 | ||
119 | my $want = $req_hash->{$phase}{$type}{$mod}; | |
120 | $want = "undef" unless defined $want; | |
121 | $want = "any" if !$want && $want == 0; | |
122 | ||
123 | my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; | |
124 | ||
125 | if ($prefix) { | |
126 | my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); | |
127 | $have = "undef" unless defined $have; | |
128 | push @reports, [$mod, $want, $have]; | |
129 | ||
130 | if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { | |
131 | if ( $have !~ /\A$lax_version_re\z/ ) { | |
132 | push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; | |
133 | } | |
134 | elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { | |
135 | push @dep_errors, "$mod version '$have' is not in required range '$want'"; | |
136 | } | |
137 | } | |
138 | } | |
139 | else { | |
140 | push @reports, [$mod, $want, "missing"]; | |
141 | ||
142 | if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { | |
143 | push @dep_errors, "$mod is not installed ($req_string)"; | |
144 | } | |
145 | } | |
146 | } | |
147 | ||
148 | if ( @reports ) { | |
149 | push @full_reports, "=== $title ===\n\n"; | |
150 | ||
151 | my $ml = _max( map { length $_->[0] } @reports ); | |
152 | my $wl = _max( map { length $_->[1] } @reports ); | |
153 | my $hl = _max( map { length $_->[2] } @reports ); | |
154 | ||
155 | if ($type eq 'modules') { | |
156 | splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; | |
157 | push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; | |
158 | } | |
159 | else { | |
160 | splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; | |
161 | push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; | |
162 | } | |
163 | ||
164 | push @full_reports, "\n"; | |
165 | } | |
166 | } | |
167 | } | |
168 | ||
169 | if ( @full_reports ) { | |
170 | diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; | |
171 | } | |
172 | ||
173 | if ( $cpan_meta_error || @dep_errors ) { | |
174 | diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; | |
175 | } | |
176 | ||
177 | if ( $cpan_meta_error ) { | |
178 | my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; | |
179 | diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; | |
180 | } | |
181 | ||
182 | if ( @dep_errors ) { | |
183 | diag join("\n", | |
184 | "\nThe following REQUIRED prerequisites were not satisfied:\n", | |
185 | @dep_errors, | |
186 | "\n" | |
187 | ); | |
188 | } | |
189 | ||
190 | pass; | |
191 | ||
192 | # vim: ts=4 sts=4 sw=4 et: |
6 | 6 | use Test::FailWarnings; |
7 | 7 | |
8 | 8 | use FindBin; |
9 | use JSON::PP; | |
9 | use JSON::PP (); | |
10 | use List::Util 1.49 qw(uniq); | |
10 | 11 | use Path::Tiny qw( path ); |
11 | 12 | |
12 | 13 | # test that the module loads without errors |
24 | 25 | my $more_tests = JSON::PP->new->ascii->decode($json); |
25 | 26 | $tests = { %$tests, %$more_tests }; |
26 | 27 | |
28 | my @robot_tests = uniq map { $_->[1] } HTTP::BrowserDetect->_robot_tests; | |
29 | ||
30 | my %ids = map { $_ => 1 } HTTP::BrowserDetect->all_robot_ids; | |
31 | ||
27 | 32 | foreach my $ua ( sort ( keys %{$tests} ) ) { |
28 | 33 | |
29 | 34 | my $test = $tests->{$ua}; |
30 | 35 | |
31 | 36 | my $detected = HTTP::BrowserDetect->new($ua); |
32 | diag( $detected->user_agent ); | |
37 | subtest $ua => sub { | |
33 | 38 | |
34 | foreach my $method ( | |
35 | 'browser', 'browser_string', 'browser_beta', | |
36 | 'device', 'device_name', 'device_string', 'device_beta', | |
37 | 'engine', 'engine_string', 'engine_beta', | |
38 | 'language', | |
39 | 'os', 'os_string', 'os_beta', | |
40 | 'robot', 'robot_name', 'robot_string', 'robot_beta', | |
41 | ) { | |
42 | if ( $test->{$method} ) { | |
43 | cmp_ok( | |
44 | $detected->$method, 'eq', $test->{$method}, | |
45 | "$method: $test->{$method}" | |
39 | foreach my $method ( | |
40 | 'browser', 'browser_beta', 'browser_string', 'device', | |
41 | 'device_beta', 'device_name', 'device_string', 'engine', | |
42 | 'engine_beta', 'engine_string', 'language', 'os', 'os_beta', | |
43 | 'os_string', 'robot', 'robot_beta', 'robot_name', 'robot_string', | |
44 | ) { | |
45 | if ( $test->{$method} ) { | |
46 | cmp_ok( | |
47 | $detected->$method || q{}, 'eq', $test->{$method}, | |
48 | "$method: $test->{$method}" | |
49 | ); | |
50 | } | |
51 | } | |
52 | ||
53 | foreach my $method ( | |
54 | qw( | |
55 | os_version | |
56 | os_major | |
57 | os_minor | |
58 | public_version | |
59 | public_major | |
60 | public_minor | |
61 | robot_version | |
62 | robot_major | |
63 | robot_minor | |
64 | version | |
65 | major | |
66 | minor | |
67 | engine_version | |
68 | engine_major | |
69 | engine_minor | |
70 | ios | |
71 | tablet | |
72 | ) | |
73 | ) { | |
74 | ||
75 | if ( exists $test->{$method} | |
76 | and defined $test->{$method} | |
77 | and length $test->{$method} ) { | |
78 | cmp_ok( | |
79 | $detected->$method, '==', $test->{$method}, | |
80 | "$method: $test->{$method}" | |
81 | ); | |
82 | } | |
83 | } | |
84 | ||
85 | foreach my $type ( @{ $test->{match} } ) { | |
86 | ||
87 | # New bots aren't getting added to methods | |
88 | next | |
89 | if List::Util::any { lc($type) eq lc($_) } @robot_tests, | |
90 | 'robot_id'; | |
91 | ok( $detected->can($type), "$type is a method" ); | |
92 | ok( | |
93 | $detected->can($type) && $detected->$type, | |
94 | "$type should match" | |
46 | 95 | ); |
47 | 96 | } |
48 | } | |
49 | 97 | |
98 | # for now, avoid having to add robot_id to a bunch of profiles | |
99 | eq_or_diff( | |
100 | [ | |
101 | sort grep { $_ !~ m{\Arobot_id\z} } | |
102 | $detected->browser_properties() | |
103 | ], | |
104 | [ sort grep { $_ !~ m{\Arobot_id\z} } @{ $test->{match} } ], | |
105 | "browser properties match" | |
106 | ); | |
107 | ||
108 | # Test that $ua doesn't match a specific method | |
109 | foreach my $type ( @{ $test->{no_match} } ) { | |
110 | ok( !$detected->$type, "$type shouldn't match (and doesn't)" ); | |
111 | } | |
112 | ||
113 | if ( $detected->robot ) { | |
114 | if ( $detected->robot_id ) { | |
115 | ok( | |
116 | $ids{ $detected->robot_id }, | |
117 | 'id exists in list: ' . $detected->robot_id | |
118 | ); | |
119 | } | |
120 | else { | |
121 | diag $detected->robot . ' has no id'; | |
122 | } | |
123 | } | |
124 | }; | |
125 | } | |
126 | ||
127 | my $detected = HTTP::BrowserDetect->new('Nonesuch'); | |
128 | ||
129 | subtest $detected->user_agent, sub { | |
50 | 130 | foreach my $method ( |
51 | 131 | qw( |
52 | os_version | |
53 | os_major | |
54 | os_minor | |
55 | public_version | |
56 | public_major | |
57 | public_minor | |
58 | robot_version | |
59 | robot_major | |
60 | robot_minor | |
61 | version | |
62 | major | |
63 | minor | |
132 | engine_string | |
64 | 133 | engine_version |
65 | 134 | engine_major |
66 | 135 | engine_minor |
67 | ios | |
68 | tablet | |
136 | device | |
137 | device_name | |
138 | gecko_version | |
69 | 139 | ) |
70 | 140 | ) { |
71 | ||
72 | if ( exists $test->{$method} | |
73 | and defined $test->{$method} | |
74 | and length $test->{$method} ) { | |
75 | cmp_ok( | |
76 | $detected->$method, '==', $test->{$method}, | |
77 | "$method: $test->{$method}" | |
78 | ); | |
79 | } | |
141 | is_deeply( | |
142 | [ $detected->$method ], | |
143 | [undef], "$method should return undef in list context" | |
144 | ); | |
80 | 145 | } |
81 | ||
82 | foreach my $type ( @{ $test->{match} } ) { | |
83 | ok( $detected->$type, "$type should match" ); | |
84 | } | |
85 | ||
86 | is_deeply( | |
87 | [ sort $detected->browser_properties() ], | |
88 | [ sort @{ $test->{match} } ], | |
89 | "browser properties match" | |
90 | ); | |
91 | ||
92 | # Test that $ua doesn't match a specific method | |
93 | foreach my $type ( @{ $test->{no_match} } ) { | |
94 | ok( !$detected->$type, "$type shouldn't match (and doesn't)" ); | |
95 | } | |
96 | ||
97 | } | |
98 | ||
99 | my $detected = HTTP::BrowserDetect->new('Nonesuch'); | |
100 | diag( $detected->user_agent ); | |
101 | ||
102 | foreach my $method ( | |
103 | qw( | |
104 | engine_string | |
105 | engine_version | |
106 | engine_major | |
107 | engine_minor | |
108 | device | |
109 | device_name | |
110 | gecko_version | |
111 | ) | |
112 | ) { | |
113 | is_deeply( | |
114 | [ $detected->$method ], | |
115 | [undef], "$method should return undef in list context" | |
116 | ); | |
117 | } | |
146 | }; | |
118 | 147 | |
119 | 148 | done_testing(); |
10 | 10 | "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)"); |
11 | 11 | |
12 | 12 | ok( !$browser->language, "no language detected" ); |
13 | diag( $browser->language ); | |
14 | 13 | Test::NoWarnings::had_no_warnings(); |
15 | 14 | done_testing(); |
73 | 73 | |
74 | 74 | my %test_results; |
75 | 75 | |
76 | diag($ua); | |
76 | subtest $ua, sub { | |
77 | for my $i ( 0 .. $N_DETECTS - 1 ) { | |
78 | $detect[$i] = HTTP::BrowserDetect->new($ua); | |
77 | 79 | |
78 | for my $i ( 0 .. $N_DETECTS - 1 ) { | |
79 | $detect[$i] = HTTP::BrowserDetect->new($ua); | |
80 | ||
81 | for my $j ( 1 .. $N_TESTS ) { | |
82 | my $method = $methods[ int( rand(@methods) ) ]; | |
83 | my $result = $detect[$i]->$method; | |
84 | if ( exists( $test_results{$method} ) ) { | |
85 | if ( !defined($result) ) { | |
86 | ok( !defined( $test_results{$method} ), $method ); | |
87 | } | |
88 | elsif ( ref($result) eq 'ARRAY' ) { | |
89 | is_deeply( $result, $test_results{$method}, $method ); | |
80 | for my $j ( 1 .. $N_TESTS ) { | |
81 | my $method = $methods[ int( rand(@methods) ) ]; | |
82 | my $result = $detect[$i]->$method; | |
83 | if ( exists( $test_results{$method} ) ) { | |
84 | if ( !defined($result) ) { | |
85 | ok( !defined( $test_results{$method} ), $method ); | |
86 | } | |
87 | elsif ( ref($result) eq 'ARRAY' ) { | |
88 | is_deeply( $result, $test_results{$method}, $method ); | |
89 | } | |
90 | else { | |
91 | cmp_ok( | |
92 | $result, 'eq', $test_results{$method}, | |
93 | $method | |
94 | ); | |
95 | } | |
90 | 96 | } |
91 | 97 | else { |
92 | cmp_ok( $result, 'eq', $test_results{$method}, $method ); | |
98 | $test_results{$method} = $result; | |
93 | 99 | } |
94 | 100 | } |
95 | else { | |
96 | $test_results{$method} = $result; | |
97 | } | |
98 | 101 | } |
99 | } | |
102 | }; | |
100 | 103 | } |
101 | ||
102 | 104 | done_testing(); |
0 | use strict; | |
1 | use warnings; | |
2 | ||
3 | use HTTP::BrowserDetect (); | |
4 | use List::Util qw(); | |
5 | use Test::Most; | |
6 | ||
7 | my $detect = HTTP::BrowserDetect->new; | |
8 | ||
9 | my %names = $detect->_robot_names; | |
10 | my @ids = $detect->all_robot_ids; | |
11 | my %fixup = $detect->_robot_ids; | |
12 | is( scalar @ids, 72, 'correct number of ids' ); | |
13 | ||
14 | foreach my $id (@ids) { | |
15 | subtest $id => sub { | |
16 | ok( $names{$id}, 'name' ); | |
17 | unlike( | |
18 | $id, qr{[^0-9a-z-]}, | |
19 | 'id contains only lower case letters or dashes' | |
20 | ); | |
21 | }; | |
22 | } | |
23 | ||
24 | my @tests = $detect->_robot_tests; | |
25 | ||
26 | for my $test (@tests) { | |
27 | my $id = $test->[1]; | |
28 | subtest "$id check" => sub { | |
29 | unlike( | |
30 | $id, qr{[^0-9a-z-]}, | |
31 | "$id contains only lower case letters or dashes" | |
32 | ); | |
33 | ok( | |
34 | ( List::Util::any { $_ eq $id } @ids ), | |
35 | "$id found in all_robot_ids()" | |
36 | ); | |
37 | }; | |
38 | } | |
39 | ||
40 | for my $id ( values %fixup ) { | |
41 | ok( $names{$id}, "$id exists in names list" ); | |
42 | } | |
43 | ||
44 | done_testing(); |
21 | 21 | "browser_major" : 0, |
22 | 22 | "browser_minor" : ".0", |
23 | 23 | "match" : [ |
24 | "google", | |
25 | "googleadsbot", | |
24 | 26 | "robot", |
25 | "googleadsbot", | |
26 | "google" | |
27 | "robot_id" | |
27 | 28 | ], |
28 | 29 | "robot" : "googleadsbot", |
29 | 30 | "robot_name" : "Google AdsBot" |
41 | 42 | "mobile", |
42 | 43 | "safari", |
43 | 44 | "robot", |
45 | "robot_id", | |
44 | 46 | "google", |
45 | 47 | "googleadsbot" |
46 | 48 | ], |
70 | 72 | "robot_beta" : ".3", |
71 | 73 | "robot_major" : "4", |
72 | 74 | "robot_minor" : ".2", |
73 | "robot_name" : "Apache http client", | |
75 | "robot_name" : "Apache HttpClient", | |
74 | 76 | "robot_version" : "4.2" |
75 | 77 | }, |
76 | 78 | "Apache-HttpClient/UNAVAILABLE (java 1.4)" : { |
81 | 83 | "robot" |
82 | 84 | ], |
83 | 85 | "robot" : "apache", |
84 | "robot_name" : "Apache http client" | |
86 | "robot_name" : "Apache HttpClient" | |
85 | 87 | }, |
86 | 88 | "Apple-PubSub/28" : { |
87 | 89 | "browser" : "pubsub", |
144 | 146 | "baidu" |
145 | 147 | ], |
146 | 148 | "robot" : "baidu", |
147 | "robot_name" : "Baidu Spider" | |
149 | "robot_name" : "Baidu" | |
148 | 150 | }, |
149 | 151 | "BingLocalSearchBot/1.0" : { |
150 | 152 | "browser_major" : "1", |
10371 | 10373 | "engine_string" : "Gecko", |
10372 | 10374 | "engine_version" : "28.0", |
10373 | 10375 | "match" : [ |
10376 | "firefox", | |
10377 | "flipboard", | |
10378 | "gecko", | |
10374 | 10379 | "mac", |
10375 | 10380 | "macosx", |
10376 | "firefox", | |
10377 | "gecko", | |
10378 | 10381 | "robot" |
10379 | 10382 | ], |
10380 | 10383 | "os" : "macosx", |
10383 | 10386 | "os_minor" : ".9", |
10384 | 10387 | "os_string" : "Mac OS X", |
10385 | 10388 | "os_version" : "10.9", |
10386 | "robot" : "unknown", | |
10389 | "robot" : "flipboard", | |
10387 | 10390 | "robot_beta" : "", |
10388 | 10391 | "robot_major" : "1", |
10389 | 10392 | "robot_minor" : ".1", |
10390 | "robot_string" : "FlipboardProxy", | |
10393 | "robot_string" : "Flipboard", | |
10391 | 10394 | "robot_version" : "1.1" |
10392 | 10395 | }, |
10393 | 10396 | "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10) AppleWebKit/600.2.5 (KHTML, like Gecko) Version/8.0.2 Safari/600.2.5" : { |
10582 | 10585 | "engine_string" : "WebKit", |
10583 | 10586 | "engine_version" : "600.2", |
10584 | 10587 | "match" : [ |
10588 | "apple", | |
10585 | 10589 | "mac", |
10586 | 10590 | "macosx", |
10587 | 10591 | "safari", |
10594 | 10598 | "os_minor" : ".10", |
10595 | 10599 | "os_string" : "Mac OS X", |
10596 | 10600 | "os_version" : "10.10", |
10597 | "robot" : "unknown", | |
10601 | "robot" : "apple", | |
10598 | 10602 | "robot_beta" : "", |
10599 | 10603 | "robot_major" : "0", |
10600 | 10604 | "robot_minor" : ".1", |
10601 | "robot_name" : "Applebot", | |
10605 | "robot_name" : "Apple", | |
10602 | 10606 | "robot_version" : "0.1" |
10603 | 10607 | }, |
10604 | 10608 | "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.76 Safari/537.36" : { |
16415 | 16419 | "robot_beta" : "", |
16416 | 16420 | "robot_major" : "2", |
16417 | 16421 | "robot_minor" : ".0", |
16418 | "robot_name" : "Baidu Spider", | |
16422 | "robot_name" : "Baidu", | |
16419 | 16423 | "robot_version" : "2.0" |
16420 | 16424 | }, |
16421 | 16425 | "Mozilla/5.0 (compatible; Blekkobot; ScoutJet; +http://blekko.com/about/blekkobot)" : { |
19609 | 19613 | "browser_major" : 0, |
19610 | 19614 | "browser_minor" : ".0", |
19611 | 19615 | "match" : [ |
19612 | "robot" | |
19613 | ], | |
19614 | "robot" : "unknown", | |
19615 | "robot_name" : "ShowyouBot" | |
19616 | "robot", | |
19617 | "showyou" | |
19618 | ], | |
19619 | "robot" : "showyou", | |
19620 | "robot_id" : "showyou", | |
19621 | "robot_name" : "Showyou" | |
19616 | 19622 | }, |
19617 | 19623 | "StatsInfo" : { |
19618 | 19624 | "browser_major" : 0, |
19637 | 19643 | "browser_major" : "1", |
19638 | 19644 | "browser_minor" : ".0", |
19639 | 19645 | "match" : [ |
19640 | "robot" | |
19641 | ], | |
19642 | "robot" : "unknown", | |
19646 | "robot", | |
19647 | "twitter" | |
19648 | ], | |
19649 | "robot" : "twitter", | |
19643 | 19650 | "robot_beta" : "", |
19644 | 19651 | "robot_major" : "1", |
19645 | 19652 | "robot_minor" : ".0", |
19646 | "robot_name" : "Twitterbot", | |
19653 | "robot_name" : "Twitter", | |
19647 | 19654 | "robot_version" : "1.0" |
19648 | 19655 | }, |
19649 | 19656 | "USATODAY/2.1.2.7 CFNetwork/548.1.4 Darwin/11.0.0" : { |
19729 | 19736 | "robot" |
19730 | 19737 | ], |
19731 | 19738 | "robot" : "wget", |
19732 | "robot_name" : "wget" | |
19739 | "robot_name" : "Wget" | |
19733 | 19740 | }, |
19734 | 19741 | "WikiDo/1.1 (http://wikido.com; crawler@wikido.com)" : { |
19735 | 19742 | "browser_major" : "1", |
0 | severity = 2 |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{RELEASE_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); | |
6 | } | |
7 | } | |
8 | ||
9 | ||
10 | use strict; | |
11 | use warnings; | |
12 | ||
13 | use Test::More 0.96 tests => 2; | |
14 | use_ok('Test::CPAN::Changes'); | |
15 | subtest 'changes_ok' => sub { | |
16 | changes_file_ok('Changes'); | |
17 | }; | |
18 | done_testing(); |
0 | #!perl | |
1 | ||
2 | BEGIN { | |
3 | unless ($ENV{RELEASE_TESTING}) { | |
4 | require Test::More; | |
5 | Test::More::plan(skip_all => 'these tests are for release candidate testing'); | |
6 | } | |
7 | } | |
8 | ||
9 | ||
10 | # This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll v0.02 | |
11 | ||
12 | use Test::Code::TidyAll 0.24; | |
13 | use Test::More 0.88; | |
14 | ||
15 | tidyall_ok( | |
16 | verbose => ( exists $ENV{TEST_TIDYALL_VERBOSE} ? $ENV{TEST_TIDYALL_VERBOSE} : 0 ), | |
17 | ); | |
18 | ||
19 | done_testing(); |
4 | 4 | "browser_minor" : ".192", |
5 | 5 | "match" : [ |
6 | 6 | "robot", |
7 | "robot_id", | |
7 | 8 | "malware" |
8 | 9 | ], |
9 | 10 | "robot" : "malware", |
28 | 29 | "match" : [ |
29 | 30 | "google", |
30 | 31 | "googleadsbot", |
31 | "robot" | |
32 | "robot", | |
33 | "robot_id" | |
32 | 34 | ], |
33 | 35 | "minor" : null, |
34 | 36 | "no_match" : null, |
86 | 88 | "no_match" : null, |
87 | 89 | "other" : null, |
88 | 90 | "robot" : "baidu", |
89 | "robot_string" : "Baidu Spider", | |
91 | "robot_string" : "Baidu", | |
90 | 92 | "version" : null |
91 | 93 | }, |
92 | 94 | "BlackBerry7730/3.7.1 UP.Link/5.1.2.5" : { |
2205 | 2207 | "public_version" : "30.0", |
2206 | 2208 | "version" : "30.0" |
2207 | 2209 | }, |
2210 | "Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2272.96 Mobile Safari/537.36 (compatible; Pinterestbot/1.0; +https://www.pinterest.com/bot.html)" : { | |
2211 | "match" : [ | |
2212 | "android", | |
2213 | "chrome", | |
2214 | "device", | |
2215 | "mobile", | |
2216 | "pinterest", | |
2217 | "robot", | |
2218 | "webkit" | |
2219 | ], | |
2220 | "os" : "android", | |
2221 | "os_string" : "Android", | |
2222 | "robot" : "pinterest", | |
2223 | "robot_id" : "pinterest", | |
2224 | "robot_string" : "Pinterest" | |
2225 | }, | |
2208 | 2226 | "Mozilla/5.0 (Linux; U; Android 1.0; en-us; dream) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2" : { |
2209 | 2227 | "browser" : "safari", |
2210 | 2228 | "browser_string" : "Mobile Safari", |
3926 | 3944 | "public_version" : "33.0", |
3927 | 3945 | "version" : "33.0" |
3928 | 3946 | }, |
3947 | "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko; Google Page Speed Insights) Chrome/27.0.1453 Safari/537.36" : { | |
3948 | "browser_string" : "Chrome", | |
3949 | "browser_version" : "27.0", | |
3950 | "country" : null, | |
3951 | "engine" : "webkit", | |
3952 | "engine_version" : "537.36", | |
3953 | "language" : null, | |
3954 | "major" : "27", | |
3955 | "match" : [ | |
3956 | "chrome", | |
3957 | "google-page-speed", | |
3958 | "linux", | |
3959 | "robot", | |
3960 | "robot_id", | |
3961 | "unix", | |
3962 | "webkit", | |
3963 | "x11" | |
3964 | ], | |
3965 | "minor" : "0", | |
3966 | "no_match" : [ | |
3967 | "mobile", | |
3968 | "tablet" | |
3969 | ], | |
3970 | "os" : "linux", | |
3971 | "os_string" : "Linux", | |
3972 | "other" : null, | |
3973 | "robot" : "google-page-speed", | |
3974 | "robot_id" : "google-page-speed", | |
3975 | "robot_string" : "Google Page Speed" | |
3976 | }, | |
3929 | 3977 | "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0" : { |
3930 | 3978 | "browser" : "firefox", |
3931 | 3979 | "browser_string" : "Firefox", |
4760 | 4808 | "os_string" : "Windows Phone", |
4761 | 4809 | "os_version" : "7.5" |
4762 | 4810 | }, |
4811 | "Mozilla/5.0 (compatible; Pro Sitemaps Generator; pro-sitemaps.com) Gecko Pro-Sitemaps/1.0" : { | |
4812 | "match" : [ | |
4813 | "gecko", | |
4814 | "pro-sitemaps", | |
4815 | "robot", | |
4816 | "robot_id" | |
4817 | ], | |
4818 | "robot_id" : "pro-sitemaps", | |
4819 | "robot_string" : "Pro Sitemap Service" | |
4820 | }, | |
4763 | 4821 | "Mozilla/5.0 (compatible; Teleca Q7; Brew 3.1.5; U; en) 320X240 LGE VX9200" : { |
4764 | 4822 | "browser" : "obigo", |
4765 | 4823 | "browser_major" : "7", |
4849 | 4907 | "robot_beta" : ".1", |
4850 | 4908 | "robot_major" : "3", |
4851 | 4909 | "robot_minor" : ".1", |
4852 | "robot_name" : "archive.org_bot", | |
4853 | "robot_string" : "archive.org_bot", | |
4910 | "robot_name" : "Internet Archive", | |
4911 | "robot_string" : "Internet Archive", | |
4854 | 4912 | "robot_version" : "3.1" |
4855 | 4913 | }, |
4856 | 4914 | "Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.2; U; en-NZ) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/234.40.1 Safari/534.6 TouchPad/1.0" : { |
6835 | 6893 | "robot_beta" : ".5", |
6836 | 6894 | "robot_major" : "1", |
6837 | 6895 | "robot_minor" : ".4", |
6838 | "robot_string" : "wget", | |
6896 | "robot_string" : "Wget", | |
6839 | 6897 | "robot_version" : "1.4", |
6840 | 6898 | "version" : "1.4" |
6841 | 6899 | }, |
0 | [JSON] | |
1 | select = t/**/*json | |
2 | ||
3 | [PerlTidy] | |
4 | select = **/*.{pl,pm,t,psgi} | |
5 | ignore = .build/**/* | |
6 | ignore = HTTP-BrowserDetect-*/**/* | |
7 | ignore = blib/**/* | |
8 | ignore = t/00-* | |
9 | ignore = t/author-* | |
10 | ignore = t/release-* | |
11 | ignore = t/zzz-* | |
12 | ignore = xt/**/* | |
13 | argv = --profile=$ROOT/perltidyrc | |
14 | ||
15 | [SortLines::Naturally] | |
16 | select = .gitignore |
0 | # This file was automatically generated by Dist::Zilla::Plugin::Test::TidyAll v$VERSION | |
1 | ||
2 | use Test::More 0.88; | |
3 | use Test::Code::TidyAll 0.24; | |
4 | ||
5 | tidyall_ok( | |
6 | verbose => ( exists $ENV{TEST_TIDYALL_VERBOSE} ? $ENV{TEST_TIDYALL_VERBOSE} : 0 ), | |
7 | jobs => ( exists $ENV{TEST_TIDYALL_JOBS} ? $ENV{TEST_TIDYALL_JOBS} : 1 ), | |
8 | ); | |
9 | ||
10 | done_testing; |