Codebase list libhttp-browserdetect-perl / a668545
Merge pull request #133 from oalders/more-bots More bots Olaf Alders authored 6 years ago GitHub committed 6 years ago
14 changed file(s) with 1551 addition(s) and 167 deletion(s). Raw diff Collapse all Expand all
00 sudo: false
11 language: perl
22 perl:
3 - "5.26"
4 - "5.24"
35 - "5.22"
46 - "5.20"
57 - "5.18"
68 - "5.16"
79 - "5.14"
10 before_install:
11 - cpanm -n App::cpm
812 install:
9 - cpanm English Exporter File::Slurp FindBin JSON::PP Test::More Test::Most Test::FailWarnings
13 - cpm install -g
1014 script:
1115 - "prove -lr t"
1216 notifications:
1519 - olaf@wundersolutions.com
1620 on_success: always
1721 on_failure: always
22 cache:
23 directories:
24 - ~/perl5
11
22 {{$NEXT}}
33 - Adds browserdetect.org to documentation
4 - Adds more bots to robot detection
5 - Adds robot_id(), which is currently in beta
46
57 3.14 2016-05-25 11:44:10 America/Toronto
68 - Slightly refactor the detection of several browsers that
0 This software is copyright (c) 2017 by Lee Semel.
1
2 This is free software; you can redistribute it and/or modify it under
3 the same terms as the Perl 5 programming language system itself.
4
5 Terms of the Perl programming language system itself
6
7 a) the GNU General Public License as published by the Free
8 Software Foundation; either version 1, or (at your option) any
9 later version, or
10 b) the "Artistic License"
11
12 --- The GNU General Public License, Version 1, February 1989 ---
13
14 This software is Copyright (c) 2017 by Lee Semel.
15
16 This is free software, licensed under:
17
18 The GNU General Public License, Version 1, February 1989
19
20 GNU GENERAL PUBLIC LICENSE
21 Version 1, February 1989
22
23 Copyright (C) 1989 Free Software Foundation, Inc.
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26 Everyone is permitted to copy and distribute verbatim copies
27 of this license document, but changing it is not allowed.
28
29 Preamble
30
31 The license agreements of most software companies try to keep users
32 at the mercy of those companies. By contrast, our General Public
33 License is intended to guarantee your freedom to share and change free
34 software--to make sure the software is free for all its users. The
35 General Public License applies to the Free Software Foundation's
36 software and to any other program whose authors commit to using it.
37 You can use it for your programs, too.
38
39 When we speak of free software, we are referring to freedom, not
40 price. Specifically, the General Public License is designed to make
41 sure that you have the freedom to give away or sell copies of free
42 software, that you receive source code or can get it if you want it,
43 that you can change the software or use pieces of it in new free
44 programs; and that you know you can do these things.
45
46 To protect your rights, we need to make restrictions that forbid
47 anyone to deny you these rights or to ask you to surrender the rights.
48 These restrictions translate to certain responsibilities for you if you
49 distribute copies of the software, or if you modify it.
50
51 For example, if you distribute copies of a such a program, whether
52 gratis or for a fee, you must give the recipients all the rights that
53 you have. You must make sure that they, too, receive or can get the
54 source code. And you must tell them their rights.
55
56 We protect your rights with two steps: (1) copyright the software, and
57 (2) offer you this license which gives you legal permission to copy,
58 distribute and/or modify the software.
59
60 Also, for each author's protection and ours, we want to make certain
61 that everyone understands that there is no warranty for this free
62 software. If the software is modified by someone else and passed on, we
63 want its recipients to know that what they have is not the original, so
64 that any problems introduced by others will not reflect on the original
65 authors' reputations.
66
67 The precise terms and conditions for copying, distribution and
68 modification follow.
69
70 GNU GENERAL PUBLIC LICENSE
71 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
72
73 0. This License Agreement applies to any program or other work which
74 contains a notice placed by the copyright holder saying it may be
75 distributed under the terms of this General Public License. The
76 "Program", below, refers to any such program or work, and a "work based
77 on the Program" means either the Program or any work containing the
78 Program or a portion of it, either verbatim or with modifications. Each
79 licensee is addressed as "you".
80
81 1. You may copy and distribute verbatim copies of the Program's source
82 code as you receive it, in any medium, provided that you conspicuously and
83 appropriately publish on each copy an appropriate copyright notice and
84 disclaimer of warranty; keep intact all the notices that refer to this
85 General Public License and to the absence of any warranty; and give any
86 other recipients of the Program a copy of this General Public License
87 along with the Program. You may charge a fee for the physical act of
88 transferring a copy.
89
90 2. You may modify your copy or copies of the Program or any portion of
91 it, and copy and distribute such modifications under the terms of Paragraph
92 1 above, provided that you also do the following:
93
94 a) cause the modified files to carry prominent notices stating that
95 you changed the files and the date of any change; and
96
97 b) cause the whole of any work that you distribute or publish, that
98 in whole or in part contains the Program or any part thereof, either
99 with or without modifications, to be licensed at no charge to all
100 third parties under the terms of this General Public License (except
101 that you may choose to grant warranty protection to some or all
102 third parties, at your option).
103
104 c) If the modified program normally reads commands interactively when
105 run, you must cause it, when started running for such interactive use
106 in the simplest and most usual way, to print or display an
107 announcement including an appropriate copyright notice and a notice
108 that there is no warranty (or else, saying that you provide a
109 warranty) and that users may redistribute the program under these
110 conditions, and telling the user how to view a copy of this General
111 Public License.
112
113 d) You may charge a fee for the physical act of transferring a
114 copy, and you may at your option offer warranty protection in
115 exchange for a fee.
116
117 Mere aggregation of another independent work with the Program (or its
118 derivative) on a volume of a storage or distribution medium does not bring
119 the other work under the scope of these terms.
120
121 3. You may copy and distribute the Program (or a portion or derivative of
122 it, under Paragraph 2) in object code or executable form under the terms of
123 Paragraphs 1 and 2 above provided that you also do one of the following:
124
125 a) accompany it with the complete corresponding machine-readable
126 source code, which must be distributed under the terms of
127 Paragraphs 1 and 2 above; or,
128
129 b) accompany it with a written offer, valid for at least three
130 years, to give any third party free (except for a nominal charge
131 for the cost of distribution) a complete machine-readable copy of the
132 corresponding source code, to be distributed under the terms of
133 Paragraphs 1 and 2 above; or,
134
135 c) accompany it with the information you received as to where the
136 corresponding source code may be obtained. (This alternative is
137 allowed only for noncommercial distribution and only if you
138 received the program in object code or executable form alone.)
139
140 Source code for a work means the preferred form of the work for making
141 modifications to it. For an executable file, complete source code means
142 all the source code for all modules it contains; but, as a special
143 exception, it need not include source code for modules which are standard
144 libraries that accompany the operating system on which the executable
145 file runs, or for standard header files or definitions files that
146 accompany that operating system.
147
148 4. You may not copy, modify, sublicense, distribute or transfer the
149 Program except as expressly provided under this General Public License.
150 Any attempt otherwise to copy, modify, sublicense, distribute or transfer
151 the Program is void, and will automatically terminate your rights to use
152 the Program under this License. However, parties who have received
153 copies, or rights to use copies, from you under this General Public
154 License will not have their licenses terminated so long as such parties
155 remain in full compliance.
156
157 5. By copying, distributing or modifying the Program (or any work based
158 on the Program) you indicate your acceptance of this license to do so,
159 and all its terms and conditions.
160
161 6. Each time you redistribute the Program (or any work based on the
162 Program), the recipient automatically receives a license from the original
163 licensor to copy, distribute or modify the Program subject to these
164 terms and conditions. You may not impose any further restrictions on the
165 recipients' exercise of the rights granted herein.
166
167 7. The Free Software Foundation may publish revised and/or new versions
168 of the General Public License from time to time. Such new versions will
169 be similar in spirit to the present version, but may differ in detail to
170 address new problems or concerns.
171
172 Each version is given a distinguishing version number. If the Program
173 specifies a version number of the license which applies to it and "any
174 later version", you have the option of following the terms and conditions
175 either of that version or of any later version published by the Free
176 Software Foundation. If the Program does not specify a version number of
177 the license, you may choose any version ever published by the Free Software
178 Foundation.
179
180 8. If you wish to incorporate parts of the Program into other free
181 programs whose distribution conditions are different, write to the author
182 to ask for permission. For software which is copyrighted by the Free
183 Software Foundation, write to the Free Software Foundation; we sometimes
184 make exceptions for this. Our decision will be guided by the two goals
185 of preserving the free status of all derivatives of our free software and
186 of promoting the sharing and reuse of software generally.
187
188 NO WARRANTY
189
190 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
191 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
192 OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
193 PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
194 OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
195 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
196 TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
197 PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
198 REPAIR OR CORRECTION.
199
200 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
201 WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
202 REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
203 INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
204 OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
205 TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
206 YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
207 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
208 POSSIBILITY OF SUCH DAMAGES.
209
210 END OF TERMS AND CONDITIONS
211
212 Appendix: How to Apply These Terms to Your New Programs
213
214 If you develop a new program, and you want it to be of the greatest
215 possible use to humanity, the best way to achieve this is to make it
216 free software which everyone can redistribute and change under these
217 terms.
218
219 To do so, attach the following notices to the program. It is safest to
220 attach them to the start of each source file to most effectively convey
221 the exclusion of warranty; and each file should have at least the
222 "copyright" line and a pointer to where the full notice is found.
223
224 <one line to give the program's name and a brief idea of what it does.>
225 Copyright (C) 19yy <name of author>
226
227 This program is free software; you can redistribute it and/or modify
228 it under the terms of the GNU General Public License as published by
229 the Free Software Foundation; either version 1, or (at your option)
230 any later version.
231
232 This program is distributed in the hope that it will be useful,
233 but WITHOUT ANY WARRANTY; without even the implied warranty of
234 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
235 GNU General Public License for more details.
236
237 You should have received a copy of the GNU General Public License
238 along with this program; if not, write to the Free Software
239 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
240
241
242 Also add information on how to contact you by electronic and paper mail.
243
244 If the program is interactive, make it output a short notice like this
245 when it starts in an interactive mode:
246
247 Gnomovision version 69, Copyright (C) 19xx name of author
248 Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
249 This is free software, and you are welcome to redistribute it
250 under certain conditions; type `show c' for details.
251
252 The hypothetical commands `show w' and `show c' should show the
253 appropriate parts of the General Public License. Of course, the
254 commands you use may be called something other than `show w' and `show
255 c'; they could even be mouse-clicks or menu items--whatever suits your
256 program.
257
258 You should also get your employer (if you work as a programmer) or your
259 school, if any, to sign a "copyright disclaimer" for the program, if
260 necessary. Here a sample; alter the names:
261
262 Yoyodyne, Inc., hereby disclaims all copyright interest in the
263 program `Gnomovision' (a program to direct compilers to make passes
264 at assemblers) written by James Hacker.
265
266 <signature of Ty Coon>, 1 April 1989
267 Ty Coon, President of Vice
268
269 That's all there is to it!
270
271
272 --- The Artistic License 1.0 ---
273
274 This software is Copyright (c) 2017 by Lee Semel.
275
276 This is free software, licensed under:
277
278 The Artistic License 1.0
279
280 The Artistic License
281
282 Preamble
283
284 The intent of this document is to state the conditions under which a Package
285 may be copied, such that the Copyright Holder maintains some semblance of
286 artistic control over the development of the package, while giving the users of
287 the package the right to use and distribute the Package in a more-or-less
288 customary fashion, plus the right to make reasonable modifications.
289
290 Definitions:
291
292 - "Package" refers to the collection of files distributed by the Copyright
293 Holder, and derivatives of that collection of files created through
294 textual modification.
295 - "Standard Version" refers to such a Package if it has not been modified,
296 or has been modified in accordance with the wishes of the Copyright
297 Holder.
298 - "Copyright Holder" is whoever is named in the copyright or copyrights for
299 the package.
300 - "You" is you, if you're thinking about copying or distributing this Package.
301 - "Reasonable copying fee" is whatever you can justify on the basis of media
302 cost, duplication charges, time of people involved, and so on. (You will
303 not be required to justify it to the Copyright Holder, but only to the
304 computing community at large as a market that must bear the fee.)
305 - "Freely Available" means that no fee is charged for the item itself, though
306 there may be fees involved in handling the item. It also means that
307 recipients of the item may redistribute it under the same conditions they
308 received it.
309
310 1. You may make and give away verbatim copies of the source form of the
311 Standard Version of this Package without restriction, provided that you
312 duplicate all of the original copyright notices and associated disclaimers.
313
314 2. You may apply bug fixes, portability fixes and other modifications derived
315 from the Public Domain or from the Copyright Holder. A Package modified in such
316 a way shall still be considered the Standard Version.
317
318 3. You may otherwise modify your copy of this Package in any way, provided that
319 you insert a prominent notice in each changed file stating how and when you
320 changed that file, and provided that you do at least ONE of the following:
321
322 a) place your modifications in the Public Domain or otherwise make them
323 Freely Available, such as by posting said modifications to Usenet or an
324 equivalent medium, or placing the modifications on a major archive site
325 such as ftp.uu.net, or by allowing the Copyright Holder to include your
326 modifications in the Standard Version of the Package.
327
328 b) use the modified Package only within your corporation or organization.
329
330 c) rename any non-standard executables so the names do not conflict with
331 standard executables, which must also be provided, and provide a separate
332 manual page for each non-standard executable that clearly documents how it
333 differs from the Standard Version.
334
335 d) make other distribution arrangements with the Copyright Holder.
336
337 4. You may distribute the programs of this Package in object code or executable
338 form, provided that you do at least ONE of the following:
339
340 a) distribute a Standard Version of the executables and library files,
341 together with instructions (in the manual page or equivalent) on where to
342 get the Standard Version.
343
344 b) accompany the distribution with the machine-readable source of the Package
345 with your modifications.
346
347 c) accompany any non-standard executables with their corresponding Standard
348 Version executables, giving the non-standard executables non-standard
349 names, and clearly documenting the differences in manual pages (or
350 equivalent), together with instructions on where to get the Standard
351 Version.
352
353 d) make other distribution arrangements with the Copyright Holder.
354
355 5. You may charge a reasonable copying fee for any distribution of this
356 Package. You may charge any fee you choose for support of this Package. You
357 may not charge a fee for this Package itself. However, you may distribute this
358 Package in aggregate with other (possibly commercial) programs as part of a
359 larger (possibly commercial) software distribution provided that you do not
360 advertise this Package as a product of your own.
361
362 6. The scripts and library files supplied as input to or produced as output
363 from the programs of this Package do not automatically fall under the copyright
364 of this Package, but belong to whomever generated them, and may be sold
365 commercially, and may be aggregated with this Package.
366
367 7. C or perl subroutines supplied by you and linked into this Package shall not
368 be considered part of this Package.
369
370 8. The name of the Copyright Holder may not be used to endorse or promote
371 products derived from this software without specific prior written permission.
372
373 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
374 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
375 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
376
377 The End
378
0 {
1 "abstract" : "Determine Web browser, version, and platform from an HTTP user agent string",
2 "author" : [
3 "Lee Semel <lee@semel.net>",
4 "Peter Walsham",
5 "Olaf Alders <olaf@wundercounter.com> (current maintainer)"
6 ],
7 "dynamic_config" : 0,
8 "generated_by" : "Dist::Zilla version 6.010, CPAN::Meta::Converter version 2.150010",
9 "license" : [
10 "perl_5"
11 ],
12 "meta-spec" : {
13 "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
14 "version" : 2
15 },
16 "name" : "HTTP-BrowserDetect",
17 "no_index" : {
18 "directory" : [
19 "examples",
20 "t",
21 "xt"
22 ]
23 },
24 "prereqs" : {
25 "configure" : {
26 "requires" : {
27 "ExtUtils::MakeMaker" : "0"
28 },
29 "suggests" : {
30 "JSON::PP" : "2.27300"
31 }
32 },
33 "develop" : {
34 "requires" : {
35 "Test::CPAN::Changes" : "0.19",
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"
47 }
48 },
49 "runtime" : {
50 "requires" : {
51 "perl" : "5.006",
52 "strict" : "0",
53 "vars" : "0",
54 "warnings" : "0"
55 }
56 },
57 "test" : {
58 "recommends" : {
59 "CPAN::Meta" : "2.120900"
60 },
61 "requires" : {
62 "ExtUtils::MakeMaker" : "0",
63 "File::Spec" : "0",
64 "FindBin" : "0",
65 "JSON::PP" : "0",
66 "Path::Tiny" : "0",
67 "Test::FailWarnings" : "0",
68 "Test::More" : "0",
69 "Test::Most" : "0",
70 "Test::NoWarnings" : "0"
71 }
72 }
73 },
74 "release_status" : "stable",
75 "resources" : {
76 "bugtracker" : {
77 "web" : "https://github.com/oalders/http-browserdetect/issues"
78 },
79 "homepage" : "https://github.com/oalders/http-browserdetect",
80 "repository" : {
81 "type" : "git",
82 "url" : "https://github.com/oalders/http-browserdetect.git",
83 "web" : "https://github.com/oalders/http-browserdetect"
84 }
85 },
86 "version" : "3.15",
87 "x_Dist_Zilla" : {
88 "perl" : {
89 "version" : "5.026000"
90 },
91 "plugins" : [
92 {
93 "class" : "Dist::Zilla::Plugin::PromptIfStale",
94 "config" : {
95 "Dist::Zilla::Plugin::PromptIfStale" : {
96 "check_all_plugins" : 0,
97 "check_all_prereqs" : 0,
98 "modules" : [
99 "Dist::Zilla::PluginBundle::Author::OALDERS"
100 ],
101 "phase" : "build",
102 "run_under_travis" : 0,
103 "skip" : []
104 }
105 },
106 "name" : "@Author::OALDERS/stale modules, build",
107 "version" : "0.054"
108 },
109 {
110 "class" : "Dist::Zilla::Plugin::PromptIfStale",
111 "config" : {
112 "Dist::Zilla::Plugin::PromptIfStale" : {
113 "check_all_plugins" : 1,
114 "check_all_prereqs" : 1,
115 "modules" : [],
116 "phase" : "release",
117 "run_under_travis" : 0,
118 "skip" : []
119 }
120 },
121 "name" : "@Author::OALDERS/stale modules, release",
122 "version" : "0.054"
123 },
124 {
125 "class" : "Dist::Zilla::Plugin::MAXMIND::TidyAll",
126 "name" : "@Author::OALDERS/MAXMIND::TidyAll",
127 "version" : "0.82"
128 },
129 {
130 "class" : "Dist::Zilla::Plugin::AutoPrereqs",
131 "name" : "@Author::OALDERS/AutoPrereqs",
132 "version" : "6.010"
133 },
134 {
135 "class" : "Dist::Zilla::Plugin::CheckChangesHasContent",
136 "name" : "@Author::OALDERS/CheckChangesHasContent",
137 "version" : "0.010"
138 },
139 {
140 "class" : "Dist::Zilla::Plugin::MakeMaker",
141 "config" : {
142 "Dist::Zilla::Role::TestRunner" : {
143 "default_jobs" : 1
144 }
145 },
146 "name" : "@Author::OALDERS/MakeMaker",
147 "version" : "6.010"
148 },
149 {
150 "class" : "Dist::Zilla::Plugin::CPANFile",
151 "name" : "@Author::OALDERS/CPANFile",
152 "version" : "6.010"
153 },
154 {
155 "class" : "Dist::Zilla::Plugin::ContributorsFile",
156 "name" : "@Author::OALDERS/ContributorsFile",
157 "version" : "0.3.0"
158 },
159 {
160 "class" : "Dist::Zilla::Plugin::MetaJSON",
161 "name" : "@Author::OALDERS/MetaJSON",
162 "version" : "6.010"
163 },
164 {
165 "class" : "Dist::Zilla::Plugin::MetaYAML",
166 "name" : "@Author::OALDERS/MetaYAML",
167 "version" : "6.010"
168 },
169 {
170 "class" : "Dist::Zilla::Plugin::Manifest",
171 "name" : "@Author::OALDERS/Manifest",
172 "version" : "6.010"
173 },
174 {
175 "class" : "Dist::Zilla::Plugin::MetaNoIndex",
176 "name" : "@Author::OALDERS/MetaNoIndex",
177 "version" : "6.010"
178 },
179 {
180 "class" : "Dist::Zilla::Plugin::MetaConfig",
181 "name" : "@Author::OALDERS/MetaConfig",
182 "version" : "6.010"
183 },
184 {
185 "class" : "Dist::Zilla::Plugin::MetaResources",
186 "name" : "@Author::OALDERS/MetaResources",
187 "version" : "6.010"
188 },
189 {
190 "class" : "Dist::Zilla::Plugin::License",
191 "name" : "@Author::OALDERS/License",
192 "version" : "6.010"
193 },
194 {
195 "class" : "Dist::Zilla::Plugin::InstallGuide",
196 "name" : "@Author::OALDERS/InstallGuide",
197 "version" : "1.200007"
198 },
199 {
200 "class" : "Dist::Zilla::Plugin::Prereqs",
201 "config" : {
202 "Dist::Zilla::Plugin::Prereqs" : {
203 "phase" : "runtime",
204 "type" : "requires"
205 }
206 },
207 "name" : "@Author::OALDERS/Prereqs",
208 "version" : "6.010"
209 },
210 {
211 "class" : "Dist::Zilla::Plugin::ExecDir",
212 "name" : "@Author::OALDERS/ExecDir",
213 "version" : "6.010"
214 },
215 {
216 "class" : "Dist::Zilla::Plugin::Test::CPAN::Changes",
217 "config" : {
218 "Dist::Zilla::Plugin::Test::CPAN::Changes" : {
219 "changelog" : "Changes"
220 }
221 },
222 "name" : "@Author::OALDERS/Test::CPAN::Changes",
223 "version" : "0.012"
224 },
225 {
226 "class" : "Dist::Zilla::Plugin::TestRelease",
227 "name" : "@Author::OALDERS/TestRelease",
228 "version" : "6.010"
229 },
230 {
231 "class" : "Dist::Zilla::Plugin::Test::ReportPrereqs",
232 "name" : "@Author::OALDERS/Test::ReportPrereqs",
233 "version" : "0.027"
234 },
235 {
236 "class" : "Dist::Zilla::Plugin::Test::Synopsis",
237 "name" : "@Author::OALDERS/Test::Synopsis",
238 "version" : "2.000007"
239 },
240 {
241 "class" : "Dist::Zilla::Plugin::Test::TidyAll",
242 "name" : "@Author::OALDERS/Test::TidyAll",
243 "version" : "0.04"
244 },
245 {
246 "class" : "Dist::Zilla::Plugin::RunExtraTests",
247 "config" : {
248 "Dist::Zilla::Role::TestRunner" : {
249 "default_jobs" : 1
250 }
251 },
252 "name" : "@Author::OALDERS/RunExtraTests",
253 "version" : "0.029"
254 },
255 {
256 "class" : "Dist::Zilla::Plugin::PodWeaver",
257 "config" : {
258 "Dist::Zilla::Plugin::PodWeaver" : {
259 "finder" : [
260 ":InstallModules",
261 ":ExecFiles"
262 ],
263 "plugins" : [
264 {
265 "class" : "Pod::Weaver::Plugin::EnsurePod5",
266 "name" : "@CorePrep/EnsurePod5",
267 "version" : "4.015"
268 },
269 {
270 "class" : "Pod::Weaver::Plugin::H1Nester",
271 "name" : "@CorePrep/H1Nester",
272 "version" : "4.015"
273 },
274 {
275 "class" : "Pod::Weaver::Plugin::SingleEncoding",
276 "name" : "@Default/SingleEncoding",
277 "version" : "4.015"
278 },
279 {
280 "class" : "Pod::Weaver::Section::Name",
281 "name" : "@Default/Name",
282 "version" : "4.015"
283 },
284 {
285 "class" : "Pod::Weaver::Section::Version",
286 "name" : "@Default/Version",
287 "version" : "4.015"
288 },
289 {
290 "class" : "Pod::Weaver::Section::Region",
291 "name" : "@Default/prelude",
292 "version" : "4.015"
293 },
294 {
295 "class" : "Pod::Weaver::Section::Generic",
296 "name" : "SYNOPSIS",
297 "version" : "4.015"
298 },
299 {
300 "class" : "Pod::Weaver::Section::Generic",
301 "name" : "DESCRIPTION",
302 "version" : "4.015"
303 },
304 {
305 "class" : "Pod::Weaver::Section::Generic",
306 "name" : "OVERVIEW",
307 "version" : "4.015"
308 },
309 {
310 "class" : "Pod::Weaver::Section::Collect",
311 "name" : "ATTRIBUTES",
312 "version" : "4.015"
313 },
314 {
315 "class" : "Pod::Weaver::Section::Collect",
316 "name" : "METHODS",
317 "version" : "4.015"
318 },
319 {
320 "class" : "Pod::Weaver::Section::Collect",
321 "name" : "FUNCTIONS",
322 "version" : "4.015"
323 },
324 {
325 "class" : "Pod::Weaver::Section::Leftovers",
326 "name" : "@Default/Leftovers",
327 "version" : "4.015"
328 },
329 {
330 "class" : "Pod::Weaver::Section::Region",
331 "name" : "@Default/postlude",
332 "version" : "4.015"
333 },
334 {
335 "class" : "Pod::Weaver::Section::Authors",
336 "name" : "@Default/Authors",
337 "version" : "4.015"
338 },
339 {
340 "class" : "Pod::Weaver::Section::Legal",
341 "name" : "@Default/Legal",
342 "version" : "4.015"
343 }
344 ]
345 }
346 },
347 "name" : "@Author::OALDERS/PodWeaver",
348 "version" : "4.008"
349 },
350 {
351 "class" : "Dist::Zilla::Plugin::PruneCruft",
352 "name" : "@Author::OALDERS/PruneCruft",
353 "version" : "6.010"
354 },
355 {
356 "class" : "Dist::Zilla::Plugin::CopyFilesFromBuild",
357 "name" : "@Author::OALDERS/CopyFilesFromBuild",
358 "version" : "0.170880"
359 },
360 {
361 "class" : "Dist::Zilla::Plugin::GithubMeta",
362 "name" : "@Author::OALDERS/GithubMeta",
363 "version" : "0.54"
364 },
365 {
366 "class" : "Dist::Zilla::Plugin::Git::GatherDir",
367 "config" : {
368 "Dist::Zilla::Plugin::GatherDir" : {
369 "exclude_filename" : [
370 "Install",
371 "LICENSE",
372 "META.json",
373 "Makefile.PL",
374 "README.md",
375 "cpanfile"
376 ],
377 "exclude_match" : [],
378 "follow_symlinks" : 0,
379 "include_dotfiles" : 0,
380 "prefix" : "",
381 "prune_directory" : [],
382 "root" : "."
383 },
384 "Dist::Zilla::Plugin::Git::GatherDir" : {
385 "include_untracked" : 0
386 }
387 },
388 "name" : "@Author::OALDERS/Git::GatherDir",
389 "version" : "2.042"
390 },
391 {
392 "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
393 "config" : {
394 "Dist::Zilla::Plugin::CopyFilesFromRelease" : {
395 "filename" : [
396 "Install"
397 ],
398 "match" : []
399 }
400 },
401 "name" : "@Author::OALDERS/CopyFilesFromRelease",
402 "version" : "0.006"
403 },
404 {
405 "class" : "Dist::Zilla::Plugin::Git::Check",
406 "config" : {
407 "Dist::Zilla::Plugin::Git::Check" : {
408 "untracked_files" : "die"
409 },
410 "Dist::Zilla::Role::Git::DirtyFiles" : {
411 "allow_dirty" : [
412 "Changes",
413 "Install",
414 "LICENSE",
415 "META.json",
416 "Makefile.PL",
417 "README.md",
418 "cpanfile",
419 "dist.ini"
420 ],
421 "allow_dirty_match" : [],
422 "changelog" : "Changes"
423 },
424 "Dist::Zilla::Role::Git::Repo" : {
425 "git_version" : "2.15.1",
426 "repo_root" : "."
427 }
428 },
429 "name" : "@Author::OALDERS/Git::Check",
430 "version" : "2.042"
431 },
432 {
433 "class" : "Dist::Zilla::Plugin::Git::Contributors",
434 "config" : {
435 "Dist::Zilla::Plugin::Git::Contributors" : {
436 "git_version" : "2.15.1",
437 "include_authors" : 0,
438 "include_releaser" : 1,
439 "order_by" : "name",
440 "paths" : []
441 }
442 },
443 "name" : "@Author::OALDERS/Git::Contributors",
444 "version" : "0.030"
445 },
446 {
447 "class" : "Dist::Zilla::Plugin::ReadmeAnyFromPod",
448 "config" : {
449 "Dist::Zilla::Role::FileWatcher" : {
450 "version" : "0.006"
451 }
452 },
453 "name" : "@Author::OALDERS/ReadmeMdInBuild",
454 "version" : "0.163250"
455 },
456 {
457 "class" : "Dist::Zilla::Plugin::ShareDir",
458 "name" : "@Author::OALDERS/ShareDir",
459 "version" : "6.010"
460 },
461 {
462 "class" : "Dist::Zilla::Plugin::TravisCI::StatusBadge",
463 "name" : "@Author::OALDERS/TravisCI::StatusBadge",
464 "version" : "0.007"
465 },
466 {
467 "class" : "Dist::Zilla::Plugin::ConfirmRelease",
468 "name" : "@Author::OALDERS/ConfirmRelease",
469 "version" : "6.010"
470 },
471 {
472 "class" : "Dist::Zilla::Plugin::UploadToCPAN",
473 "name" : "@Author::OALDERS/UploadToCPAN",
474 "version" : "6.010"
475 },
476 {
477 "class" : "Dist::Zilla::Plugin::RewriteVersion::Transitional",
478 "config" : {
479 "Dist::Zilla::Plugin::RewriteVersion" : {
480 "add_tarball_name" : 0,
481 "finders" : [
482 ":ExecFiles",
483 ":InstallModules"
484 ],
485 "global" : 0,
486 "skip_version_provider" : 0
487 },
488 "Dist::Zilla::Plugin::RewriteVersion::Transitional" : {}
489 },
490 "name" : "@Author::OALDERS/@Git::VersionManager/RewriteVersion::Transitional",
491 "version" : "0.008"
492 },
493 {
494 "class" : "Dist::Zilla::Plugin::MetaProvides::Update",
495 "name" : "@Author::OALDERS/@Git::VersionManager/MetaProvides::Update",
496 "version" : "0.002"
497 },
498 {
499 "class" : "Dist::Zilla::Plugin::CopyFilesFromRelease",
500 "config" : {
501 "Dist::Zilla::Plugin::CopyFilesFromRelease" : {
502 "filename" : [
503 "Changes"
504 ],
505 "match" : []
506 }
507 },
508 "name" : "@Author::OALDERS/@Git::VersionManager/CopyFilesFromRelease",
509 "version" : "0.006"
510 },
511 {
512 "class" : "Dist::Zilla::Plugin::Git::Commit",
513 "config" : {
514 "Dist::Zilla::Plugin::Git::Commit" : {
515 "add_files_in" : [],
516 "commit_msg" : "v%v%n%n%c"
517 },
518 "Dist::Zilla::Role::Git::DirtyFiles" : {
519 "allow_dirty" : [
520 "Changes",
521 "Install",
522 "LICENSE",
523 "META.json",
524 "Makefile.PL",
525 "README.md",
526 "cpanfile",
527 "dist.ini"
528 ],
529 "allow_dirty_match" : [],
530 "changelog" : "Changes"
531 },
532 "Dist::Zilla::Role::Git::Repo" : {
533 "git_version" : "2.15.1",
534 "repo_root" : "."
535 },
536 "Dist::Zilla::Role::Git::StringFormatter" : {
537 "time_zone" : "local"
538 }
539 },
540 "name" : "@Author::OALDERS/@Git::VersionManager/release snapshot",
541 "version" : "2.042"
542 },
543 {
544 "class" : "Dist::Zilla::Plugin::Git::Tag",
545 "config" : {
546 "Dist::Zilla::Plugin::Git::Tag" : {
547 "branch" : null,
548 "changelog" : "Changes",
549 "signed" : 0,
550 "tag" : "v3.15",
551 "tag_format" : "v%v",
552 "tag_message" : "v%v"
553 },
554 "Dist::Zilla::Role::Git::Repo" : {
555 "git_version" : "2.15.1",
556 "repo_root" : "."
557 },
558 "Dist::Zilla::Role::Git::StringFormatter" : {
559 "time_zone" : "local"
560 }
561 },
562 "name" : "@Author::OALDERS/@Git::VersionManager/Git::Tag",
563 "version" : "2.042"
564 },
565 {
566 "class" : "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional",
567 "config" : {
568 "Dist::Zilla::Plugin::BumpVersionAfterRelease" : {
569 "finders" : [
570 ":ExecFiles",
571 ":InstallModules"
572 ],
573 "global" : 0,
574 "munge_makefile_pl" : 1
575 },
576 "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" : {}
577 },
578 "name" : "@Author::OALDERS/@Git::VersionManager/BumpVersionAfterRelease::Transitional",
579 "version" : "0.008"
580 },
581 {
582 "class" : "Dist::Zilla::Plugin::NextRelease",
583 "name" : "@Author::OALDERS/@Git::VersionManager/NextRelease",
584 "version" : "6.010"
585 },
586 {
587 "class" : "Dist::Zilla::Plugin::Git::Commit",
588 "config" : {
589 "Dist::Zilla::Plugin::Git::Commit" : {
590 "add_files_in" : [],
591 "commit_msg" : "increment $VERSION after %v release"
592 },
593 "Dist::Zilla::Role::Git::DirtyFiles" : {
594 "allow_dirty" : [
595 "Changes"
596 ],
597 "allow_dirty_match" : [
598 "(?^:^lib/.*\\.pm$)"
599 ],
600 "changelog" : "Changes"
601 },
602 "Dist::Zilla::Role::Git::Repo" : {
603 "git_version" : "2.15.1",
604 "repo_root" : "."
605 },
606 "Dist::Zilla::Role::Git::StringFormatter" : {
607 "time_zone" : "local"
608 }
609 },
610 "name" : "@Author::OALDERS/@Git::VersionManager/post-release commit",
611 "version" : "2.042"
612 },
613 {
614 "class" : "Dist::Zilla::Plugin::Prereqs",
615 "config" : {
616 "Dist::Zilla::Plugin::Prereqs" : {
617 "phase" : "develop",
618 "type" : "suggests"
619 }
620 },
621 "name" : "@Author::OALDERS/@Git::VersionManager/prereqs for @Git::VersionManager",
622 "version" : "6.010"
623 },
624 {
625 "class" : "Dist::Zilla::Plugin::Git::Push",
626 "config" : {
627 "Dist::Zilla::Plugin::Git::Push" : {
628 "push_to" : [
629 "origin"
630 ],
631 "remotes_must_exist" : 1
632 },
633 "Dist::Zilla::Role::Git::Repo" : {
634 "git_version" : "2.15.1",
635 "repo_root" : "."
636 }
637 },
638 "name" : "@Author::OALDERS/Git::Push",
639 "version" : "2.042"
640 },
641 {
642 "class" : "Dist::Zilla::Plugin::FinderCode",
643 "name" : ":InstallModules",
644 "version" : "6.010"
645 },
646 {
647 "class" : "Dist::Zilla::Plugin::FinderCode",
648 "name" : ":IncModules",
649 "version" : "6.010"
650 },
651 {
652 "class" : "Dist::Zilla::Plugin::FinderCode",
653 "name" : ":TestFiles",
654 "version" : "6.010"
655 },
656 {
657 "class" : "Dist::Zilla::Plugin::FinderCode",
658 "name" : ":ExtraTestFiles",
659 "version" : "6.010"
660 },
661 {
662 "class" : "Dist::Zilla::Plugin::FinderCode",
663 "name" : ":ExecFiles",
664 "version" : "6.010"
665 },
666 {
667 "class" : "Dist::Zilla::Plugin::FinderCode",
668 "name" : ":PerlExecFiles",
669 "version" : "6.010"
670 },
671 {
672 "class" : "Dist::Zilla::Plugin::FinderCode",
673 "name" : ":ShareFiles",
674 "version" : "6.010"
675 },
676 {
677 "class" : "Dist::Zilla::Plugin::FinderCode",
678 "name" : ":MainModule",
679 "version" : "6.010"
680 },
681 {
682 "class" : "Dist::Zilla::Plugin::FinderCode",
683 "name" : ":AllFiles",
684 "version" : "6.010"
685 },
686 {
687 "class" : "Dist::Zilla::Plugin::FinderCode",
688 "name" : ":NoFiles",
689 "version" : "6.010"
690 }
691 ],
692 "zilla" : {
693 "class" : "Dist::Zilla::Dist::Builder",
694 "config" : {
695 "is_trial" : 0
696 },
697 "version" : "6.010"
698 }
699 },
700 "x_contributors" : [
701 "Andrew Moise <andrew.moise@gmail.com>",
702 "Aran Deltac <bluefeet@gmail.com>",
703 "ben hengst <notbenh@cpan.org>",
704 "cho45 <cho45@lowreal.net>",
705 "Daniel Stadie <daniel.stadie@online.de>",
706 "David Ihnen <davidihnen@gmail.com>",
707 "Douglas Christopher Wilson <doug@somethingdoug.com>",
708 "Graham Barr <gbarr@pobox.com>",
709 "Hao Wu <hwu@intellisurvey.com>",
710 "joatis <joatis3@gmail.com>",
711 "Jon Jensen <jon@endpoint.com>",
712 "ktat <ktat.is@gmail.com>",
713 "lsaunders <lsaunders@dev05.backbone.i5invest.com>",
714 "Marco Fontani <MFONTANI@cpan.org>",
715 "Maros Kollar <maros@k-1.com>",
716 "Nicolas Doye <nic@worldofnic.org>",
717 "Olaf Alders <olaf@wundersolutions.com>",
718 "Olivier Bilodeau <olivier@bottomlesspit.org>",
719 "Paul Findlay <paul@findlay.net.nz>",
720 "Perlover <perlover@perlover.com>",
721 "Ramanan Balakrishnan <ramanan90@gmail.com>",
722 "Robin Smidsr\u00f8d <robin@smidsrod.no>",
723 "Ronald J Kimball <rkimball@pangeamedia.com>",
724 "Surikov Alexey <surikov@alexey-pc.kiteventures.local>",
725 "Thom Blake <thom@odonnellpdc.com>",
726 "Uwe <uwe@uwevoelker.de>",
727 "vti <viacheslav.t@gmail.com>",
728 "yeahoffline <frank.gasser@gmail.com>"
729 ],
730 "x_serialization_backend" : "Cpanel::JSON::XS version 3.0233"
731 }
732
0 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.006.
0 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.010.
11 use strict;
22 use warnings;
33
2121 "warnings" => 0
2222 },
2323 "TEST_REQUIRES" => {
24 "ExtUtils::MakeMaker" => 0,
25 "File::Spec" => 0,
2426 "FindBin" => 0,
2527 "JSON::PP" => 0,
2628 "Path::Tiny" => 0,
2931 "Test::Most" => 0,
3032 "Test::NoWarnings" => 0
3133 },
32 "VERSION" => "3.14",
34 "VERSION" => "3.15",
3335 "test" => {
3436 "TESTS" => "t/*.t"
3537 }
3739
3840
3941 my %FallbackPrereqs = (
42 "ExtUtils::MakeMaker" => 0,
43 "File::Spec" => 0,
4044 "FindBin" => 0,
4145 "JSON::PP" => 0,
4246 "Path::Tiny" => 0,
55
66 # VERSION
77
8 version 3.14
8 version 3.15
99
1010 # SYNOPSIS
1111
1212 use HTTP::BrowserDetect;
1313
14 my $user_agent_string = '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';
1415 my $ua = HTTP::BrowserDetect->new($user_agent_string);
1516
1617 # Print general information
237238 robot() generally can be identified in a human-readable fashion by
238239 reading robot\_string() ).
239240
241 ### robot\_id()
242
243 This method is currently in beta.
244
245 Returns an id consisting of lower case letters, numbers and dashes. This id
246 will remain constant, so you can use it for matching against a particular
247 robot. The ids were introduced in version 3.14. There may still be a few
248 corrections to ids in subsequent releases. Once this method becomes stable the
249 ids will also be frozen.
250
251 See `%ROBOT_IDS` in the source of this library to view the possible
252
240253 ## robot\_version(), robot\_major(), robot\_minor(), robot\_beta()
241254
242255 Returns version information for the robot, if any could be
465478
466479 ## Robot properties
467480
481 These methods are now deprecated and will be removed in a future release.
482 Please use the `robot()` and `robot_id()` methods to identify the bots. Use
483 `robot_id()` if you need to match on a string, since the value that is
484 returned by `robot` could possibly change in a future release.
485
468486 The following additional methods are available, each returning a true or false
469487 value. This is by no means a complete list of robots that exist on the Web.
470488
833851
834852 # COPYRIGHT AND LICENSE
835853
836 This software is copyright (c) 2016 by Lee Semel.
854 This software is copyright (c) 2017 by Lee Semel.
837855
838856 This is free software; you can redistribute it and/or modify it under
839857 the same terms as the Perl 5 programming language system itself.
33 requires "warnings" => "0";
44
55 on 'test' => sub {
6 requires "ExtUtils::MakeMaker" => "0";
7 requires "File::Spec" => "0";
68 requires "FindBin" => "0";
79 requires "JSON::PP" => "0";
810 requires "Path::Tiny" => "0";
1012 requires "Test::More" => "0";
1113 requires "Test::Most" => "0";
1214 requires "Test::NoWarnings" => "0";
15 };
16
17 on 'test' => sub {
18 recommends "CPAN::Meta" => "2.120900";
1319 };
1420
1521 on 'configure' => sub {
2228
2329 on 'develop' => sub {
2430 requires "Test::CPAN::Changes" => "0.19";
25 requires "Test::Code::TidyAll" => "0.24";
26 requires "Test::More" => "0.88";
31 requires "Test::Code::TidyAll" => "0.50";
32 requires "Test::More" => "0.96";
2733 requires "Test::Synopsis" => "0";
2834 };
35
36 on 'develop' => sub {
37 suggests "Dist::Zilla::Plugin::BumpVersionAfterRelease::Transitional" => "0.004";
38 suggests "Dist::Zilla::Plugin::CopyFilesFromRelease" => "0";
39 suggests "Dist::Zilla::Plugin::Git::Commit" => "2.020";
40 suggests "Dist::Zilla::Plugin::Git::Tag" => "0";
41 suggests "Dist::Zilla::Plugin::NextRelease" => "5.033";
42 suggests "Dist::Zilla::Plugin::RewriteVersion::Transitional" => "0.004";
43 };
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
109 [@Author::OALDERS]
33 use 5.006;
44
55 package HTTP::BrowserDetect;
6
7 our $VERSION = '3.15';
68
79 use vars qw(@ALL_TESTS);
810
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 robot
161 rubylib
162 slurp
163 specialarchiver
164 wget
165 yahoo
166 yandex
167 yandeximages
168 );
169
170 our @ROBOT_TESTS = (
171 @OLD_ROBOT_TESTS,
172 'Applebot',
173 'Discordbot',
174 'Google Page Speed',
175 'Pro-Sitemaps',
176 'Qwantify',
177 'SkypeUriPreview',
178 'Swiftbot',
179 'W3C_Validator',
180 'WhatsApp',
181 'baiduspider',
182 'bitlybot',
183 'developers.google.com//web/snippet',
184 'embedly',
185 'facebookexternalhit',
186 'flipboard',
187 'linkedinbot',
188 'nuzzel',
189 'outbrain',
190 'pinterest/0.',
191 'pinterestbot',
192 'quora link preview',
193 'redditbot',
194 'rogerbot',
195 'showyoubot',
196 'slackbot',
197 'tumblr',
198 'twitterbot',
199 'vkShare',
135200 );
136201
137202 our @MISC_TESTS = qw(
140205
141206 push @ALL_TESTS,
142207 (
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,
208 @OS_TESTS, @WINDOWS_TESTS,
209 @MAC_TESTS, @UNIX_TESTS,
210 @BSD_TESTS, @GAMING_TESTS,
211 @DEVICE_TESTS, @BROWSER_TESTS,
212 @IE_TESTS, @OPERA_TESTS,
213 @AOL_TESTS, @NETSCAPE_TESTS,
214 @FIREFOX_TESTS, @ENGINE_TESTS,
215 @OLD_ROBOT_TESTS, @MISC_TESTS,
151216 );
152217
153 sub _all_tests {
154 return @ALL_TESTS;
155 }
156
157218 # https://support.google.com/webmasters/answer/1061943?hl=en
158219
159220 my %ROBOT_NAMES = (
160 ahrefs => 'Ahrefs',
161 altavista => 'AltaVista',
162 apache => 'Apache http client',
163 askjeeves => 'AskJeeves',
164 baidu => 'Baidu Spider',
165 bingbot => 'Bingbot',
166 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',
193 puf => 'puf',
194 robot => 'robot',
195 rubylib => 'Ruby http library',
196 slurp => 'Yahoo! Slurp',
197 specialarchiver => 'archive.org_bot',
198 wget => 'wget',
199 yahoo => 'Yahoo',
200 yandex => 'Yandex',
201 yandeximages => 'YandexImages',
221 Applebot => 'Apple',
222 Discordbot => 'Discord',
223 'Google Page Speed' => 'Google Page Speed',
224 'Pro-Sitemaps' => 'Pro Sitemap Service',
225 Qwantify => 'Qwantify',
226 'SkypeUriPreview' => 'Skype URI Preview',
227 Swiftbot => 'Swiftbot',
228 W3C_Validator => 'W3C Validator',
229 WhatsApp => 'WhatsApp',
230 ahrefs => 'Ahrefs',
231 altavista => 'AltaVista',
232 apache => 'Apache HttpClient',
233 askjeeves => 'AskJeeves',
234 baidu => 'Baidu',
235 baiduspider => 'Baidu Spider',
236 bingbot => 'Bingbot',
237 bitlybot => 'Bitly',
238 curl => 'curl',
239 'developers.google.com//web/snippet' => 'Google+ Snippet',
240 embedly => 'Embedly',
241 facebook => 'Facebook',
242 facebookexternalhit => 'Facebook',
243 flipboard => 'Flipboard',
244 getright => 'GetRight',
245 golib => 'Go language http library',
246 google => 'Googlebot',
247 googleadsbot => 'Google AdsBot',
248 googleadsense => 'Google AdSense',
249 googlebotimage => 'Googlebot Images',
250 googlebotnews => 'Googlebot News',
251 googlebotvideo => 'Googlebot Video',
252 googlefavicon => 'Google Favicon',
253 googlemobile => 'Googlebot Mobile',
254 indy => 'Indy Library',
255 infoseek => 'InfoSeek',
256 ipsagent => 'Verisign ips-agent',
257 java => 'Java',
258 linkchecker => 'LinkChecker',
259 linkedinbot => 'LinkedIn',
260 linkexchange => 'LinkExchange',
261 lwp => 'LWP::UserAgent',
262 lycos => 'Lycos',
263 malware => 'Malware / hack attempt',
264 mj12bot => 'Majestic-12 DSearch',
265 msn => 'MSN',
266 msnmobile => 'MSN Mobile',
267 msoffice => 'Microsoft Office',
268 nutch => 'Apache Nutch',
269 nuzzel => 'Nuzzel',
270 outbrain => 'Outbrain',
271 phplib => 'PHP http library',
272 'pinterest/0.' => 'Pinterest',
273 'pinterestbot' => 'Pinterest',
274 puf => 'puf',
275 'quora link preview' => 'Quora Link Preview',
276 redditbot => 'Reddit',
277 robot => 'robot',
278 rogerbot => 'Moz',
279 rubylib => 'Ruby http library',
280 showyoubot => 'Showyou',
281 slackbot => 'slack',
282 slurp => 'Yahoo! Slurp',
283 specialarchiver => 'Internet Archive',
284 tumblr => 'Tumblr',
285 twitterbot => 'Twitter',
286 vkShare => 'VK Share',
287 wget => 'Wget',
288 yahoo => 'Yahoo',
289 yandex => 'Yandex',
290 yandeximages => 'YandexImages',
291 );
292
293 my %ROBOT_IDS = (
294 Applebot => 'apple',
295 Discordbot => 'discord',
296 'Google Page Speed' => 'google-page-speed',
297 'Pro-Sitemaps' => 'pro-sitemap-service',
298 Qwantify => 'qwantify',
299 SkypeUriPreview => 'skype-uri-preview',
300 Swiftbot => 'swiftbot',
301 W3C_Validator => 'w3c-validator',
302 WhatsApp => 'whatsapp',
303 ahrefs => 'ahrefs',
304 altavista => 'altavista',
305 apache => 'apache-http-client',
306 askjeeves => 'askjeeves',
307 baidu => 'baidu',
308 baiduspider => 'baidu',
309 bingbot => 'bingbot',
310 bitlybot => 'bitly',
311 curl => 'curl',
312 'developers.google.com//web/snippet' => 'google-plus-snippet',
313 embedly => 'embedly',
314 facebook => 'facebook',
315 facebookexternalhit => 'facebook',
316 flipboard => 'flipboard',
317 getright => 'getright',
318 golib => 'go-language-http-library',
319 google => 'googlebot',
320 googleadsbot => 'google-adsbot',
321 googleadsense => 'google-adsense',
322 googlebotimage => 'googlebot-images',
323 googlebotnews => 'googlebot-news',
324 googlebotvideo => 'googlebot-video',
325 googlefavicon => 'google-favicon',
326 googlemobile => 'googlebot-mobile',
327 indy => 'indy-library',
328 infoseek => 'infoseek',
329 ipsagent => 'verisign-ips-agent',
330 java => 'java',
331 linkchecker => 'linkchecker',
332 linkedinbot => 'linkedin',
333 linkexchange => 'linkexchange',
334 lwp => 'lwp-useragent',
335 lycos => 'lycos',
336 malware => 'malware-hack-attempt',
337 mj12bot => 'majestic-12-dsearch',
338 msn => 'msn',
339 msnmobile => 'msn-mobile',
340 msoffice => 'microsoft-office',
341 nutch => 'apache-nutch',
342 nuzzel => 'nuzzel',
343 outbrain => 'outbrain',
344 phplib => 'php-http-library',
345 'pinterest/0.' => 'pinterest',
346 'pinterestbot' => 'pinterest',
347 puf => 'puf',
348 'quora link preview' => 'quora-link-preview',
349 redditbot => 'reddit',
350 robot => 'robot',
351 rogerbot => 'moz',
352 rubylib => 'ruby-http-library',
353 showyoubot => 'showyou',
354 slackbot => 'slack',
355 slurp => 'yahoo-slurp',
356 specialarchiver => 'archive-org-bot',
357 tumblr => 'tumblr',
358 twitterbot => 'twitter',
359 vkShare => 'vk-share',
360 wget => 'wget',
361 yahoo => 'yahoo',
362 yandex => 'yandex',
363 yandeximages => 'yandeximages',
202364 );
203365
204366 my %BROWSER_NAMES = (
379541 };
380542 }
381543
382 foreach my $test (@ROBOT_TESTS) {
544 foreach my $test (@OLD_ROBOT_TESTS) {
383545 no strict 'refs';
384546
385547 # For the 'robot' test, we return undef instead of 0 if it's
11331295 && $self->{user_agent} =~ m{\/.*\/}
11341296 && $self->{user_agent} =~ m{
11351297 ([\w]* # Words before fragment
1136 $robot_fragment # Match the fragment
1137 (\/[\d\.]+)? # Version
1138 [\w]*) # Beta stuff
1139 }ix
1298 $robot_fragment # Match the fragment
1299 (\/[\d\.]+)? # Version
1300 [\w]*) # Beta stuff
1301 }ix
11401302 ) {
11411303 # We matched the whole string, but it seems to
11421304 # make more sense as whitespace-separated
22022364 return $self->robot_string;
22032365 }
22042366
2367 sub robot_id {
2368 my $self = shift;
2369 return $self->robot ? $ROBOT_IDS{ $self->robot } : undef;
2370 }
2371
22052372 sub _robot_version {
22062373 my ($self) = @_;
22072374 $self->_init_robots unless exists( $self->{robot_string} );
26962863 return sort @browser_properties;
26972864 }
26982865
2866 sub lib {
2867 my $self = shift;
2868 $self->_init_robots() unless $self->{robot_tests};
2869 return $self->{robot_tests}->{lib};
2870 }
2871
2872 # These method are only used by the test suite.
2873 sub _all_tests {
2874 return @ALL_TESTS;
2875 }
2876
2877 sub _robot_tests {
2878 return @ROBOT_TESTS;
2879 }
2880
2881 sub _robot_names {
2882 return %ROBOT_NAMES;
2883 }
2884
2885 sub _robot_ids {
2886 return %ROBOT_IDS;
2887 }
2888
26992889 1;
27002890
27012891 # ABSTRACT: Determine Web browser, version, and platform from an HTTP user agent string
29323122 additional information (e.g. robots which return "unknown" from
29333123 robot() generally can be identified in a human-readable fashion by
29343124 reading robot_string() ).
3125
3126 =head3 robot_id()
3127
3128 This method is currently in beta.
3129
3130 Returns an id consisting of lower case letters, numbers and dashes. This id
3131 will remain constant, so you can use it for matching against a particular
3132 robot. The ids were introduced in version 3.14. There may still be a few
3133 corrections to ids in subsequent releases. Once this method becomes stable the
3134 ids will also be frozen.
3135
3136 See C<%ROBOT_IDS> in the source of this library to view the possible
29353137
29363138 =head2 robot_version(), robot_major(), robot_minor(), robot_beta()
29373139
31613363
31623364 =head2 Robot properties
31633365
3366 These methods are now deprecated and will be removed in a future release.
3367 Please use the C<robot()> and C<robot_id()> methods to identify the bots. Use
3368 C<robot_id()> if you need to match on a string, since the value that is
3369 returned by C<robot> could possibly change in a future release.
3370
31643371 The following additional methods are available, each returning a true or false
31653372 value. This is by no means a complete list of robots that exist on the Web.
31663373
2929 my $test = $tests->{$ua};
3030
3131 my $detected = HTTP::BrowserDetect->new($ua);
32 diag( $detected->user_agent );
32 subtest $ua => sub {
3333
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}"
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}"
46 );
47 }
48 }
49
50 foreach my $method (
51 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
64 engine_version
65 engine_major
66 engine_minor
67 ios
68 tablet
69 )
70 ) {
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 }
80 }
81
82 foreach my $type ( @{ $test->{match} } ) {
83 ok(
84 $detected->can($type) && $detected->$type,
85 "$type should match"
4686 );
4787 }
48 }
4988
50 foreach my $method (
51 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
64 engine_version
65 engine_major
66 engine_minor
67 ios
68 tablet
69 )
70 ) {
89 is_deeply(
90 [ sort $detected->browser_properties() ],
91 [ sort @{ $test->{match} } ],
92 "browser properties match"
93 );
7194
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 );
95 # Test that $ua doesn't match a specific method
96 foreach my $type ( @{ $test->{no_match} } ) {
97 ok( !$detected->$type, "$type shouldn't match (and doesn't)" );
7998 }
80 }
8199
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
100 };
97101 }
98102
99103 my $detected = HTTP::BrowserDetect->new('Nonesuch');
0 use strict;
1 use warnings;
2
3 use HTTP::BrowserDetect ();
4 use Test::More;
5
6 my $detect = HTTP::BrowserDetect->new;
7
8 my @regexes = $detect->_robot_tests;
9 my %names = $detect->_robot_names;
10 my %ids = $detect->_robot_ids;
11
12 foreach my $key (@regexes) {
13 subtest $key => sub {
14 ok( $names{$key}, 'name' );
15 ok( $ids{$key}, 'id' );
16 unlike(
17 $ids{$key}, qr{[^0-9a-z-]},
18 'id contains only lower case letters or dashes'
19 );
20 };
21 }
22
23 done_testing();
7070 "robot_beta" : ".3",
7171 "robot_major" : "4",
7272 "robot_minor" : ".2",
73 "robot_name" : "Apache http client",
73 "robot_name" : "Apache HttpClient",
7474 "robot_version" : "4.2"
7575 },
7676 "Apache-HttpClient/UNAVAILABLE (java 1.4)" : {
8181 "robot"
8282 ],
8383 "robot" : "apache",
84 "robot_name" : "Apache http client"
84 "robot_name" : "Apache HttpClient"
8585 },
8686 "Apple-PubSub/28" : {
8787 "browser" : "pubsub",
144144 "baidu"
145145 ],
146146 "robot" : "baidu",
147 "robot_name" : "Baidu Spider"
147 "robot_name" : "Baidu"
148148 },
149149 "BingLocalSearchBot/1.0" : {
150150 "browser_major" : "1",
1641516415 "robot_beta" : "",
1641616416 "robot_major" : "2",
1641716417 "robot_minor" : ".0",
16418 "robot_name" : "Baidu Spider",
16418 "robot_name" : "Baidu",
1641916419 "robot_version" : "2.0"
1642016420 },
1642116421 "Mozilla/5.0 (compatible; Blekkobot; ScoutJet; +http://blekko.com/about/blekkobot)" : {
1972919729 "robot"
1973019730 ],
1973119731 "robot" : "wget",
19732 "robot_name" : "wget"
19732 "robot_name" : "Wget"
1973319733 },
1973419734 "WikiDo/1.1 (http://wikido.com; crawler@wikido.com)" : {
1973519735 "browser_major" : "1",
8686 "no_match" : null,
8787 "other" : null,
8888 "robot" : "baidu",
89 "robot_string" : "Baidu Spider",
89 "robot_string" : "Baidu",
9090 "version" : null
9191 },
9292 "BlackBerry7730/3.7.1 UP.Link/5.1.2.5" : {
48494849 "robot_beta" : ".1",
48504850 "robot_major" : "3",
48514851 "robot_minor" : ".1",
4852 "robot_name" : "archive.org_bot",
4853 "robot_string" : "archive.org_bot",
4852 "robot_name" : "Internet Archive",
4853 "robot_string" : "Internet Archive",
48544854 "robot_version" : "3.1"
48554855 },
48564856 "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" : {
68356835 "robot_beta" : ".5",
68366836 "robot_major" : "1",
68376837 "robot_minor" : ".4",
6838 "robot_string" : "wget",
6838 "robot_string" : "Wget",
68396839 "robot_version" : "1.4",
68406840 "version" : "1.4"
68416841 },
0 [JSON]
1 select = t/**/*json
2
03 [PerlTidy]
14 select = **/*.{pl,pm,t,psgi}
5 ignore = .build/**/*
6 ignore = HTTP-BrowserDetect-*/**/*
7 ignore = blib/**/*
28 ignore = t/00-*
39 ignore = t/author-*
410 ignore = t/release-*
5 ignore = blib/**/*
6 ignore = .build/**/*
7 ignore = HTTP-BrowserDetect-*/**/*
11 ignore = t/zzz-*
12 ignore = xt/**/*
813 argv = --profile=$ROOT/perltidyrc
914
1015 [SortLines::Naturally]
1116 select = .gitignore
12
13 [JSON]
14 select = t/**/*json
15
16 ;[PerlCritic]
17 ;select = **/*.{pl,pm,t,psgi}
18 ;ignore = t/00-*
19 ;ignore = t/author-*
20 ;ignore = t/release-*
21 ;ignore = blib/**/*
22 ;ignore = .build/**/*
23 ;ignore = HTTP-BrowserDetect-*/**/*
24 ;argv = --profile $ROOT/perlcriticrc --program-extensions .pl --program-extensions .t --program-extensions .psgi