Codebase list libhttp-browserdetect-perl / 51c5926
New upstream version 3.16 gregor herrmann 6 years ago
31 changed file(s) with 3063 addition(s) and 417 deletion(s). Raw diff Collapse all Expand all
+0
-66
Build.PL less more
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;
00 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
110
211 3.14 2016-05-25 11:44:10 America/Toronto
312 - Slightly refactor the detection of several browsers that
77
88 % cpanm HTTP::BrowserDetect
99
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.
1414
1515 ## Installing with the CPAN shell
1616
2323 As a last resort, you can manually install it. Download the tarball, untar it,
2424 then build it:
2525
26 % perl Build.PL
27 % ./Build && ./Build test
26 % perl Makefile.PL
27 % make && make test
2828
2929 Then install it:
3030
31 % ./Build install
31 % make install
3232
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
3636
3737 ## Documentation
3838
0 This software is copyright (c) 2016 by Lee Semel.
0 This software is copyright (c) 2017 by Lee Semel.
11
22 This is free software; you can redistribute it and/or modify it under
33 the same terms as the Perl 5 programming language system itself.
1111
1212 --- The GNU General Public License, Version 1, February 1989 ---
1313
14 This software is Copyright (c) 2016 by Lee Semel.
14 This software is Copyright (c) 2017 by Lee Semel.
1515
1616 This is free software, licensed under:
1717
271271
272272 --- The Artistic License 1.0 ---
273273
274 This software is Copyright (c) 2016 by Lee Semel.
274 This software is Copyright (c) 2017 by Lee Semel.
275275
276276 This is free software, licensed under:
277277
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.
21 CONTRIBUTORS
32 Changes
43 INSTALL
54 LICENSE
65 MANIFEST
6 MANIFEST.SKIP
77 META.json
88 META.yml
99 Makefile.PL
10 README.md
1011 TODO
1112 cpanfile
1213 dist.ini
14 examples/ua.pl
1315 lib/HTTP/BrowserDetect.pm
16 perlcriticrc
17 perltidyrc
18 t/00-report-prereqs.dd
19 t/00-report-prereqs.t
1420 t/01-detect.t
1521 t/03-language.t
1622 t/04-random-order.t
23 t/05_robot.t
1724 t/99_blank_ua.t
1825 t/add-field.pl
1926 t/make-more-useragents.pl
2027 t/more-useragents.json
21 t/release-cpan-changes.t
22 t/release-tidyall.t
28 t/perlcriticrc
2329 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
55 "Olaf Alders <olaf@wundercounter.com> (current maintainer)"
66 ],
77 "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",
99 "license" : [
1010 "perl_5"
1111 ],
1414 "version" : 2
1515 },
1616 "name" : "HTTP-BrowserDetect",
17 "no_index" : {
18 "directory" : [
19 "examples",
20 "t",
21 "xt"
22 ]
23 },
1724 "prereqs" : {
18 "build" : {
19 "requires" : {
20 "Module::Build" : "0.28"
21 }
22 },
2325 "configure" : {
2426 "requires" : {
25 "ExtUtils::MakeMaker" : "0",
26 "Module::Build" : "0.28"
27 "ExtUtils::MakeMaker" : "0"
2728 },
2829 "suggests" : {
2930 "JSON::PP" : "2.27300"
3233 "develop" : {
3334 "requires" : {
3435 "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"
3747 }
3848 },
3949 "runtime" : {
4555 }
4656 },
4757 "test" : {
58 "recommends" : {
59 "CPAN::Meta" : "2.120900"
60 },
4861 "requires" : {
62 "ExtUtils::MakeMaker" : "0",
63 "File::Spec" : "0",
4964 "FindBin" : "0",
5065 "JSON::PP" : "0",
66 "List::Util" : "1.49",
5167 "Path::Tiny" : "0",
5268 "Test::FailWarnings" : "0",
5369 "Test::More" : "0",
5975 "release_status" : "stable",
6076 "resources" : {
6177 "bugtracker" : {
62 "web" : "http://github.com/oalders/HTTP-BrowserDetect/issues"
78 "web" : "https://github.com/oalders/http-browserdetect/issues"
6379 },
64 "homepage" : "https://metacpan.org/release/HTTP-BrowserDetect",
80 "homepage" : "https://github.com/oalders/http-browserdetect",
6581 "repository" : {
6682 "type" : "git",
6783 "url" : "https://github.com/oalders/http-browserdetect.git",
6884 "web" : "https://github.com/oalders/http-browserdetect"
6985 }
7086 },
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 },
72703 "x_contributors" : [
73704 "Andrew Moise <andrew.moise@gmail.com>",
74705 "Aran Deltac <bluefeet@gmail.com>",
98729 "Uwe <uwe@uwevoelker.de>",
99730 "vti <viacheslav.t@gmail.com>",
100731 "yeahoffline <frank.gasser@gmail.com>"
101 ]
732 ],
733 "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233"
102734 }
103735
44 - 'Peter Walsham'
55 - 'Olaf Alders <olaf@wundercounter.com> (current maintainer)'
66 build_requires:
7 ExtUtils::MakeMaker: '0'
8 File::Spec: '0'
79 FindBin: '0'
810 JSON::PP: '0'
9 Module::Build: '0.28'
11 List::Util: '1.49'
1012 Path::Tiny: '0'
1113 Test::FailWarnings: '0'
1214 Test::More: '0'
1416 Test::NoWarnings: '0'
1517 configure_requires:
1618 ExtUtils::MakeMaker: '0'
17 Module::Build: '0.28'
1819 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'
2021 license: perl
2122 meta-spec:
2223 url: http://module-build.sourceforge.net/META-spec-v1.4.html
2324 version: '1.4'
2425 name: HTTP-BrowserDetect
26 no_index:
27 directory:
28 - examples
29 - t
30 - xt
2531 requires:
2632 perl: '5.006'
2733 strict: '0'
2834 vars: '0'
2935 warnings: '0'
3036 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
3339 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'
35513 x_contributors:
36514 - 'Andrew Moise <andrew.moise@gmail.com>'
37515 - 'Aran Deltac <bluefeet@gmail.com>'
61539 - 'Uwe <uwe@uwevoelker.de>'
62540 - 'vti <viacheslav.t@gmail.com>'
63541 - '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.
11 use strict;
22 use warnings;
33
88 my %WriteMakefileArgs = (
99 "ABSTRACT" => "Determine Web browser, version, and platform from an HTTP user agent string",
1010 "AUTHOR" => "Lee Semel <lee\@semel.net>, Peter Walsham, Olaf Alders <olaf\@wundercounter.com> (current maintainer)",
11 "BUILD_REQUIRES" => {
12 "Module::Build" => "0.28"
13 },
1411 "CONFIGURE_REQUIRES" => {
15 "ExtUtils::MakeMaker" => 0,
16 "Module::Build" => "0.28"
12 "ExtUtils::MakeMaker" => 0
1713 },
1814 "DISTNAME" => "HTTP-BrowserDetect",
1915 "LICENSE" => "perl",
2521 "warnings" => 0
2622 },
2723 "TEST_REQUIRES" => {
24 "ExtUtils::MakeMaker" => 0,
25 "File::Spec" => 0,
2826 "FindBin" => 0,
2927 "JSON::PP" => 0,
28 "List::Util" => "1.49",
3029 "Path::Tiny" => 0,
3130 "Test::FailWarnings" => 0,
3231 "Test::More" => 0,
3332 "Test::Most" => 0,
3433 "Test::NoWarnings" => 0
3534 },
36 "VERSION" => "3.14",
35 "VERSION" => "3.16",
3736 "test" => {
3837 "TESTS" => "t/*.t"
3938 }
4140
4241
4342 my %FallbackPrereqs = (
43 "ExtUtils::MakeMaker" => 0,
44 "File::Spec" => 0,
4445 "FindBin" => 0,
4546 "JSON::PP" => 0,
46 "Module::Build" => "0.28",
47 "List::Util" => "1.49",
4748 "Path::Tiny" => 0,
4849 "Test::FailWarnings" => 0,
4950 "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 ### facebook
509
510 ### getright
511
512 ### golib
513
514 ### google
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.
22 requires "vars" => "0";
33 requires "warnings" => "0";
44
5 on 'build' => sub {
6 requires "Module::Build" => "0.28";
7 };
8
95 on 'test' => sub {
6 requires "ExtUtils::MakeMaker" => "0";
7 requires "File::Spec" => "0";
108 requires "FindBin" => "0";
119 requires "JSON::PP" => "0";
10 requires "List::Util" => "1.49";
1211 requires "Path::Tiny" => "0";
1312 requires "Test::FailWarnings" => "0";
1413 requires "Test::More" => "0";
1615 requires "Test::NoWarnings" => "0";
1716 };
1817
18 on 'test' => sub {
19 recommends "CPAN::Meta" => "2.120900";
20 };
21
1922 on 'configure' => sub {
2023 requires "ExtUtils::MakeMaker" => "0";
21 requires "Module::Build" => "0.28";
2224 };
2325
2426 on 'configure' => sub {
2729
2830 on 'develop' => sub {
2931 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";
3235 };
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 };
33 author = Olaf Alders <olaf@wundercounter.com> (current maintainer)
44 license = Perl_5
55 copyright_holder = Lee Semel
6 copyright_year = 2016
7 version = 3.14
6 copyright_year = 2017
87 main_module = lib/HTTP/BrowserDetect.pm
98
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{ };
33 use 5.006;
44
55 package HTTP::BrowserDetect;
6 $HTTP::BrowserDetect::VERSION = '3.14';
6
7 our $VERSION = '3.16';
8
79 use vars qw(@ALL_TESTS);
810
911 # Operating Systems
116118 presto khtml edgehtml
117119 );
118120
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 facebook
134 getright
135 golib
136 google
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' ],
135198 );
136199
137200 our @MISC_TESTS = qw(
140203
141204 push @ALL_TESTS,
142205 (
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,
151214 );
152215
153 sub _all_tests {
154 return @ALL_TESTS;
155 }
156
157216 # https://support.google.com/webmasters/answer/1061943?hl=en
158217
159218 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',
166301 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',
193328 puf => 'puf',
194329 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',
198333 wget => 'wget',
199 yahoo => 'Yahoo',
200 yandex => 'Yandex',
201 yandeximages => 'YandexImages',
334 yahoo => 'yahoo',
335 yandex => 'yandex',
336 yandeximages => 'yandex-images',
202337 );
203338
204339 my %BROWSER_NAMES = (
379514 };
380515 }
381516
382 foreach my $test (@ROBOT_TESTS) {
517 foreach my $test (@OLD_ROBOT_TESTS) {
383518 no strict 'refs';
384519
385520 # For the 'robot' test, we return undef instead of 0 if it's
8701005 my $browser_tests = $self->{browser_tests};
8711006
8721007 my $robot_tests = $self->{robot_tests} = {};
873 my $r = undef;
1008 my $id;
1009 my $r;
8741010
8751011 my $robot_fragment; # The text that indicates it's a robot (we'll
8761012 # use this later to detect robot version, and
10691205 $robot_fragment = 'google';
10701206 }
10711207
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
10721226 if ( $browser_tests->{applecoremedia}
10731227 || $browser_tests->{dalvik}
10741228 || $browser_tests->{adm} ) {
10781232 if ($r) {
10791233
10801234 # 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};
10831246 $robot_tests->{robot} = $r;
10841247 $robot_fragment = $r if !defined($robot_fragment);
10851248 }
11121275 last;
11131276 }
11141277 }
1278 }
1279
1280 if ( exists $robot_tests->{robot} && $robot_tests->{robot} eq 'unknown' )
1281 {
1282 $robot_tests->{robot_id} = 'unknown';
11151283 }
11161284
11171285 if ( defined($robot_fragment) ) {
11331301 && $self->{user_agent} =~ m{\/.*\/}
11341302 && $self->{user_agent} =~ m{
11351303 ([\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
11401308 ) {
11411309 # We matched the whole string, but it seems to
11421310 # make more sense as whitespace-separated
21902358 return $self->{browser_string};
21912359 }
21922360
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
21932368 sub robot_string {
21942369 my $self = shift;
21952370
21982373 }
21992374
22002375 sub robot_name {
2201 my ($self) = @_;
2376 my $self = shift;
22022377 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;
22032386 }
22042387
22052388 sub _robot_version {
26962879 return sort @browser_properties;
26972880 }
26982881
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
26992910 1;
27002911
27012912 # ABSTRACT: Determine Web browser, version, and platform from an HTTP user agent string
27122923
27132924 =head1 VERSION
27142925
2715 version 3.14
2926 version 3.16
27162927
27172928 =head1 SYNOPSIS
27182929
27192930 use HTTP::BrowserDetect;
27202931
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';
27212934 my $ua = HTTP::BrowserDetect->new($user_agent_string);
27222935
27232936 # Print general information
27292942 if $ua->os_string;
27302943
27312944 # 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 }
27352952 }
27362953 print "Mac\n" if $ua->macosx;
27372954
27392956 print "Safari\n" if $ua->safari;
27402957 print "MSIE\n" if $ua->ie;
27412958 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 # ...;
27492966 }
27502967
27512968 =head1 DESCRIPTION
27522969
27532970 The HTTP::BrowserDetect object does a number of tests on an HTTP user agent
27542971 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/>
27552975
27562976 This module was originally based upon the JavaScript browser detection
27572977 code available at
29403160 additional information (e.g. robots which return "unknown" from
29413161 robot() generally can be identified in a human-readable fashion by
29423162 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.
29433177
29443178 =head2 robot_version(), robot_major(), robot_minor(), robot_beta()
29453179
31693403
31703404 =head2 Robot properties
31713405
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
31723411 The following additional methods are available, each returning a true or false
31733412 value. This is by no means a complete list of robots that exist on the Web.
31743413
35533792
35543793 =head1 COPYRIGHT AND LICENSE
35553794
3556 This software is copyright (c) 2016 by Lee Semel.
3795 This software is copyright (c) 2017 by Lee Semel.
35573796
35583797 This is free software; you can redistribute it and/or modify it under
35593798 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:
66 use Test::FailWarnings;
77
88 use FindBin;
9 use JSON::PP;
9 use JSON::PP ();
10 use List::Util 1.49 qw(uniq);
1011 use Path::Tiny qw( path );
1112
1213 # test that the module loads without errors
2425 my $more_tests = JSON::PP->new->ascii->decode($json);
2526 $tests = { %$tests, %$more_tests };
2627
28 my @robot_tests = uniq map { $_->[1] } HTTP::BrowserDetect->_robot_tests;
29
30 my %ids = map { $_ => 1 } HTTP::BrowserDetect->all_robot_ids;
31
2732 foreach my $ua ( sort ( keys %{$tests} ) ) {
2833
2934 my $test = $tests->{$ua};
3035
3136 my $detected = HTTP::BrowserDetect->new($ua);
32 diag( $detected->user_agent );
37 subtest $ua => sub {
3338
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"
4695 );
4796 }
48 }
4997
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 {
50130 foreach my $method (
51131 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
64133 engine_version
65134 engine_major
66135 engine_minor
67 ios
68 tablet
136 device
137 device_name
138 gecko_version
69139 )
70140 ) {
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 );
80145 }
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 };
118147
119148 done_testing();
1010 "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)");
1111
1212 ok( !$browser->language, "no language detected" );
13 diag( $browser->language );
1413 Test::NoWarnings::had_no_warnings();
1514 done_testing();
7373
7474 my %test_results;
7575
76 diag($ua);
76 subtest $ua, sub {
77 for my $i ( 0 .. $N_DETECTS - 1 ) {
78 $detect[$i] = HTTP::BrowserDetect->new($ua);
7779
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 }
9096 }
9197 else {
92 cmp_ok( $result, 'eq', $test_results{$method}, $method );
98 $test_results{$method} = $result;
9399 }
94100 }
95 else {
96 $test_results{$method} = $result;
97 }
98101 }
99 }
102 };
100103 }
101
102104 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();
2121 "browser_major" : 0,
2222 "browser_minor" : ".0",
2323 "match" : [
24 "google",
25 "googleadsbot",
2426 "robot",
25 "googleadsbot",
26 "google"
27 "robot_id"
2728 ],
2829 "robot" : "googleadsbot",
2930 "robot_name" : "Google AdsBot"
4142 "mobile",
4243 "safari",
4344 "robot",
45 "robot_id",
4446 "google",
4547 "googleadsbot"
4648 ],
7072 "robot_beta" : ".3",
7173 "robot_major" : "4",
7274 "robot_minor" : ".2",
73 "robot_name" : "Apache http client",
75 "robot_name" : "Apache HttpClient",
7476 "robot_version" : "4.2"
7577 },
7678 "Apache-HttpClient/UNAVAILABLE (java 1.4)" : {
8183 "robot"
8284 ],
8385 "robot" : "apache",
84 "robot_name" : "Apache http client"
86 "robot_name" : "Apache HttpClient"
8587 },
8688 "Apple-PubSub/28" : {
8789 "browser" : "pubsub",
144146 "baidu"
145147 ],
146148 "robot" : "baidu",
147 "robot_name" : "Baidu Spider"
149 "robot_name" : "Baidu"
148150 },
149151 "BingLocalSearchBot/1.0" : {
150152 "browser_major" : "1",
1037110373 "engine_string" : "Gecko",
1037210374 "engine_version" : "28.0",
1037310375 "match" : [
10376 "firefox",
10377 "flipboard",
10378 "gecko",
1037410379 "mac",
1037510380 "macosx",
10376 "firefox",
10377 "gecko",
1037810381 "robot"
1037910382 ],
1038010383 "os" : "macosx",
1038310386 "os_minor" : ".9",
1038410387 "os_string" : "Mac OS X",
1038510388 "os_version" : "10.9",
10386 "robot" : "unknown",
10389 "robot" : "flipboard",
1038710390 "robot_beta" : "",
1038810391 "robot_major" : "1",
1038910392 "robot_minor" : ".1",
10390 "robot_string" : "FlipboardProxy",
10393 "robot_string" : "Flipboard",
1039110394 "robot_version" : "1.1"
1039210395 },
1039310396 "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" : {
1058210585 "engine_string" : "WebKit",
1058310586 "engine_version" : "600.2",
1058410587 "match" : [
10588 "apple",
1058510589 "mac",
1058610590 "macosx",
1058710591 "safari",
1059410598 "os_minor" : ".10",
1059510599 "os_string" : "Mac OS X",
1059610600 "os_version" : "10.10",
10597 "robot" : "unknown",
10601 "robot" : "apple",
1059810602 "robot_beta" : "",
1059910603 "robot_major" : "0",
1060010604 "robot_minor" : ".1",
10601 "robot_name" : "Applebot",
10605 "robot_name" : "Apple",
1060210606 "robot_version" : "0.1"
1060310607 },
1060410608 "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" : {
1641516419 "robot_beta" : "",
1641616420 "robot_major" : "2",
1641716421 "robot_minor" : ".0",
16418 "robot_name" : "Baidu Spider",
16422 "robot_name" : "Baidu",
1641916423 "robot_version" : "2.0"
1642016424 },
1642116425 "Mozilla/5.0 (compatible; Blekkobot; ScoutJet; +http://blekko.com/about/blekkobot)" : {
1960919613 "browser_major" : 0,
1961019614 "browser_minor" : ".0",
1961119615 "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"
1961619622 },
1961719623 "StatsInfo" : {
1961819624 "browser_major" : 0,
1963719643 "browser_major" : "1",
1963819644 "browser_minor" : ".0",
1963919645 "match" : [
19640 "robot"
19641 ],
19642 "robot" : "unknown",
19646 "robot",
19647 "twitter"
19648 ],
19649 "robot" : "twitter",
1964319650 "robot_beta" : "",
1964419651 "robot_major" : "1",
1964519652 "robot_minor" : ".0",
19646 "robot_name" : "Twitterbot",
19653 "robot_name" : "Twitter",
1964719654 "robot_version" : "1.0"
1964819655 },
1964919656 "USATODAY/2.1.2.7 CFNetwork/548.1.4 Darwin/11.0.0" : {
1972919736 "robot"
1973019737 ],
1973119738 "robot" : "wget",
19732 "robot_name" : "wget"
19739 "robot_name" : "Wget"
1973319740 },
1973419741 "WikiDo/1.1 (http://wikido.com; crawler@wikido.com)" : {
1973519742 "browser_major" : "1",
0 severity = 2
+0
-19
t/release-cpan-changes.t less more
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
-20
t/release-tidyall.t less more
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();
44 "browser_minor" : ".192",
55 "match" : [
66 "robot",
7 "robot_id",
78 "malware"
89 ],
910 "robot" : "malware",
2829 "match" : [
2930 "google",
3031 "googleadsbot",
31 "robot"
32 "robot",
33 "robot_id"
3234 ],
3335 "minor" : null,
3436 "no_match" : null,
8688 "no_match" : null,
8789 "other" : null,
8890 "robot" : "baidu",
89 "robot_string" : "Baidu Spider",
91 "robot_string" : "Baidu",
9092 "version" : null
9193 },
9294 "BlackBerry7730/3.7.1 UP.Link/5.1.2.5" : {
22052207 "public_version" : "30.0",
22062208 "version" : "30.0"
22072209 },
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 },
22082226 "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" : {
22092227 "browser" : "safari",
22102228 "browser_string" : "Mobile Safari",
39263944 "public_version" : "33.0",
39273945 "version" : "33.0"
39283946 },
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 },
39293977 "Mozilla/5.0 (X11; Linux x86_64; rv:28.0) Gecko/20100101 Firefox/28.0" : {
39303978 "browser" : "firefox",
39313979 "browser_string" : "Firefox",
47604808 "os_string" : "Windows Phone",
47614809 "os_version" : "7.5"
47624810 },
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 },
47634821 "Mozilla/5.0 (compatible; Teleca Q7; Brew 3.1.5; U; en) 320X240 LGE VX9200" : {
47644822 "browser" : "obigo",
47654823 "browser_major" : "7",
48494907 "robot_beta" : ".1",
48504908 "robot_major" : "3",
48514909 "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",
48544912 "robot_version" : "3.1"
48554913 },
48564914 "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" : {
68356893 "robot_beta" : ".5",
68366894 "robot_major" : "1",
68376895 "robot_minor" : ".4",
6838 "robot_string" : "wget",
6896 "robot_string" : "Wget",
68396897 "robot_version" : "1.4",
68406898 "version" : "1.4"
68416899 },
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 #!perl
1
2 use Test::Synopsis;
3
4 all_synopsis_ok();
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;
0 use strict;
1 use warnings;
2
3 # this test was generated with Dist::Zilla::Plugin::Test::CPAN::Changes 0.012
4
5 use Test::More 0.96 tests => 1;
6 use Test::CPAN::Changes;
7 subtest 'changes_ok' => sub {
8 changes_file_ok('Changes');
9 };