Parse-HTTP-UserAgent-0.43/000755 000765 000024 00000000000 15003317605 015431 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/LICENSE000644 000765 000024 00000046427 15003317605 016453 0ustar00burakstaff000000 000000 This software is copyright (c) 2009 by Burak Gursoy. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2009 by Burak Gursoy. This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Perl Artistic License 1.0 --- This software is Copyright (c) 2009 by Burak Gursoy. This is free software, licensed under: The Perl Artistic License 1.0 The "Artistic License" Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. "Copyright Holder" is whoever is named in the copyright or copyrights for the package. "You" is you, if you're thinking about copying or distributing this Package. "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. 7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. 8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. 9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End Parse-HTTP-UserAgent-0.43/Changes000644 000765 000024 00000005532 15003317605 016731 0ustar00burakstaff000000 000000 Revision history for Perl extension Parse::HTTP::UserAgent 0.43 2025-04-27 BURAK - DEPRECATED. Please use HTTP::BrowserDetect instead. 0.42 2017-11-20 BURAK - Re-release after distro fixes. 0.41 2017-11-20 BURAK - New tests for new browsers 0.40_02 2017-08-09 BURAK - RT#112106 Nigel Gregoire / Slaven Resic 0.40_01 Fri Dec 6 15:38:22 2013 - Get rid of pre5.6-isms. - Refactor constant definitions. - Support MSIE 10/11 - New TOUCH property. - Support new windows versions in the OS name fixer. - New test strings (mostly TODO). - Always check the existance of Trident. - Support Symbian. 0.39 Mon Dec 2 02:20:23 2013 - Fix for RT#89274 0.38 Mon Sep 16 07:45:22 2013 - Fix packaging issue. 0.37 Thu Sep 12 15:09:15 2013 - Support new Opera - Fix RT#80323 0.36 Sun Jul 8 01:50:04 2012 - Bump version. 0.35 Mon May 14 03:53:18 2012 - New .NET string support. - Handle embedded parens in a better way. - Set the ua parser name only if it wasn't set inside the actual parser. - Fixes for Maxthon and Android stupidities. - Fix for emacs parser. - Fix mozilla parser. - Fennec support. 0.34 Sun Apr 8 00:08:41 2012 - "normalize" option. - Fix RT#76351 reported by DAMOG. 0.33 Tue Nov 15 05:22:15 2011 - Fix version warning regex. 0.32 Sun Nov 6 00:55:40 2011 - Internal cleanup. - Fixed RT#72159 (Arsen Shirokov). 0.31 Sat Oct 29 19:47:01 2011 - Version parsing fix for RT#71999. - iPad support (RT#71999). 0.30 Thu Oct 27 00:13:10 2011 - Update test suite strings. - Internal cleanup. - Android support (+Tablet). - Konqueror support. - Overhaul test suite. - New test strings. 0.21 Wed Oct 19 02:13:29 2011 - Data::Dumper dumps are now sorted. - Unit test fixes. - Fix RT#71753 (Neil Bowers) 0.20 Tue Oct 27 05:32:45 2009 - New parsers for Emacs, HotJava and a generic parser for robot types. 0.17 Wed Sep 23 20:55:50 2009 - Perl::Critic refactoring - Fix _parse_opera_pre() to prevent die()ing. Reported by: Jim Butler 0.16 Sat Sep 5 08:51:22 2009 - Internal cleanup. - Parser fixes for os/lang fields. 0.15 Sun Aug 30 03:09:49 2009 - Opera 10 beta support. - Work around for version::vpp bug which was causing regressions under legacy perls (probably the xs version couldn't be installed on them). 0.14 Fri Aug 28 10:30:49 2009 - Pod updates. - Epiphany support. - Add bench.pl to distro 0.13 Thu Aug 27 07:19:32 2009 - Monolithic version is now bundled. 0.12 Thu Aug 27 06:55:49 2009 - Use version->new() instead of qv(). - Moved accessors into base class. - Moved all base classes into ::Base::. 0.11 Wed Aug 26 08:43:04 2009 - Add Trident detection to msie parser. remove duplicate from maxthon. 0.10 Tue Aug 25 09:39:48 2009 - First release. Parse-HTTP-UserAgent-0.43/MANIFEST000644 000765 000024 00000005151 15003317605 016564 0ustar00burakstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.032. Changes LICENSE MANIFEST META.json META.yml Makefile.PL dist.ini eg/accuracy.pl eg/bench.pl eg/dump.pl etc/Migration.pod lib/Parse/HTTP/UserAgent.pm lib/Parse/HTTP/UserAgent/Base/Accessors.pm lib/Parse/HTTP/UserAgent/Base/Dumper.pm lib/Parse/HTTP/UserAgent/Base/IS.pm lib/Parse/HTTP/UserAgent/Base/Parsers.pm lib/Parse/HTTP/UserAgent/Constants.pm t/00-compile.t t/00-report-prereqs.dd t/00-report-prereqs.t t/02-parser.t t/03-strings.t t/author-distmeta.t t/author-pod-coverage.t t/author-pod-syntax.t t/data/README t/data/desktop/camino/1 t/data/desktop/chrome/1 t/data/desktop/chrome/62x t/data/desktop/epiphany/1 t/data/desktop/firefox/0x t/data/desktop/firefox/16x t/data/desktop/firefox/1x t/data/desktop/firefox/2x t/data/desktop/firefox/3x t/data/desktop/firefox/57x t/data/desktop/firefox/6x t/data/desktop/firefox/7x t/data/desktop/firefox/suspect/3x t/data/desktop/konqueror/1x t/data/desktop/konqueror/2x t/data/desktop/konqueror/3x t/data/desktop/konqueror/4x t/data/desktop/lunascape/1 t/data/desktop/maxthon/1x t/data/desktop/maxthon/2x t/data/desktop/maxthon/3x t/data/desktop/maxthon/bogus t/data/desktop/mozilla/1 t/data/desktop/msie/10x t/data/desktop/msie/11x t/data/desktop/msie/3x t/data/desktop/msie/4x t/data/desktop/msie/5x t/data/desktop/msie/6x t/data/desktop/msie/7x t/data/desktop/msie/8x t/data/desktop/msie/broken/6x t/data/desktop/msie/broken/8x t/data/desktop/msie/broken/9x t/data/desktop/msie/extras/10x t/data/desktop/msoffice/outlook t/data/desktop/netscape/1x t/data/desktop/netscape/2x t/data/desktop/netscape/3x t/data/desktop/netscape/4x t/data/desktop/netscape/5x t/data/desktop/netscape/6x t/data/desktop/netscape/7x t/data/desktop/opera/03x t/data/desktop/opera/05x t/data/desktop/opera/06x t/data/desktop/opera/07x t/data/desktop/opera/08x t/data/desktop/opera/09x t/data/desktop/opera/10x t/data/desktop/opera/11x t/data/desktop/opera/16x t/data/desktop/opera/48x t/data/desktop/safari/1 t/data/desktop/safari/11x t/data/desktop/seamonkey/1 t/data/desktop/sleipnir/1 t/data/desktop/tinybrowser/1 t/data/mobile/firefox t/data/mobile/opera/1 t/data/mobile/phone/android/1 t/data/mobile/phone/android/dell t/data/mobile/phone/android/google t/data/mobile/phone/android/htc t/data/mobile/phone/android/motorola t/data/mobile/phone/android/samsung t/data/mobile/phone/android/sony t/data/mobile/phone/iphone/1 t/data/mobile/phone/symbian/nokia t/data/mobile/tablet/android/samsung t/data/mobile/tablet/ipad/1 t/data/mobile/tablet/windows/1 t/data/mua/thunderbird/17x t/data/robot/1 t/data/various/1 t/data/various/2 t/data/various/todo t/db.pl Parse-HTTP-UserAgent-0.43/etc/000755 000765 000024 00000000000 15003317605 016204 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/000755 000765 000024 00000000000 15003317605 015674 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/META.yml000644 000765 000024 00000002271 15003317605 016704 0ustar00burakstaff000000 000000 --- abstract: 'Parser for the User Agent string' author: - 'Burak Gursoy' build_requires: ExtUtils::MakeMaker: '0' File::Basename: '0' File::Find: '0' File::Spec: '0' FindBin: '0' Getopt::Long: '0' IO::File: '0' IO::Handle: '0' IPC::Open3: '0' Test::More: '0' perl: '5.010' vars: '0' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010' keywords: - parser - http - useragent - agent license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: Parse-HTTP-UserAgent requires: Carp: '0' Data::Dumper: '0' Exporter: '0' JSON: '0' Test::More: '0' XML::Simple: '0' YAML: '0' constant: '0' overload: '0' parent: '0' perl: '5.010' strict: '0' version: '0' warnings: '0' resources: bugtracker: https://github.com/burak/CPAN-Parse-HTTP-UserAgent/issues repository: git://github.com/burak/CPAN-Parse-HTTP-UserAgent.git version: '0.43' x_contributors: - 'Burak Gursoy' x_generated_by_perl: v5.40.1 x_serialization_backend: 'YAML::Tiny version 1.76' x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later' Parse-HTTP-UserAgent-0.43/lib/000755 000765 000024 00000000000 15003317605 016177 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/Makefile.PL000644 000765 000024 00000003574 15003317605 017414 0ustar00burakstaff000000 000000 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.032. use strict; use warnings; use 5.010; use ExtUtils::MakeMaker; my %WriteMakefileArgs = ( "ABSTRACT" => "Parser for the User Agent string", "AUTHOR" => "Burak Gursoy", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => 0 }, "DISTNAME" => "Parse-HTTP-UserAgent", "LICENSE" => "perl", "MIN_PERL_VERSION" => "5.010", "NAME" => "Parse::HTTP::UserAgent", "PREREQ_PM" => { "Carp" => 0, "Data::Dumper" => 0, "Exporter" => 0, "JSON" => 0, "Test::More" => 0, "XML::Simple" => 0, "YAML" => 0, "constant" => 0, "overload" => 0, "parent" => 0, "strict" => 0, "version" => 0, "warnings" => 0 }, "TEST_REQUIRES" => { "ExtUtils::MakeMaker" => 0, "File::Basename" => 0, "File::Find" => 0, "File::Spec" => 0, "FindBin" => 0, "Getopt::Long" => 0, "IO::File" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "Test::More" => 0, "vars" => 0 }, "VERSION" => "0.43", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Carp" => 0, "Data::Dumper" => 0, "Exporter" => 0, "ExtUtils::MakeMaker" => 0, "File::Basename" => 0, "File::Find" => 0, "File::Spec" => 0, "FindBin" => 0, "Getopt::Long" => 0, "IO::File" => 0, "IO::Handle" => 0, "IPC::Open3" => 0, "JSON" => 0, "Test::More" => 0, "XML::Simple" => 0, "YAML" => 0, "constant" => 0, "overload" => 0, "parent" => 0, "strict" => 0, "vars" => 0, "version" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); Parse-HTTP-UserAgent-0.43/eg/000755 000765 000024 00000000000 15003317605 016024 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/META.json000644 000765 000024 00000004610 15003317605 017053 0ustar00burakstaff000000 000000 { "abstract" : "Parser for the User Agent string", "author" : [ "Burak Gursoy" ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.032, CPAN::Meta::Converter version 2.150010", "keywords" : [ "parser", "http", "useragent", "agent" ], "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "Parse-HTTP-UserAgent", "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Pod::Coverage::TrustPod" : "0", "Test::CPAN::Meta" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08" } }, "runtime" : { "requires" : { "Carp" : "0", "Data::Dumper" : "0", "Exporter" : "0", "JSON" : "0", "Test::More" : "0", "XML::Simple" : "0", "YAML" : "0", "constant" : "0", "overload" : "0", "parent" : "0", "perl" : "5.010", "strict" : "0", "version" : "0", "warnings" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "ExtUtils::MakeMaker" : "0", "File::Basename" : "0", "File::Find" : "0", "File::Spec" : "0", "FindBin" : "0", "Getopt::Long" : "0", "IO::File" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Test::More" : "0", "perl" : "5.010", "vars" : "0" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/burak/CPAN-Parse-HTTP-UserAgent/issues" }, "repository" : { "type" : "git", "url" : "git://github.com/burak/CPAN-Parse-HTTP-UserAgent.git", "web" : "https://github.com/burak/CPAN-Parse-HTTP-UserAgent" } }, "version" : "0.43", "x_contributors" : [ "Burak Gursoy" ], "x_generated_by_perl" : "v5.40.1", "x_serialization_backend" : "Cpanel::JSON::XS version 4.39", "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later" } Parse-HTTP-UserAgent-0.43/dist.ini000644 000765 000024 00000002023 15003317605 017072 0ustar00burakstaff000000 000000 ; basic stuff name = Parse-HTTP-UserAgent author = Burak Gursoy license = Perl_5 copyright_holder = Burak Gursoy copyright_year = 2009 ; file modifiers [PkgVersion] [PodWeaver] ; file generators [ManifestSkip] [Manifest] [License] [MakeMaker] [PruneCruft] [GatherDir] exclude_filename = weaver.ini exclude_match = Parse-HTTP-UserAgent-[0-9]+ ; metadata [MetaYAML] [MetaJSON] [Keywords] keywords = parser http useragent agent [AutoPrereqs] [Prereqs] perl = 5.010 parent = 0 version = 0 [ExecDir] [ShareDir] [GitHub::Meta] [Meta::Contributors] contributor = Burak Gursoy ; tests [MetaTests] [ExtraTests] [PodSyntaxTests] [PodCoverageTests] [Test::ReportPrereqs] [Test::Compile] ; release [NextRelease] format = %v %{yyyy-MM-dd}d %P [TestRelease] [ConfirmRelease] [UploadToCPAN] ; git [Git::Check] [Git::Commit] commit_msg = Changes for version %v [Git::Tag] tag_format = v%v tag_message = %N v%v [Git::Push] push_to = origin [Git::NextVersion] Parse-HTTP-UserAgent-0.43/eg/dump.pl000644 000765 000024 00000001477 15003317605 017337 0ustar00burakstaff000000 000000 #!/usr/bin/env perl -w # (c) 2009 Burak Gursoy. Distributed under the Perl License. # Enables internal pre-parsed structure dumper and then dumps # the parsed structure. use strict; use vars qw( $VERSION ); use warnings; use lib qw( ../lib lib ); use Getopt::Long; $VERSION = '0.11'; my $timediff; BEGIN { *Parse::HTTP::UserAgent::DEBUG = sub () { 1 }; eval { require Time::HiRes; Time::HiRes->import('time'); $timediff = 1; }; } GetOptions(\my %arg, qw( normalize )); use Parse::HTTP::UserAgent; my $opt = {}; $opt->{normalize} = ':all' if $arg{normalize}; my $str = shift || die "UserAgent?\n"; my $start = time; my $ua = Parse::HTTP::UserAgent->new( $str, $opt ); my $end = time; print $ua->dumper; if ( $timediff ) { printf "\nTook %.5f seconds.\n", $end - $start; } Parse-HTTP-UserAgent-0.43/eg/bench.pl000644 000765 000024 00000005571 15003317605 017450 0ustar00burakstaff000000 000000 #!/usr/bin/env perl # (c) 2009 Burak Gursoy. Distributed under the Perl License. use strict; use warnings; use Getopt::Long; GetOptions(\my %opt, qw( count=i single timethese )); use HTTP::BrowserDetect; use Parse::HTTP::UserAgent; use HTTP::DetectUserAgent; use HTML::ParseBrowser; use Benchmark qw( :all :hireswallclock ); use lib qw( .. ); use constant COLUMN => q{-} x 80; our $SILENT = 1; my $HPB = my $ua = HTML::ParseBrowser->new; sub html_parsebrowser { my $ua = HTML::ParseBrowser->new( shift ); return $ua; } sub html_parsebrowser2 { my $ua = $HPB->Parse( shift ); return $ua; } sub http_browserdetect { my $ua = HTTP::BrowserDetect->new( shift ); return $ua; } sub http_detectuseragent { my $ua = HTTP::DetectUserAgent->new( shift ); return $ua; } sub parse_http_useragent { my $ua = Parse::HTTP::UserAgent->new( shift ); return $ua; } sub parse_http_useragent2 { my $ua = Parse::HTTP::UserAgent->new( shift, {extended=>0} ); return $ua; } do 't/db.pl'; my $count = $opt{single} ? '10000' : $opt{count} ? $opt{count} : '100' ; my @tests = map { $_->{string} } database({ thaw => 1 }); @tests = ( $tests[ rand @tests ] ) if $opt{single}; my $total = @tests; my $pok; $pok = print "*** WARNING !!! --single option is in effect!\n" if $opt{single}; $pok = print <<"ATTENTION"; *** The data integrity is not checked in this run. *** This is a benchmark for parser speeds. *** Testing $total User Agent strings on each module with $count iterations each. This may take a while. Please stand by ... ATTENTION my $start = Benchmark->new; my $test = { HTML => sub { foreach my $s (@tests) { my $ua = html_parsebrowser( $s ) } }, HTML2 => sub { foreach my $s (@tests) { my $ua = html_parsebrowser2( $s ) } }, Browser => sub { foreach my $s (@tests) { my $ua = http_browserdetect( $s ) } }, Detect => sub { foreach my $s (@tests) { my $ua = http_detectuseragent( $s ) } }, Parse => sub { foreach my $s (@tests) { my $ua = parse_http_useragent( $s ) } }, Parse2 => sub { foreach my $s (@tests) { my $ua = parse_http_useragent2( $s ) } }, }; cmpthese( $count, $test ); if ( $opt{timethese} ) { $pok = print COLUMN, "\n"; timethese($count, $test ); } my $runtime = timestr( timediff(Benchmark->new, $start) ); my $dashes = COLUMN; $pok = print <<"GOODBYE"; $dashes The code took: $runtime $dashes List of abbreviations: HTML HTML::ParseBrowser v$HTML::ParseBrowser::VERSION HTML2 HTML::ParseBrowser v$HTML::ParseBrowser::VERSION (re-use the object) Browser HTTP::BrowserDetect v$HTTP::BrowserDetect::VERSION Detect HTTP::DetectUserAgent v$HTTP::DetectUserAgent::VERSION Parse Parse::HTTP::UserAgent v$Parse::HTTP::UserAgent::VERSION Parse2 Parse::HTTP::UserAgent v$Parse::HTTP::UserAgent::VERSION (without extended probe) GOODBYE 1; __END__ Parse-HTTP-UserAgent-0.43/eg/accuracy.pl000644 000765 000024 00000017153 15003317605 020162 0ustar00burakstaff000000 000000 #!/usr/bin/env perl # (c) Burak Gursoy. Distributed under the Perl License. use strict; use warnings; use subs qw(_p); use lib qw( .. ); use constant HUNDRED => 100; use Carp qw( croak ); use Data::Dumper; use Getopt::Long; use HTTP::BrowserDetect; use HTTP::DetectUserAgent; use HTML::ParseBrowser; use Parse::HTTP::UserAgent; use Text::Table; GetOptions(\my %opt, qw( debug )); our $SILENT = 1; do 't/db.pl'; run(); sub run { my @tests = database({ thaw => 1 }); welcome( scalar @tests ); my @fail_common = map { $_ => 0 } qw( lang os version ); my %fail = ( 'Parse::HTTP::UserAgent' => { name => {}, @fail_common }, 'HTML::ParseBrowser' => { name => {}, @fail_common }, 'HTTP::DetectUserAgent' => { name => {}, @fail_common }, 'HTTP::BrowserDetect' => { name => {}, @fail_common }, ); my %total; foreach my $test ( @tests ) { my %ok = parse_http_useragent( $test->{string} ); my %hdua = http_detectuseragent( $test->{string} ); my %hpb = html_parsebrowser( $test->{string} ); my %hbd = http_browserdetect( $test->{string} ); my %is = set_is( \%ok, \%hpb, \%hbd, \%hdua, $test->{string} ); foreach my $adjust ( qw( name lang version os ) ) { ++$total{ $adjust } if $is{ $adjust }; } $hdua{name} = q{} if $hdua{name} && $hdua{name} eq 'Unknown'; failures( \%fail, \%is, \%ok, \%hdua, \%hbd, \%hpb ); my $phua_fail = ( $is{lang} && ! $ok{lang} ) || $is{v_nok} || ( $is{os} && ! $ok{os} ) || ( $is{name} && ! $ok{name} ); if ( $opt{debug} && $phua_fail ) { debug_fail( \%is, \%ok, \%hdua, \%hpb, \%hbd, $test->{string} ); } } results( \%fail, \%total ); return; } sub welcome { my $total = shift; return _p <<"ATTENTION"; *** This is a test to compare the accuracy of the parsers. *** The data set is from the test suite. There are $total UA strings *** Parse::HTTP::UserAgent will detect all of them *** A tiny fraction of the regressions can be related to wrong parsing. *** Equation tests are not performed. Tests are boolean. This may take a while. Please stand by ... ATTENTION } sub set_is { my($ok, $hpb, $hbd, $hdua, $string) = @_; my $fetch = sub { my($field, @slots) = @_; my @rv = grep { $_ } map { $_->{ $field } } $ok, $hpb, $hbd, $hdua; return $rv[0]; }; my %is = map { $_ => $fetch->( $_ ) } qw( name lang version os ); $is{v_nok} = $is{version} && ! $ok->{version} && _valid_v( $is{version}, $string ); return %is; } sub debug_fail { my($is, $ok, $hdua, $hpb, $hbd, $string) = @_; _p "$string\n", _p "LANG : $is->{lang}\n" if $is->{lang} && ! $ok->{lang}; _p "VERSION: $is->{version}\n" if $is->{v_nok}; _p "OS : $is->{os}\n" if $is->{os} && ! $ok->{os}; _p "NAME : $is->{name}\n" if $is->{name} && ! $ok->{name}; _p Dumper({ parse_http_useragent => $ok, http_detectuseragent => $hdua, html_parsebrowser => $hpb, http_browserdetect => $hbd, }); _p q{-} x '80', "\n"; return; } sub results { my($fail, $total) = @_; my $tb = Text::Table->new( q{|}, 'Parser', q{|}, 'Name FAILS', q{|}, 'Version FAILS', q{|}, 'Language FAILS', q{|}, 'OS FAILS', q{|}, ); foreach my $parser ( keys %{$fail} ) { my $all = $fail->{$parser}{name}; my $name = 0; $name += $all->{$_} for keys %{ $all }; my $v = ratio( $fail->{$parser}{version}, $total->{version} ); my $l = ratio( $fail->{$parser}{lang} , $total->{lang} ); my $os = ratio( $fail->{$parser}{os} , $total->{os} ); $name = ratio( $name , $total->{name} ); $tb->load([ q{|}, $parser, q{|}, $name, q{|}, $v, q{|}, $l, q{|}, $os, q{|}, ]); } _p $tb->rule( qw( - + ) ) . $tb->title . $tb->rule( qw( - + ) ) . $tb->body . $tb->rule( qw( - + ) ) ; return; } sub ratio { my $v = shift; my $tot = shift; my $r = $v ? sprintf('%.2f', ($v*HUNDRED)/$tot) : '0.00'; return sprintf '% 4d - % 6s%%', $v, $r; } sub parse_http_useragent { my $ua = Parse::HTTP::UserAgent->new( shift ); my %rv = $ua->as_hash; $rv{name} = 'Internet Explorer' if $rv{name} && $rv{name} eq 'MSIE'; return %rv; } sub html_parsebrowser { my $ua = HTML::ParseBrowser->new( shift ); my %rv = map { $_ => $ua->$_() } qw( user_agent languages language langs lang detail useragents properties name version v major minor os ostype osvers osarc ); # version is a hash with major/minor crap $rv{_version} = delete $rv{version}; $rv{version} = $rv{v}; return %rv; } sub http_browserdetect { # can not detect lang my $ua = HTTP::BrowserDetect->new( shift ); return version => $ua->version, os => $ua->os_string, name => $ua->browser_string, ; } sub http_detectuseragent { my $ua = HTTP::DetectUserAgent->new( shift ); my %rv = map { $_ => $ua->$_() } qw (name version vendor type os); return %rv; } sub failures { my($fail, $is, $ok, $hdua, $hbd, $hpb) = @_; no strict qw( refs ); foreach my $name ( qw( lang version os name ) ) { &{ '_fail_' . $name }( $fail, $is, $ok, $hdua, $hbd, $hpb ); } return; } sub _fail_lang { my($fail, $is, $ok, $hdua, $hbd, $hpb) = @_; my $L = $is->{lang}; $fail->{'Parse::HTTP::UserAgent'}->{lang}++ if $L && ! $ok->{lang}; $fail->{'HTTP::DetectUserAgent' }->{lang}++ if $L && ! $hdua->{lang}; $fail->{'HTML::ParseBrowser' }->{lang}++ if $L && ! $hpb->{lang}; $fail->{'HTTP::BrowserDetect' }->{lang}++ if $L && ! $hbd->{lang}; return; } sub _fail_version { my($fail, $is, $ok, $hdua, $hbd, $hpb) = @_; my $v = $is->{version}; $fail->{'Parse::HTTP::UserAgent'}->{version}++ if $is->{v_nok}; $fail->{'HTTP::DetectUserAgent' }->{version}++ if $v && ! $hdua->{version}; $fail->{'HTML::ParseBrowser' }->{version}++ if $v && ! $hpb->{v}; $fail->{'HTTP::BrowserDetect' }->{version}++ if $v && ! $hbd->{version}; return; } sub _fail_os { my($fail, $is, $ok, $hdua, $hbd, $hpb) = @_; my $os = $is->{os}; $fail->{'Parse::HTTP::UserAgent'}->{os}++ if $os && ! $ok->{os}; $fail->{'HTTP::DetectUserAgent' }->{os}++ if $os && ! $hdua->{os}; $fail->{'HTML::ParseBrowser' }->{os}++ if $os && ! $hpb->{os}; $fail->{'HTTP::BrowserDetect' }->{os}++ if $os && ! $hbd->{os}; return; } sub _fail_name { my($fail, $is, $ok, $hdua, $hbd, $hpb) = @_; my $n = $is->{name}; ++$fail->{'Parse::HTTP::UserAgent'}->{name}{ $n } if $n && ! $ok->{name}; ++$fail->{'HTTP::DetectUserAgent' }->{name}{ $n } if $n && ! $hdua->{name}; ++$fail->{'HTML::ParseBrowser' }->{name}{ $n } if $n && ! $hpb->{name}; ++$fail->{'HTTP::BrowserDetect' }->{name}{ $n } if $n && ! $hbd->{name}; return; } sub _valid_v { # prevent false-positives my($v, $str)= @_; return $str !~ m{ \A Mozilla [/] $v \s }xms; } sub _p { print {*STDOUT} @_ or croak "Can't print: $!"; } 1; __END__ Parse-HTTP-UserAgent-0.43/lib/Parse/000755 000765 000024 00000000000 15003317605 017251 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/000755 000765 000024 00000000000 15003317605 020030 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/UserAgent/000755 000765 000024 00000000000 15003317605 021725 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/UserAgent.pm000644 000765 000024 00000041203 15003317605 022263 0ustar00burakstaff000000 000000 package Parse::HTTP::UserAgent; $Parse::HTTP::UserAgent::VERSION = '0.43'; use strict; use warnings; use parent qw( Parse::HTTP::UserAgent::Base::IS Parse::HTTP::UserAgent::Base::Parsers Parse::HTTP::UserAgent::Base::Dumper Parse::HTTP::UserAgent::Base::Accessors ); use overload '""', => 'name', '0+', => 'version', fallback => 1, ; use version; use Carp qw( croak ); use Parse::HTTP::UserAgent::Constants qw(:all); BEGIN { constant->import( DEBUG => 0 ) if not defined &DEBUG; } my %OSFIX = ( 'WinNT4.0' => 'Windows NT 4.0', 'WinNT' => 'Windows NT', 'Windows 4.0' => 'Windows 95', 'Win95' => 'Windows 95', 'Win98' => 'Windows 98', 'Windows 4.10' => 'Windows 98', 'Win 9x 4.90' => 'Windows Me', 'Windows NT 5.0' => 'Windows 2000', 'Windows NT 5.1' => 'Windows XP', 'Windows XP 5.1' => 'Windows XP', # huh? 'Windows NT 5.2' => 'Windows Server 2003', 'Windows NT 6.0' => 'Windows Vista / Server 2008', 'Windows NT 6.1' => 'Windows 7', 'Windows NT 6.2' => 'Windows 8', 'Windows NT 6.3' => 'Windows 8.1', ); sub new { my $class = shift; my $ua = shift || croak 'No user agent string specified'; my $opt = shift || {}; croak 'Options must be a hash reference' if ref $opt ne 'HASH'; my $self = [ map { undef } 0..MAXID ]; bless $self, $class; @{ $self }[ UA_STRING, UA_STRING_ORIGINAL ] = ($ua) x 2; $self->[IS_EXTENDED] = exists $opt->{extended} ? $opt->{extended} : 1; $self->_normalize( $opt->{normalize} ) if $opt->{normalize}; $self->_parse; return $self; } sub as_hash { my $self = shift; my %struct; foreach my $id ( $self->_object_ids ) { (my $name = $id) =~ s{ \A UA_ }{}xms; $struct{ lc $name } = $self->[ $self->$id() ]; } return %struct; } sub trim { my $self = shift; my $s = shift; return $s if ! $s; $s =~ s{ \A \s+ }{}xms; $s =~ s{ \s+ \z }{}xms; return $s; } sub _normalize { my $self = shift; my $nopt = shift; my $type = ref $nopt; my @o = ! $type ? ':all' : $type eq 'ARRAY' ? @{ $nopt } : croak "Normalization option $nopt is invalid"; my %mode = map { $_ => 1 } @o; my @all = qw( plus_to_space trim_spaces ); @mode{ @all } = (1) x @all if delete $mode{':all'}; my $s = \$self->[UA_STRING]; ${$s} =~ s{[+]}{ }xmsg if $mode{plus_to_space}; ${$s} =~ s<\s+>< >xmsg if $mode{trim_spaces}; return; } sub _parse { my $self = shift; return $self if $self->[IS_PARSED]; $self->_do_parse( $self->_pre_parse ); $self->[IS_PARSED] = 1; $self->_post_parse if ! $self->[UA_UNKNOWN]; return; } sub _pre_parse { my $self = shift; my $ua = $self->[UA_STRING]; my $uc_ua = uc $ua; $self->[IS_MAXTHON] = index($uc_ua, 'MAXTHON') != NO_IMATCH; $self->[IS_TRIDENT] = index($uc_ua, 'TRIDENT/') != NO_IMATCH; my @parts; my $i = 0; my $depth = 0; foreach my $token ( split RE_SPLIT_PARSE, $ua ) { if ( $token eq '(' ) { $i++ if ++$depth == 1; next; } if ( $token eq ')' ) { $i++ if --$depth == 0; next; } push @{ $parts[$i] ||= [] }, $token; } # Hopefully the above code was successful and now we can set the actual # tokens to use inside parsers. my($moz) = join ' ', @{ shift(@parts) || [] }; my($thing) = join ' ', @{ shift(@parts) || [] }; my($extra) = join ' ', @{ shift(@parts) || [] }; my(@others) = map { @{ $_ } } @parts; $thing = $thing ? [ split RE_SC_WS, $thing ] : []; $extra = [ split RE_WHITESPACE, $extra ] if $extra; $self->_debug_pre_parse( $moz, $thing, $extra, @others ) if DEBUG; return $moz, $thing, $extra, @others; } sub _do_parse { my($self, $m, $t, $e, @o) = @_; my $c = $t->[0] && $t->[0] eq 'compatible'; if ( $c && shift @{$t} # just inline removal of "compatible" && ( ! $e || $self->[IS_TRIDENT] ) # older versions don't have junk outside, while newer might have && ! $self->[IS_MAXTHON] # be sure that this is not the faker ) { my($n, $v) = split RE_WHITESPACE, $t->[0]; if ( $n eq 'MSIE' && index($m, q{ }) == NO_IMATCH ) { return $self->_parse_msie($m, $t, $e, $n, $v); } } if ( $self->[IS_TRIDENT] ) { # http://blogs.msdn.com/b/ieinternals/archive/2013/09/21/internet-explorer-11-user-agent-string-ua-string-sniffing-compatibility-with-gecko-webkit.aspx my %msie11 = map { index( $_, 'Windows') != NO_IMATCH ? ( windows => 1 ) : index( $_, 'Trident/') != NO_IMATCH ? ( trident => 1 ) : index( $_, 'rv:') != NO_IMATCH ? ( version => 1 ) : () } @{ $t }; my $msie_matched = keys %msie11; if ( $msie_matched == 3 ){ return $self->_parse_msie_11($m, $t, $e); } elsif ( ! $self->[IS_MAXTHON] && $msie_matched == 2 && ! $msie11{version} ) { # another weird case. robot? my(@buf, $vstr); for my $junk ( @{ $t } ) { if ( index( $junk, 'MSIE') != NO_IMATCH ) { $vstr = $junk; next; } push @buf, $junk; } my $rv = $self->_parse_msie($m, \@buf, $e, split( RE_WHITESPACE, $vstr ) ); return $rv; } # fall back to the dispatch table below } my $rv = $self->[IS_MAXTHON] ? [ maxthon => $m, $t, $e, @o ] : $self->_is_opera_pre($m) ? [ opera_pre => $m, $t, $e ] : $self->_is_opera_post($e) ? [ opera_post => $m, $t, $e, $c ] : $self->_is_opera_ff($e) ? [ opera_pre => "$e->[2]/$e->[3]", $t ] : $self->_is_ff($e) ? [ firefox => $m, $t, $e, @o ] : $self->_is_safari($e, \@o) ? [ safari => $m, $t, $e, @o ] : $self->_is_chrome($e, \@o) ? [ chrome => $m, $t, $e, @o ] : $self->_is_android($t,\@o) ? [ android => $m, $t, $e, @o ] : $self->_is_suspicious_ff($e) ? [ ff_suspect => $m, $t, $e, @o ] : undef; if ( $rv ) { my $pname = shift @{ $rv }; my $method = '_parse_' . $pname; my $rvx = $self->$method( @{ $rv } ); if ( $rvx ) { $self->[UA_PARSER] ||= $pname; return $rvx; } } return $self->_extended_probe($m, $t, $e, $c, @o) if $self->[IS_EXTENDED]; $self->[UA_UNKNOWN] = 1; # give up return; } sub _post_parse { my $self = shift; $self->[UA_VERSION] = $self->_numify( $self->[UA_VERSION_RAW] ) if $self->[UA_VERSION_RAW]; my @buf; foreach my $e ( @{ $self->[UA_EXTRAS] } ) { if ( $self->_is_strength( $e ) ) { $self->[UA_STRENGTH] = $e ; next; } push @buf, $e; } $self->[UA_EXTRAS] = @buf ? [ @buf ] : undef; if ( $self->[UA_TOOLKIT] ) { my $v = $self->[UA_TOOLKIT][TK_ORIGINAL_VERSION]; push @{ $self->[UA_TOOLKIT] }, defined $v ? $self->_numify( $v ) : 0; } if( $self->[UA_MOZILLA] ) { $self->[UA_MOZILLA] =~ tr/a-z://d; $self->[UA_MOZILLA] = [ $self->[UA_MOZILLA], $self->_numify( $self->[UA_MOZILLA] ) ]; } if ( $self->[UA_OS] ) { $self->[UA_OS] = $OSFIX{ $self->[UA_OS] } || $self->[UA_OS]; } foreach my $robo ( LIST_ROBOTS ) { # regex??? next if lc $robo ne lc $self->[UA_NAME]; $self->[UA_ROBOT] = 1; last; } return; } sub _extended_probe { my($self, @args) = @_; return if $self->_is_gecko && $self->_parse_gecko( @args ); return if $self->_is_netscape( @args ) && $self->_parse_netscape( @args ); return if $self->_is_docomo( @args ) && $self->_parse_docomo( @args ); return if $self->_is_generic( @args ); return if $self->_is_emacs( @args ) && $self->_parse_emacs( @args ); return if $self->_is_moz_only( @args ) && $self->_parse_moz_only( @args ); return if $self->_is_hotjava( @args ) && $self->_parse_hotjava( @args ); $self->[UA_UNKNOWN] = 1; return; } sub _object_ids { return grep { $_ =~ RE_OBJECT_ID } keys %Parse::HTTP::UserAgent::; } sub _numify { my $self = shift; my $v = shift || return 0; my @removed; if ( $v =~ s{( pre | rel | alpha | beta | \-stable | gold | [ab]\d+ | a\-XXXX | dev | [+] )}{}xmsig ){ push @removed, $1 if INSIDE_VERBOSE_TEST; } if ( $v =~ s{( (?:[^0-9]+)? # usually dash rc # nonsense [\-_.]? # usually dash ([0-9]) # teh candidate revision )}{.0.$2}xmsi # yeah, hacky ) { push @removed, $1 if INSIDE_VERBOSE_TEST; } # workaround another stupidity (1.2.3-4) if ( my $rc = $v =~ tr/-/./ ) { push @removed, '-' x $rc if INSIDE_VERBOSE_TEST; } # convert _ to . # version.pm has changed its interpretation of versions with underlines # cf. https://bugs.debian.org/825611 if ( my $rc = $v =~ tr/_/./ ) { push @removed, '-' x $rc if INSIDE_VERBOSE_TEST; } # Finally, be aggressive to prevent dying on bogus stuff. # It's interesting how people provide highly stupid version "numbers". # Version parameters are probably more stupid than the UA string itself. if ( $v =~ s<([^0-9._v])><.>xmsg ) { push @removed, $1 if INSIDE_VERBOSE_TEST; } if ( $v =~ s<([.]{2,})><.>xmsg ) { push @removed, $1 if INSIDE_VERBOSE_TEST; } if ( INSIDE_VERBOSE_TEST ) { if ( @removed ) { my $r = join q{','}, @removed; require Test::More; Test::More::diag("[DEBUG] _numify: removed '$r' from version string"); } } # Gecko revisions like: "20080915000512" will cause an # integer overflow warning. use bigint? local $SIG{__WARN__} = sub { my $msg = shift; warn "$msg\n" if $msg !~ RE_WARN_OVERFLOW && $msg !~ RE_WARN_INVALID; }; # if version::vpp is used it'll identify 420 as a v-string # add a floating point to fool it $v .= q{.0} if index($v, q{.}) == NO_IMATCH; (my $check = $v) =~ tr/0-9//cd; return 0 if ! $check; # A string parsed as version (i.e.: AppleWebKit/en_SG) my $rv; eval { $rv = version->new("$v")->numify; 1; } or do { my $error = $@ || '[unknown error while parsing version]'; if ( INSIDE_UNIT_TEST ) { chomp $error; if ( INSIDE_VERBOSE_TEST ) { Test::More::diag( "[FATAL] _numify: version said: $error for '$v'" ); Test::More::diag( sprintf '[FATAL] _numify: UA with bogus version (%s) is: %s', $v, $self->[UA_STRING] ); Test::More::diag( '[FATAL] _numify: ' . $self->dumper ); } croak $error; } else { croak $error; } }; return $rv; } sub _debug_pre_parse { my($self, $moz, $thing, $extra, @others) = @_; my $raw = [ { qw/ name moz value / => $moz }, { qw/ name thing value / => $thing }, { qw/ name extra value / => $extra }, { qw/ name others value / => \@others }, ]; my $pok = print "-------------- PRE PARSE DUMP --------------\n" . $self->dumper(args => $raw) . "--------------------------------------------\n"; return; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Parse::HTTP::UserAgent =head1 VERSION version 0.43 =head1 SYNOPSIS use Parse::HTTP::UserAgent; my $ua = Parse::HTTP::UserAgent->new( $str ); die "Unable to parse!" if $ua->unknown; print $ua->name; print $ua->version; print $ua->os; # or just dump for debugging: print $ua->dumper; =head1 DESCRIPTION Quoting L: " ... and then Google built Chrome, and Chrome used Webkit, and it was like Safari, and wanted pages built for Safari, and so pretended to be Safari. And thus Chrome used WebKit, and pretended to be Safari, and WebKit pretended to be KHTML, and KHTML pretended to be Gecko, and all browsers pretended to be Mozilla, (...) , and the user agent string was a complete mess, and near useless, and everyone pretended to be everyone else, and confusion abounded." User agent strings are a complete mess since there is no standard format for them. They can be in various formats and can include more or less information depending on the vendor's (or the user's) choice. Also, it is not dependable since it is some arbitrary identification string. Any user agent can fake another. So, why deal with such a useless mess? You may want to see the choice of your visitors and can get some reliable data (even if some are fake) and generate some nice charts out of them or just want to send an C cookie if the user agent seems to support it (and send a normal one if this is not the case). However, browser sniffing for client-side coding is considered a bad habit. This module implements a rules-based parser and tries to identify MSIE, FireFox, Opera, Safari & Chrome first. It then tries to identify Mozilla, Netscape, Robots and the rest will be tried with a generic parser. There is also a structure dumper, useful for debugging. =head1 NAME Parse::HTTP::UserAgent - Parser for the User Agent string =head1 DEPRECATION NOTICE This module is B. Please use L instead. =head1 METHODS =head2 new STRING [, OPTIONS ] Constructor. Takes the user agent string as the first parameter and returns an object based on the parsed structure. The optional C parameter (must be a hashref) can be used to pass several parameters: =over 4 =item * C: controls if the extended probe will be used or not. Default is true. Set this to false to disable: $ua = Parse::HTTP::UserAgent->new( $str, { extended => 0 } ); Can be used to speed up the parser by disabling detection of non-major browsers, robots and most mobile agents. =back =head2 trim STRING Trims the string. =head2 as_hash Returns a hash representation of the parsed structure. =head2 dumper See L. =head2 accessors See L for the available accessors you can use on the parsed object. =head1 OVERLOADED INTERFACE The object returned, overloads stringification (C) and numification (C) operators. So that you can write this: print 42 if $ua eq 'Opera' && $ua >= 9; instead of this print 42 if $ua->name eq 'Opera' && $ua->version >= 9; =head1 ERROR HANDLING =over 4 =item * If you pass a false value to the constructor, it'll croak. =item * If you pass a non-hashref option to the constructor, it'll croak. =item * If you pass a wrong parameter to the dumper, it'll croak. =back =head1 SEE ALSO This module is B. Please use L instead. =head2 Similar Functionality =over 4 =item * L =item * L =item * L =item * L =item * L =back =head2 Resources =over 4 =item * L =item * L =item * L =item * L =item * L =item * L =back =head2 Module Reviews =over 4 =item * CPAN modules for parsing User-Agent strings by B: L (23 October 2011). =item * Parse::HTTP::UserAgent: yet another user agent string parser by B: L (4 September 2009). =back =head1 AUTHOR Burak Gursoy =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Burak Gursoy. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/UserAgent/Constants.pm000644 000765 000024 00000015545 15003317605 024251 0ustar00burakstaff000000 000000 package Parse::HTTP::UserAgent::Constants; $Parse::HTTP::UserAgent::Constants::VERSION = '0.43'; use strict; use warnings; use parent qw( Exporter ); our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); use constant LIST_ROBOTS => qw( Wget curl libwww-perl GetRight Googlebot Baiduspider+ msnbot bingbot ), 'Yahoo! Slurp'; BEGIN { my @fields = ( 'IS_EXTENDED', 'IS_MAXTHON', # Is this the dumb IE faker? 'IS_PARSED', # _parse() happened or not 'IS_TRIDENT', # Thanks to Microsoft, this now has a meaning 'UA_DEVICE', # the name of the mobile device 'UA_DOTNET', # [MSIE] List of .NET CLR versions 'UA_EXTRAS', # Extra stuff (Toolbars?) non parsable junk 'UA_GENERIC', # parsed with a generic parser. 'UA_LANG', # the language of the ua interface 'UA_MOBILE', # partially implemented 'UA_MOZILLA', # [Firefox] Mozilla revision 'UA_NAME', # The identifier of the ua 'UA_ORIGINAL_NAME', # original name if this is some variation 'UA_ORIGINAL_VERSION', # original version if this is some variation 'UA_OS', # Operating system 'UA_PARSER', # the parser name 'UA_ROBOT', # Is this a robot? 'UA_STRENGTH', # [MSIE] List of .NET CLR versions 'UA_STRING', # just for information 'UA_STRING_ORIGINAL', # just for information 'UA_TABLET', # partially implemented 'UA_TOOLKIT', # [Opera] ua toolkit 'UA_TOUCH', # windows only? 'UA_UNKNOWN', # failed to detect? 'UA_VERSION', # used for numerical ops. via qv() 'UA_VERSION_RAW', # the parsed version 'UA_WAP', # unimplemented ); my $oid = -1; my %field = map { $_ => ++$oid } @fields; my %const = ( %field, LAST_ELEMENT => -1, MAXID => $oid, NO_IMATCH => -1, # for index() RE_CHAR_SLASH_WS => qr{ [/\s] }xms, RE_COMMA => qr{ [,] }xms, RE_DIGIT => qr{ [0-9] }xms, RE_DIGIT_DOT_DIGIT => qr{ \d+ [.]? \d }xms, RE_DOTNET => qr{ \A [.]NET (?: \s+ CLR \s+ )? (.+?) \z }xms, RE_EPIPHANY_GECKO => qr{ \A (Epiphany) / (.+?) \z }xmsi, RE_FIREFOX_NAMES => qr{ Firefox|Iceweasel|Firebird|Phoenix }xms, RE_HTTP => qr{ http:// }xms, RE_IX86 => qr{ \s i\d86 }xms, RE_OBJECT_ID => qr{ \A UA_ }xms, RE_OPERA_MINI => qr{ \A (Opera \s+ Mini) / (.+?) \z }xms, RE_SC_WS => qr{ ; \s? }xms, RE_SC_WS_MULTI => qr{ ; \s+? }xms, RE_SLASH => qr{ / }xms, RE_SPLIT_PARSE => qr{ \s? ([()]) \s? }xms, RE_TWO_LETTER_LANG => qr{ \A [a-z]{2} \z }xms, RE_WARN_INVALID => qr{ \QVersion string\E .+? \Qcontains invalid data; ignoring:\E}xms, RE_WARN_OVERFLOW => qr{ \QInteger overflow in version\E }xms, RE_WHITESPACE => qr{ \s+ }xms, RE_WINDOWS_OS => qr{ \A Win(dows|NT|[0-9]+)? }xmsi, ERROR_MAXTHON_MSIE => 'Unable to extract MSIE from Maxthon UA-string', ERROR_MAXTHON_VERSION => 'Unable to extract Maxthon version from Maxthon UA-string', OPERA9 => 9, OPERA_FAKER_EXTRA_SIZE => 4, OPERA_TK_LENGTH => 5, TK_NAME => 0, TK_ORIGINAL_VERSION => 1, TK_VERSION => 2, ); $const{INSIDE_UNIT_TEST} = $ENV{PARSE_HTTP_USERAGENT_TEST_SUITE} ? 1 : 0; $const{INSIDE_VERBOSE_TEST} = $const{INSIDE_UNIT_TEST} && $ENV{HARNESS_IS_VERBOSE} ? 1 : 0; require constant; constant->import( \%const ); } BEGIN { %EXPORT_TAGS = ( object_ids => [qw( IS_PARSED IS_MAXTHON IS_TRIDENT IS_EXTENDED UA_STRING UA_STRING_ORIGINAL UA_UNKNOWN UA_GENERIC UA_NAME UA_VERSION_RAW UA_VERSION UA_OS UA_LANG UA_TOOLKIT UA_EXTRAS UA_DOTNET UA_MOZILLA UA_STRENGTH UA_ROBOT UA_WAP UA_MOBILE UA_TABLET UA_TOUCH UA_PARSER UA_DEVICE UA_ORIGINAL_NAME UA_ORIGINAL_VERSION MAXID )], re => [qw( RE_FIREFOX_NAMES RE_DOTNET RE_WINDOWS_OS RE_SLASH RE_SPLIT_PARSE RE_OPERA_MINI RE_EPIPHANY_GECKO RE_WHITESPACE RE_SC_WS RE_SC_WS_MULTI RE_HTTP RE_DIGIT RE_IX86 RE_OBJECT_ID RE_CHAR_SLASH_WS RE_COMMA RE_TWO_LETTER_LANG RE_DIGIT_DOT_DIGIT RE_WARN_OVERFLOW RE_WARN_INVALID )], list => [qw( LIST_ROBOTS )], tk => [qw( TK_NAME TK_ORIGINAL_VERSION TK_VERSION )], etc => [qw( NO_IMATCH LAST_ELEMENT INSIDE_UNIT_TEST INSIDE_VERBOSE_TEST )], error => [qw( ERROR_MAXTHON_VERSION ERROR_MAXTHON_MSIE )], opera => [qw( OPERA9 OPERA_TK_LENGTH OPERA_FAKER_EXTRA_SIZE )], ); @EXPORT_OK = map { @{ $_ } } values %EXPORT_TAGS; $EXPORT_TAGS{all} = [ @EXPORT_OK ]; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Parse::HTTP::UserAgent::Constants =head1 VERSION version 0.43 =head1 DESCRIPTION Internal module =head1 NAME Parse::HTTP::UserAgent::Constants - Various constants =head1 DEPRECATION NOTICE This module is B. Please use L instead. =head1 SEE ALSO L. =head1 AUTHOR Burak Gursoy =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Burak Gursoy. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/UserAgent/Base/000755 000765 000024 00000000000 15003317605 022577 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/UserAgent/Base/Accessors.pm000644 000765 000024 00000006257 15003317605 025074 0ustar00burakstaff000000 000000 package Parse::HTTP::UserAgent::Base::Accessors; $Parse::HTTP::UserAgent::Base::Accessors::VERSION = '0.43'; use strict; use warnings; use Parse::HTTP::UserAgent::Constants qw(:all); BEGIN { my @simple = qw( device generic lang mobile name original_name original_version os parser robot strength tablet touch unknown wap ); my @multi = qw( mozilla extras dotnet ); no strict qw(refs); ## no critic (TestingAndDebugging::ProhibitNoStrict) foreach my $name ( @simple ) { my $id = 'UA_' . uc $name; $id = __PACKAGE__->$id(); *{ $name } = sub { return shift->[$id] || q{} }; } foreach my $name ( @multi ) { my $id = 'UA_' . uc $name; $id = __PACKAGE__->$id(); *{ $name } = sub { my $self = shift; return +() if ! $self->[ $id ]; my @rv = @{ $self->[ $id ] }; return wantarray ? @rv : $rv[0]; }; } } sub version { my $self = shift; my $type = shift || q{}; return $self->[ $type eq 'raw' ? UA_VERSION_RAW : UA_VERSION ] || 0; } sub toolkit { my $self = shift; return Parse::HTTP::UserAgent::Base::Accessors::toolkit->new( $self->[UA_TOOLKIT] ); } package Parse::HTTP::UserAgent::Base::Accessors::toolkit; use strict; use warnings; use overload '""', => 'name', '0+', => 'version', fallback => 1, ; use constant ID_NAME => 0; use constant ID_VERSION_RAW => 1; use constant ID_VERSION => 2; sub new { my($class, $tk) = @_; return bless [ $tk ? @{ $tk } : (undef) x 3 ], $class; } sub name { return shift->[ID_NAME]; } sub version { my $self = shift; my $type = shift || q{}; return $self->[ $type eq 'raw' ? ID_VERSION_RAW : ID_VERSION ] || 0; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Parse::HTTP::UserAgent::Base::Accessors =head1 VERSION version 0.43 =head1 SYNOPSIS use Parse::HTTP::UserAgent; my $ua = Parse::HTTP::UserAgent->new( $str ); die "Unable to parse!" if $ua->unknown; print $ua->name; print $ua->version; print $ua->os; =head1 DESCRIPTION Ther methods can be used to access the various parts of the parsed structure. =head1 NAME Parse::HTTP::UserAgent::Base::Accessors - Available accessors =head1 DEPRECATION NOTICE This module is B. Please use L instead. =head1 ACCESSORS The parts of the parsed structure can be accessed using these methods: =head2 device =head2 dotnet =head2 extras =head2 generic =head2 lang =head2 mobile =head2 mozilla =head2 name =head2 original_name =head2 original_version =head2 os =head2 parser =head2 robot =head2 strength =head2 tablet =head2 touch =head2 toolkit =head2 unknown =head2 version =head2 wap =head1 SEE ALSO L. =head1 AUTHOR Burak Gursoy =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Burak Gursoy. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/UserAgent/Base/IS.pm000644 000765 000024 00000012142 15003317605 023450 0ustar00burakstaff000000 000000 package Parse::HTTP::UserAgent::Base::IS; $Parse::HTTP::UserAgent::Base::IS::VERSION = '0.43'; use strict; use warnings; use Parse::HTTP::UserAgent::Constants qw(:all); sub _is_opera_pre { my($self, $moz) = @_; return index( $moz, 'Opera') != NO_IMATCH; } sub _is_opera_post { my($self, $extra) = @_; return $extra && $extra->[0] eq 'Opera'; } sub _is_opera_ff { # opera faking as firefox my($self, $extra) = @_; return $extra && @{$extra} == OPERA_FAKER_EXTRA_SIZE && $extra->[2] eq 'Opera'; } sub _is_safari { my($self, $extra, $others) = @_; my $str = $self->[UA_STRING]; # epiphany? return index( $str , 'Chrome' ) != NO_IMATCH ? 0 # faker : index( $str , 'Android' ) != NO_IMATCH ? 0 # faker : $extra && index( $extra->[0] , 'AppleWebKit' ) != NO_IMATCH ? 1 : @{$others} && index( $others->[LAST_ELEMENT], 'Safari' ) != NO_IMATCH ? 1 : 0 ; } sub _is_chrome { my($self, $extra, $others) = @_; my $chx = $others->[1] || return; my($chrome, $safari) = split RE_WHITESPACE, $chx; return if ! ( $chrome && $safari); return index( $chrome , 'Chrome' ) != NO_IMATCH && index( $safari , 'Safari' ) != NO_IMATCH && ( $extra && index( $extra->[0], 'AppleWebKit') != NO_IMATCH); } sub _is_android { my($self, $thing, $others) = @_; my $has_android = grep { index( lc $_, 'android' ) != NO_IMATCH } @{ $thing }; my $has_safari = grep { index( lc $_, 'safari' ) != NO_IMATCH } @{ $others }; if ( $has_android && $has_safari ) { return 1; } if ( @{ $others } == 0 && @{ $thing } > 0 && $thing->[-1] && index( $thing->[-1], 'AppleWebKit' ) != NO_IMATCH ) { # More stupidity: ua string is missing a closing paren my($part, @rest) = split m{(AppleWebKit)}xms, $thing->[-1]; $thing->[-1] = $part; @{ $others } = map { $self->trim( $_ ) } split m{ (\QKHTML, like Gecko\E) }xms, join q{}, @rest; return 1; } return; } sub _is_ff { my($self, $extra) = @_; return if ! $extra || ! $extra->[1]; my $moz_with_name = $extra->[1] eq 'Mozilla' && $extra->[2]; return $moz_with_name ? $extra->[2] =~ RE_FIREFOX_NAMES && do { $extra->[1] = $extra->[2] } : $extra->[1] =~ RE_FIREFOX_NAMES ; } sub _is_suspicious_ff { my($self, $extra) = @_; return if ref $extra ne 'ARRAY' || @{ $extra } != 1 || index( lc $extra->[0], 'firefox/' ) == NO_IMATCH; return 1; } sub _is_gecko { return index(shift->[UA_STRING], 'Gecko/') != NO_IMATCH; } sub _is_generic { #TODO: this is actually a parser my($self, @args) = @_; return 1 if $self->_generic_name_version( @args ) || $self->_generic_compatible( @args ) || $self->_generic_moz_thing( @args ); return; } sub _is_netscape { my($self, $moz, $thing, $extra, $compatible, @others) = @_; my $rv = index($moz, 'Mozilla/') != NO_IMATCH && $moz ne 'Mozilla/4.0' && ! $compatible && ! $extra && ! @others && ( @{$thing} && $thing->[LAST_ELEMENT] ne 'Sun' ) && # hotjava index($thing->[0], 'http://') == NO_IMATCH # robot ; return $rv; } sub _is_docomo { my($self, $moz) = @_; return index(lc $moz, 'docomo') != NO_IMATCH; } sub _is_strength { my $self = shift; my $s = shift || return; $s = $self->trim( $s ); return $s if $s eq 'U' || $s eq 'I' || $s eq 'N'; return; } sub _is_emacs { my($self, $moz) = @_; return index( $moz, 'Emacs-W3/') != NO_IMATCH; } sub _is_moz_only { my($self, $moz, $thing, $extra, $compatible, @others) = @_; return $moz && ! @{ $thing } && ! $extra && ! @others; } sub _is_hotjava { my($self, $moz, $thing, $extra, $compatible, @others) = @_; my @hot = @{ $thing }; return @hot == 2 && $hot[1] eq 'Sun'; } sub _is_generic_bogus_ie { my($self, $extra) = @_; my $rv = $extra && $extra->[0] && index( $extra->[0], 'compatible' ) != NO_IMATCH && $extra->[1] && $extra->[1] eq 'MSIE'; return $rv; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Parse::HTTP::UserAgent::Base::IS =head1 VERSION version 0.43 =head1 DESCRIPTION Internal module. =head1 NAME Parse::HTTP::UserAgent::Base::IS - Base class =head1 DEPRECATION NOTICE This module is B. Please use L instead. =head1 SEE ALSO L. =head1 AUTHOR Burak Gursoy =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Burak Gursoy. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/UserAgent/Base/Dumper.pm000644 000765 000024 00000006743 15003317605 024403 0ustar00burakstaff000000 000000 package Parse::HTTP::UserAgent::Base::Dumper; $Parse::HTTP::UserAgent::Base::Dumper::VERSION = '0.43'; use strict; use warnings; use Carp qw( croak ); use Parse::HTTP::UserAgent::Constants qw(:all); sub dumper { my($self, @args) = @_; my %opt = @args % 2 ? () : ( type => 'dumper', format => 'none', interpret => 0, @args ); my $meth = '_dumper_' . lc $opt{type}; croak "Don't know how to dump with $opt{type}" if ! $self->can( $meth ); my $buf = $self->$meth( \%opt ); return $buf if defined wantarray; my $pok = print $buf ."\n"; return; } sub _dump_to_struct { my %struct = shift->as_hash; $struct{$_} ||= [] for qw( dotnet mozilla extras tk ); $struct{$_} ||= 0 for qw( unknown ); return \%struct; } sub _dumper_json { my $self = shift; my $opt = shift; require JSON; return JSON::to_json( $self->_dump_to_struct, { pretty => $opt->{format} eq 'pretty' } ); } sub _dumper_xml { my $self = shift; my $opt = shift; require XML::Simple; return XML::Simple::XMLout( $self->_dump_to_struct, RootName => 'ua', NoIndent => $opt->{format} ne 'pretty', ); } sub _dumper_yaml { my $self = shift; my $opt = shift; require YAML; return YAML::Dump( $self->_dump_to_struct ); } sub _dumper_dumper { # yeah, I know. Fugly code here my $self = shift; my $opt = shift; my @ids = $opt->{args} ? @{ $opt->{args} } : $self->_object_ids; my $args = $opt->{args} ? 1 : 0; my $max = 0; map { $max = length $_ if length $_ > $max; } @ids; my @titles = qw( FIELD VALUE ); my $buf = sprintf "%s%s%s\n%s%s%s\n", $titles[0], (q{ } x (2 + $max - length $titles[0])), $titles[1], q{-} x $max, q{ } x 2, q{-} x ($max*2); require Data::Dumper; my @buf; foreach my $id ( @ids ) { my $name = $args ? $id->{name} : $id; my $val = $args ? $id->{value} : $self->[ $self->$id() ]; if ( $val && ref $val ) { my $d = Data::Dumper->new([$val]); $d->Indent(0); my $rv = $d->Dump; $rv =~ s{ \$VAR1 \s+ = \s+ }{}xms; $rv =~ s{ ; }{}xms; $val = $rv eq '[]' ? q{} : $rv; } push @buf, [ $name, (q{ } x (2 + $max - length $name)), defined $val ? $val : q{} ]; } foreach my $row ( sort { lc $a->[0] cmp lc $b->[0] } @buf ) { $buf .= sprintf "%s%s%s\n", @{ $row }; } return $buf; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Parse::HTTP::UserAgent::Base::Dumper =head1 VERSION version 0.43 =head1 DESCRIPTION The parsed structure can be dumped to a text table for debugging. =head1 NAME Parse::HTTP::UserAgent::Base::Dumper - Base class to dump parsed structure =head1 DEPRECATION NOTICE This module is B. Please use L instead. =head1 METHODS =head2 dumper my $ua = Parse::HTTP::UserAgent::Dumper->new( $string ); print $ua->dumper; =head1 SEE ALSO L. =head1 AUTHOR Burak Gursoy =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Burak Gursoy. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Parse-HTTP-UserAgent-0.43/lib/Parse/HTTP/UserAgent/Base/Parsers.pm000644 000765 000024 00000073171 15003317605 024565 0ustar00burakstaff000000 000000 package Parse::HTTP::UserAgent::Base::Parsers; $Parse::HTTP::UserAgent::Base::Parsers::VERSION = '0.43'; use strict; use warnings; use Parse::HTTP::UserAgent::Constants qw(:all); sub _extract_dotnet { my($self, @args) = @_; my @raw = map { ref($_) eq 'ARRAY' ? @{$_} : $_ } grep { $_ } @args; my(@extras,@dotnet); foreach my $e ( @raw ) { if ( my @match = $e =~ RE_DOTNET ) { push @dotnet, $match[0]; next; } if ( $e =~ RE_WINDOWS_OS ) { if ( $1 && $1 ne '64' ) { # Maxthon stupidity: multiple OS definitions $self->[UA_OS] ||= $e; next; } } push @extras, $e; } return [@extras], [@dotnet]; } sub _fix_opera { my $self = shift; return 1 if ! $self->[UA_EXTRAS]; my @buf; foreach my $e ( @{ $self->[UA_EXTRAS] } ) { if ( $e =~ RE_OPERA_MINI ) { $self->[UA_ORIGINAL_NAME] = $1; $self->[UA_ORIGINAL_VERSION] = $2; $self->[UA_MOBILE] = 1; next; } push @buf, $e; } $self->_fix_os_lang; $self->_fix_windows_nt('skip_os'); $self->[UA_EXTRAS] = @buf ? [ @buf ] : undef; return 1; } sub _fix_generic { my($self, $os_ref, $name_ref, $v_ref, $e_ref) = @_; if ( ${$v_ref} && ${$v_ref} !~ RE_DIGIT) { ${$name_ref} .= q{ } . ${$v_ref}; ${$v_ref} = undef; } if ( ${$os_ref} && ${$os_ref} =~ RE_HTTP ) { ${$os_ref} =~ s{ \A \+ }{}xms; push @{ $e_ref }, ${$os_ref}; ${$os_ref} = undef; } return; } sub _parse_maxthon { my($self, $moz, $thing, $extra, @others) = @_; my $is_30 = $extra && $extra->[0] && index( $extra->[0], 'AppleWebKit' ) != NO_IMATCH; my($maxthon, $msie, @buf); if ( $is_30 ) { # yay, new nonsense with the new version my @new; for my $i (0..$#others) { if ( index( $others[$i], 'Maxthon') != NO_IMATCH ) { @new = split m{\s+}xms, $others[$i]; $maxthon = shift @new; $extra ||= []; unshift @{ $extra }, shift @new; $others[$i] = ''; last; } } @others = grep { $_ } @others, @new; $self->_parse_safari( $moz, $thing, $extra, @others ); $self->[UA_NAME] = 'Maxthon'; } else { my @omap = grep { $_ } map { split RE_SC_WS_MULTI, $_ } @others; foreach my $e ( @omap, @{$thing} ) { # $extra -> junk if ( index(uc $e, 'MAXTHON') != NO_IMATCH ) { $maxthon = $e; next; } if ( index(uc $e, 'MSIE' ) != NO_IMATCH ) { # Maxthon stupidity: multiple MSIE strings $msie ||= $e; next; } push @buf, $e; } } if ( ! $maxthon ) { warn ERROR_MAXTHON_VERSION . "\n"; $self->[UA_UNKNOWN] = 1; return; } if ( $is_30 ) { if ( $self->[UA_LANG] ) { push @{ $self->[UA_EXTRAS] ||= [] }, $self->[UA_LANG]; $self->[UA_LANG] = undef; } } else { if ( ! $msie ) { warn ERROR_MAXTHON_MSIE . "\n"; $self->[UA_UNKNOWN] = 1; return; } $self->_parse_msie( $moz, [ undef, @buf ], undef, split RE_WHITESPACE, $msie ); } my(undef, $mv) = split $is_30 ? RE_SLASH : RE_WHITESPACE, $maxthon; my $v = $mv ? $mv : $maxthon ? '1.0' : do { warn ERROR_MAXTHON_VERSION . "\n"; 0 } ; $self->[UA_ORIGINAL_VERSION] = $v; $self->[UA_ORIGINAL_NAME] = 'Maxthon'; $self->[UA_PARSER] = 'maxthon'; return 1; } sub _parse_msie { my($self, $moz, $thing, $extra, $name, $version) = @_; my $junk = shift @{ $thing }; # already used my($extras,$dotnet) = $self->_extract_dotnet( $thing, $extra ); if ( @{$extras} == 2 && index( $extras->[1], 'Lunascape' ) != NO_IMATCH ) { ($name, $version) = split RE_CHAR_SLASH_WS, pop @{ $extras }; } $self->[UA_NAME] = $name; $self->[UA_VERSION_RAW] = $version; $self->[UA_DOTNET] = [ @{ $dotnet } ] if @{$dotnet}; if ( $extras->[0] && $extras->[0] eq 'Mac_PowerPC' ) { $self->[UA_OS] = shift @{ $extras }; } my $real_version; my @buf; foreach my $e ( @{ $extras } ) { if ( index( $e, 'Trident/' ) != NO_IMATCH ) { my($tk_name, $tk_version) = split m{[/]}xms, $e, 2; $self->[UA_TOOLKIT] = [ $tk_name, $tk_version ]; if ( $tk_name eq 'Trident' && $tk_version ) { if ( $tk_version eq '7.0' && $self->[UA_VERSION_RAW] ne '11.0' ) { # more stupidity (compat mode) $self->[UA_ORIGINAL_NAME] = 'MSIE'; $self->[UA_ORIGINAL_VERSION] = 11; } elsif ( $tk_version eq '6.0' && $self->[UA_VERSION_RAW] ne '10.0') { # more stupidity (compat mode) $self->[UA_ORIGINAL_NAME] = 'MSIE'; $self->[UA_ORIGINAL_VERSION] = 10; } else { # must be the real version or some other stupidity } } next; } push @buf, $e; } my @extras = map { my $thing = $self->trim( $_ ); lc($thing) eq 'touch' ? do { $self->[UA_TOUCH] = 1; $self->[UA_MOBILE] = 1; (); } : $thing ; } grep { $_ !~ m{ \s+ compatible \z }xms } @buf ; $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; $self->[UA_PARSER] = 'msie'; return 1; } sub _parse_msie_11 { my($self, $moz, $thing, $extra) = @_; if ( ref $extra eq 'ARRAY' ) { # remove junk @{$extra} = grep { $_ ne 'like' && $_ ne 'Gecko' } @{ $extra }; } else { $extra = []; } my($version); while ( my $e = shift @{ $thing } ) { if ( index($e, 'rv:' ) != NO_IMATCH ) { $version = (split m{rv:}xms, $e )[1] ; next; } push @{ $extra }, $e; } $self->_parse_msie( undef, $thing, $extra, 'MSIE', $version) || return; if ( $self->[UA_TOUCH] && $self->[UA_EXTRAS] ) { # version 10+ my @extras = map { $_ eq 'ARM' ? do { $self->[UA_DEVICE] = $_; () } : $_ } @{ $self->[UA_EXTRAS] }; $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; } $self->[UA_PARSER] = 'msie11'; return 1; } sub _parse_firefox { my($self, @args) = @_; $self->_parse_mozilla_family( @args ); my $e = $self->[UA_EXTRAS]; if ( ref $e eq 'ARRAY' && @{ $e } > 0 && index( lc $e->[-1], 'fennec' ) != NO_IMATCH ) { $self->_fix_fennec( $e ); } $self->[UA_NAME] = 'Firefox'; return 1; } sub _parse_ff_suspect { my($self, $moz, $thing, $extra, @others) = @_; # fool the moz parser unshift @{ $extra }, ''; $self->_parse_mozilla_family( $moz, $thing, $extra, @others ); $self->[UA_PARSER] = 'ff_suspect'; return 1; } sub _fix_fennec { my($self, $e) = @_; my($name, $version) = split RE_SLASH, pop @{ $e }; $self->[UA_ORIGINAL_NAME] = $name; $self->[UA_ORIGINAL_VERSION] = $version; $self->[UA_MOBILE] = 1; return if ! $self->[UA_LANG]; if ( lc $self->[UA_LANG] eq 'tablet' ) { $self->[UA_TABLET] = 1; $self->[UA_LANG] = undef; } elsif ( index( $self->[UA_LANG], q{ } ) != NO_IMATCH ) { push @{ $self->[UA_EXTRAS] ||= [] }, $self->[UA_LANG]; $self->[UA_LANG] = undef; } else { # Do nothing } return; } sub _parse_safari { my($self, $moz, $thing, $extra, @others) = @_; my $ipad = $thing && lc( $thing->[0] || q{} ) eq 'ipad'; my($version, @junk) = split RE_WHITESPACE, pop @others; my $ep = $version && index( lc($version), 'epiphany' ) != NO_IMATCH; my($junkv, $vx) = split RE_SLASH, $version; if ( $ipad ) { shift @{ $thing }; # remove iPad if ( $junkv && $junkv eq 'Mobile' ) { unshift @junk, join q{/}, $junkv, $vx; $vx = undef; } $self->[UA_MOBILE] = 1; $self->[UA_TABLET] = 1; } $self->[UA_NAME] = $ep ? 'Epiphany' : $ipad ? 'iPad' : 'Safari'; $self->[UA_VERSION_RAW] = $vx; $self->[UA_TOOLKIT] = $extra ? [ split RE_SLASH, shift @{ $extra } ] : []; if ( $thing->[-1] && length($thing->[LAST_ELEMENT]) <= 5 ) { # todo: $self->_is_lang_field($junk) # in here or in _post_parse() $self->[UA_LANG] = pop @{ $thing }; } $self->[UA_OS] = @{$thing} && length $thing->[LAST_ELEMENT] > 1 ? pop @{ $thing } : shift @{ $thing } ; if ( $self->[UA_OS] && lc $self->[UA_OS] eq 'macintosh' ) { $self->[UA_OS] = $self->[UA_LANG]; $self->[UA_LANG] = undef; } if ( $thing->[0] && lc $thing->[0] eq 'iphone' ) { $self->[UA_MOBILE] = 1; $self->[UA_DEVICE] = shift @{$thing}; my $check_os = $thing->[LAST_ELEMENT]; if ( $check_os && index( $check_os, 'Mac OS X' ) != NO_IMATCH ) { if ( $self->[UA_OS] ) { push @{ $self->[UA_EXTRAS] ||= [] }, $self->[UA_OS]; } $self->[UA_OS] = pop @{ $thing }; # Another oddity: tk as "AppleWebKit/en_SG" if ( ! $self->[UA_LANG] && $self->[UA_TOOLKIT] ) { my $v = $self->[UA_TOOLKIT][TK_ORIGINAL_VERSION]; if ( $v && $v =~ m< [a-zA-Z]{2}_[a-zA-Z]{2} >xms ) { $self->[UA_LANG] = $v; $self->[UA_TOOLKIT][TK_ORIGINAL_VERSION] = undef; } } } } my @extras; push @extras, @{$thing}, @others; if ( $self->[UA_OS] && length($self->[UA_OS]) == 1 ) { push @extras, $self->[UA_OS]; $self->[UA_OS] = undef; } if ( $self->[UA_LANG] && $self->[UA_LANG] !~ m{[a-zA-Z]+}xmsg ) { # some junk like "6.0" -- more stupidity push @extras, $self->[UA_LANG]; $self->[UA_LANG] = undef; } push @extras, @junk if @junk; push @extras, @{$extra} if $extra; $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; return 1; } sub _parse_chrome { my($self, $moz, $thing, $extra, @others) = @_; my $chx = pop @others; my($chrome, $safari, @rest) = split RE_WHITESPACE, $chx; my $opera; if ( $rest[0] && index( $rest[0], 'OPR/', 0) != NO_IMATCH ) { $opera = shift @rest; if ( ref $extra eq 'ARRAY' ) { unshift @{ $extra }, $chrome; } push @others, @rest, $safari; } else { push @others, $safari; } $self->_parse_safari($moz, $thing, $extra, @others); my($name, $version) = split RE_SLASH, $opera || $chrome; $self->[UA_NAME] = $opera ? 'Opera' : $name; $self->[UA_VERSION_RAW] = $version; return 1; } sub _parse_android { my($self, $moz, $thing, $extra, @others) = @_; (undef, @{$self}[UA_STRENGTH, UA_OS, UA_LANG, UA_DEVICE]) = @{ $thing }; if ( ! $extra && $others[0] && index( $others[0], 'AppleWebKit' ) != NO_IMATCH ) { $extra = [ shift @others ]; $self->[UA_PARSER] = 'android:paren_fixer'; } $self->[UA_TOOLKIT] = [ split RE_SLASH, $extra->[0] ] if $extra; my(@extras, $is_phone); my @junkions = map { split m{\s+}xms } @others; foreach my $junk ( @junkions ) { if ( $junk eq 'Mobile' ) { $is_phone = 1; next; } if ( index( $junk, 'Version' ) != NO_IMATCH ) { my(undef, $v) = split RE_SLASH, $junk; $self->[UA_VERSION_RAW] = $v; # looks_like_number? next; } push @extras, $junk; } if ( $self->[UA_DEVICE] ) { my @build = split RE_WHITESPACE, $self->[UA_DEVICE]; my @btest; while ( @build && index($build[-1], 'Build') == NO_IMATCH ) { unshift @btest, pop @build; } unshift @btest, pop @build if @build; my $device = @build ? join ' ', @build : undef; my $build = shift @btest; if ( $device && $build ) { $build =~ s{ Build/ }{}xms; my $os = $self->[UA_OS] || 'Android'; $self->[UA_DEVICE] = $device; $self->[UA_OS] = "$os ($build)"; if ( @btest ) { $self->[UA_TOOLKIT] = [ split RE_SLASH, $btest[0] ]; } } } if ( @extras >= 3 && $extras[0] && $extras[0] eq 'KHTML,') { unshift @extras, join ' ', map { shift @extras } 1..3; } my @extras_final = grep { $_ } @extras; $self->[UA_NAME] = 'Android'; $self->[UA_MOBILE] = 1; $self->[UA_TABLET] = $is_phone ? undef : 1; $self->[UA_EXTRAS] = @extras_final ? [ @extras_final ] : undef; return 1; } sub _parse_opera_pre { # opera 5,9 my($self, $moz, $thing, $extra) = @_; my $ffaker = @{$thing} && index($thing->[LAST_ELEMENT], 'rv:') != NO_IMATCH ? pop @{$thing} : 0; my($name, $version) = split RE_SLASH, $moz; return if $name ne 'Opera'; $self->[UA_NAME] = $name; $self->[UA_VERSION_RAW] = $version; my $lang; if ( $extra ) { # opera changed version string to workaround lame browser sniffers # http://dev.opera.com/articles/view/opera-ua-string-changes/ my $swap = @{$extra} && index($extra->[LAST_ELEMENT], 'Version/') != NO_IMATCH; ($lang = $swap ? shift @{$extra} : pop @{$extra}) =~ tr/[]//d; if ( $swap ) { my $vjunk = pop @{$extra}; $self->[UA_VERSION_RAW] = ( split RE_SLASH, $vjunk )[1] if $vjunk; } } $lang ||= pop @{$thing} if $ffaker; my $tk_parsed_as_lang = ! $self->[UA_TOOLKIT] && $self->_numify( $version ) >= OPERA9 && $lang && length( $lang ) > OPERA_TK_LENGTH; if ( $tk_parsed_as_lang ) { $self->[UA_TOOLKIT] = [ split RE_SLASH, $lang ]; ($lang = pop @{$thing}) =~ tr/[]//d if $extra; } $self->[UA_LANG] = $lang; if ( @{$thing} && $self->_is_strength( $thing->[LAST_ELEMENT] ) ) { $self->[UA_STRENGTH] = pop @{ $thing }; $self->[UA_OS] = shift @{ $thing }; } else { $self->[UA_OS] = pop @{ $thing }; } my @extras = ( @{ $thing }, ( $extra ? @{$extra} : () ) ); $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; return $self->_fix_opera; } sub _parse_opera_post { # opera 5,6,7 my($self, $moz, $thing, $extra, $compatible) = @_; shift @{ $thing } if $compatible; $self->[UA_NAME] = shift @{$extra}; $self->[UA_VERSION_RAW] = shift @{$extra}; ($self->[UA_LANG] = shift @{$extra} || q{}) =~ tr/[]//d; if ( @{$thing} && $self->_is_strength( $thing->[LAST_ELEMENT] ) ) { $self->[UA_STRENGTH] = pop @{ $thing }; $self->[UA_OS] = shift @{ $thing }; } else { $self->[UA_OS] = pop @{ $thing }; } my @extras = ( @{ $thing }, ( $extra ? @{$extra} : () ) ); $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; return $self->_fix_opera; } sub _parse_mozilla_family { my($self, $moz, $thing, $extra, @others) = @_; # firefox variation or just mozilla itself my($name, $version) = split RE_SLASH, defined $extra->[1] ? $extra->[1] : $moz ; if ( $version ) { $extra->[1] = ''; } $self->[UA_NAME] = $name; $self->[UA_VERSION_RAW] = $version; $self->[UA_TOOLKIT] = $extra->[0] ? [ split RE_SLASH, shift @{ $extra } ] : undef ; if ( @{$thing} && index($thing->[LAST_ELEMENT], 'rv:') != NO_IMATCH ) { $self->[UA_MOZILLA] = pop @{ $thing }; my $len_thing = @{ $thing }; if ( $len_thing == 3 ) { $self->[UA_OS] = shift @{ $thing }; if ( $self->[UA_OS] && $self->[UA_OS] eq 'Macintosh' ) { $self->[UA_OS] = shift @{ $thing }; } $self->[UA_LANG] = pop @{ $thing } if @{ $thing }; } elsif ( $len_thing <= 2 ) { if ( $thing->[0] eq 'X11' || index( $thing->[-1], 'Intel' ) != NO_IMATCH ) { if ( index( lc $thing->[-1], 'linux arm') != NO_IMATCH ) { $self->[UA_DEVICE] = pop @{ $thing }; $self->[UA_OS] = 'Linux'; # Android? huh? } else { $self->[UA_OS] = pop @{ $thing }; } } elsif ( index( lc $thing->[0], 'android' ) != NO_IMATCH || index( lc $thing->[0], 'maemo' ) != NO_IMATCH ) { # mobile? tablet? $self->[UA_OS] = shift @{ $thing }; $self->[UA_DEVICE] = shift @{ $thing }; if ( lc $self->[UA_DEVICE] eq 'tablet' ) { $self->[UA_TABLET] = 1; } } else { if ( $len_thing > 1 ) { if ( $thing->[-1] ne 'WOW64' ) { $self->[UA_LANG] = pop @{ $thing }; } } else { $self->[UA_OS] = pop @{ $thing }; } } } else { $self->[UA_LANG] = pop @{ $thing }; $self->[UA_OS] = pop @{ $thing }; } } my @extras = grep { $_ } @{ $thing }, @others, $extra ? @{ $extra } : (), ; $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; return 1; } sub _parse_gecko { my($self, $moz, $thing, $extra, @others) = @_; $self->_parse_mozilla_family($moz, $thing, $extra, @others); # we got some name & version if ( $self->[UA_NAME] && $self->[UA_VERSION_RAW] ) { # Change SeaMonkey too? my $before = $self->[UA_NAME]; $self->[UA_NAME] = 'Netscape' if $self->[UA_NAME] eq 'Netscape6'; $self->[UA_NAME] = 'Mozilla' if $self->[UA_NAME] eq 'Beonex'; $self->[UA_PARSER] = 'mozilla_family:generic'; my @buf; foreach my $e ( @{ $self->[UA_EXTRAS] } ) { next if ! $e; if ( my $s = $self->_is_strength($e) ) { $self->[UA_STRENGTH] = $s; next; } if ( $e =~ RE_IX86 ) { my($os,$lang) = split RE_COMMA, $e; $self->[UA_OS] = $os if $os; $self->[UA_LANG] = $self->trim($lang) if $lang; next; } if ( ! $self->[UA_OS] && $e =~ m{ Win(?:NT|dows) }xmsi ) { $self->[UA_OS] = $e; next; } if ( $e =~ RE_TWO_LETTER_LANG ) { $self->[UA_LANG] = $e; next; } if ( $e =~ RE_EPIPHANY_GECKO ) { $self->[UA_NAME] = $before = $1; $self->[UA_VERSION_RAW] = $2; } push @buf, $e; } $self->[UA_EXTRAS] = @buf ? [ @buf ] : undef; $self->[UA_ORIGINAL_NAME] = $before if $before ne $self->[UA_NAME]; $self->_fix_windows_nt; return 1 ; } if ( ref $self->[UA_TOOLKIT] eq 'ARRAY' && $self->[UA_TOOLKIT][TK_NAME] eq 'Gecko' ) { ($self->[UA_NAME], $self->[UA_VERSION_RAW]) = split RE_SLASH, $moz; if ( $self->[UA_NAME] && $self->[UA_VERSION_RAW] ) { $self->[UA_PARSER] = 'mozilla_family:gecko'; return 1; } } return; } sub _fix_os_lang { my $self = shift; if ( $self->[UA_OS] && length $self->[UA_OS] == 2 ) { $self->[UA_LANG] = $self->[UA_OS]; $self->[UA_OS] = undef; } return; } sub _fix_windows_nt { my $self = shift; my $skip_os = shift; # ie os can be undef my $os = $self->[UA_OS] || q{}; return if ( ! $os && ! $skip_os ) || ( $os ne 'windows' && ! $skip_os ) || ref $self->[UA_EXTRAS] ne 'ARRAY' || ! $self->[UA_EXTRAS][0] || $self->[UA_EXTRAS][0] !~ m{ NT\s?(\d.*?) \z }xmsi ; $self->[UA_EXTRAS][0] = $self->[UA_OS]; # restore $self->[UA_OS] = "Windows NT $1"; # fix return; } sub _parse_netscape { my($self, $moz, $thing) = @_; my($mozx, $junk) = split RE_WHITESPACE, $moz; my(undef, $version) = split RE_SLASH , $mozx; my @buf; foreach my $e ( @{ $thing } ) { if ( my $s = $self->_is_strength($e) ) { $self->[UA_STRENGTH] = $s; next; } push @buf, $e; } $self->[UA_VERSION_RAW] = $version; $self->[UA_OS] = $buf[0] eq 'X11' ? pop @buf : shift @buf; $self->[UA_NAME] = 'Netscape'; $self->[UA_EXTRAS] = @buf ? [ @buf ] : undef; if ( $junk ) { $junk =~ s{ \[ (.+?) \] .* \z}{$1}xms; $self->[UA_LANG] = $junk if $junk; } $self->[UA_PARSER] = 'netscape'; return 1; } sub _generic_moz_thing { my($self, $moz, $t, $extra, $compatible, @others) = @_; return if ! @{ $t }; my($mname, $mversion, @rest) = split RE_CHAR_SLASH_WS, $moz; return if $mname eq 'Mozilla' || $mname eq 'Emacs-W3'; if ( index( $mname, 'Nokia' ) != NO_IMATCH ) { my($device, $num, $os, $series, @junk) = split m{[\s]+}xms, $self->[UA_STRING_ORIGINAL]; if ( $device && $num && $os && $series && index( $os, 'SymbianOS' ) != NO_IMATCH ) { return $self->_parse_symbian( join ';', $os, "$series $device", join(q{ }, @junk, $num) ); } } $self->[UA_NAME] = $mname; $self->[UA_VERSION_RAW] = $mversion || ( $mname eq 'Links' ? shift @{$t} : 0 ); $self->[UA_OS] = @rest ? join(q{ }, @rest) : $t->[0] && $t->[0] !~ RE_DIGIT_DOT_DIGIT ? shift @{$t} : undef; my @extras = (@{$t}, $extra ? @{$extra} : (), @others ); $self->_fix_generic( \$self->[UA_OS], \$self->[UA_NAME], \$self->[UA_VERSION_RAW], \@extras ); $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; $self->[UA_GENERIC] = 1; $self->[UA_PARSER] = 'generic_moz_thing'; return 1; } sub _generic_name_version { my($self, $moz, $thing, $extra, $compatible, @others) = @_; my $ok = $moz && ! @{$thing} && ! $extra && ! $compatible && ! @others; return if not $ok; my @moz = split RE_WHITESPACE, $moz; if ( @moz == 1 ) { my($name, $version) = split RE_SLASH, $moz; if ($name && $version) { $self->[UA_NAME] = $name; $self->[UA_VERSION_RAW] = $version; $self->[UA_GENERIC] = 1; $self->[UA_PARSER] = 'generic_name_version'; return 1; } } return; } sub _generic_compatible { my($self, $moz, $thing, $extra, $compatible, @others) = @_; my @orig_thing = @{ $thing }; # see edge case below return if ! ( $compatible && @{$thing} ); my($mname, $mversion) = split RE_CHAR_SLASH_WS, $moz; my($name, $version) = $mname eq 'Mozilla' ? split( RE_CHAR_SLASH_WS, shift @{ $thing } ) : ($mname, $mversion) ; shift @{$thing} if $thing->[0] && ( $thing->[0] eq $name || $thing->[0] eq $moz); my $os = shift @{$thing}; my $lang = pop @{$thing}; my @extras; if ( $name eq 'MSIE') { if ( $self->_is_generic_bogus_ie( $extra ) ) { # edge case my($n, $v) = split RE_WHITESPACE, shift @orig_thing; my $e = [ split RE_SC_WS, join q{ }, @{ $extra } ]; my $t = \@orig_thing; push @{ $e }, grep { $_ } map { split RE_SC_WS, $_ } @others; $self->_parse_msie( $moz, $thing, $e, $n, $v ); return 1; } elsif ( $extra ) { # Sleipnir? ($name, $version) = split RE_SLASH, pop @{$extra}; my($extras,$dotnet) = $self->_extract_dotnet( $thing, $extra ); $self->[UA_DOTNET] = [ @{$dotnet} ] if @{$dotnet}; @extras = (@{ $extras }, @others); } else { return if index($moz, q{ }) != NO_IMATCH; # WebTV } } @extras = (@{$thing}, $extra ? @{$extra} : (), @others ) if ! @extras; if ( $lang && index( $lang, 'MSIE ') != NO_IMATCH ) { return $self->_parse_msie( $moz, [], [$os, "$name/$version", @extras], # junk split( m{[\s]+}xms, $lang, 2 ), # name, version ); } $self->_fix_generic( \$os, \$name, \$version, \@extras ); $self->[UA_NAME] = $name; $self->[UA_VERSION_RAW] = $version || 0; $self->[UA_OS] = $os; $self->[UA_LANG] = $lang; $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; $self->[UA_GENERIC] = 1; $self->[UA_PARSER] = 'generic_compatible'; return 1; } sub _parse_emacs { my($self, $moz, $thing, $extra, $compatible, @others) = @_; my @moz = split RE_WHITESPACE, $moz; my $emacs = shift @moz; my($name, $version) = split RE_SLASH, $emacs; $self->[UA_NAME] = $name; $self->[UA_VERSION_RAW] = $version || 0; $self->[UA_OS] = shift @{ $thing }; $self->[UA_OS] = $self->trim( $self->[UA_OS] ) if $self->[UA_OS]; my @rest = ( @{ $thing }, @moz ); push @rest, @{ $extra } if $extra && ref $extra eq 'ARRAY'; push @rest, ( map { split RE_SC_WS, $_ } @others ) if @others; my @extras = grep { $_ } map { $self->trim( $_ ) } @rest; $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; $self->[UA_PARSER] = 'emacs'; return 1; } sub _parse_moz_only { my $self = shift; my($moz) = @_; my @parts = split RE_WHITESPACE, $moz; my $id = shift @parts; my($name, $version) = split RE_SLASH, $id; if ( index( $name, 'Symbian' ) != NO_IMATCH ) { return $self->_parse_symbian( $moz ); } if ( $name eq 'Mozilla' && @parts ) { ($name, $version) = split RE_SLASH, shift @parts; return if ! $name || ! $version; } $self->[UA_NAME] = $name; $self->[UA_VERSION_RAW] = $version || 0; $self->[UA_EXTRAS] = @parts ? [ @parts ] : undef; $self->[UA_PARSER] = 'moz_only'; $self->[UA_ROBOT] = 1 if ! $self->[UA_VERSION_RAW]; return 1; } sub _parse_symbian { my($self, $raw) = @_; my($os, $series_device, @rest) = split m{[;]\s?}xms, $raw; return if ! $os || ! $series_device; my($series, $device) = split m{[\s]+}xms, $series_device; return if ! $device; my @extras = map { split m{[\s]+}xms, $_ } @rest; @{ $self }[ UA_NAME, UA_VERSION_RAW ] = split RE_SLASH, $series, 2; $self->[UA_OS] = $os; $self->[UA_DEVICE] = $device; $self->[UA_EXTRAS] = @extras ? [ @extras ] : undef; $self->[UA_MOBILE] = 1; $self->[UA_PARSER] = 'symbian'; return 1; } sub _parse_hotjava { my($self, $moz, $thing, $extra, $compatible, @others) = @_; my $parsable = shift @{ $thing }; my($name, $version) = split RE_SLASH, $moz; $self->[UA_NAME] = 'HotJava'; $self->[UA_VERSION_RAW] = $version || 0; if ( $parsable ) { my @parts = split m{[\[\]]}xms, $parsable; if ( @parts > 2 ) { @parts = map { $self->trim( $_ ) } @parts; $self->[UA_OS] = pop @parts; $self->[UA_LANG] = pop @parts; $self->[UA_EXTRAS] = @parts ? [ @parts ] : undef; } } return 1; } sub _parse_docomo { my($self, $moz, $thing, $extra, $compatible, @others) = @_; if ( $thing->[0] && index(lc $thing->[0], 'googlebot-mobile') != NO_IMATCH ) { my($name, $version) = split RE_SLASH, shift @{ $thing }; $self->[UA_NAME] = $name; $self->[UA_VERSION_RAW] = $version; $self->[UA_EXTRAS] = @{ $thing } > 0 ? [ @{ $thing } ] : undef; $self->[UA_MOBILE] = 1; $self->[UA_ROBOT] = 1; $self->[UA_PARSER] = 'docomo'; return 1; } #$self->[UA_PARSER] = 'docomo'; #require Data::Dumper;warn "DoCoMo unsupported: ".Data::Dumper::Dumper( [ $moz, $thing, $extra, $compatible, \@others ] ); return; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Parse::HTTP::UserAgent::Base::Parsers =head1 VERSION version 0.43 =head1 DESCRIPTION Internal module. =head1 NAME Parse::HTTP::UserAgent::Base::Parsers - Base class =head1 DEPRECATION NOTICE This module is B. Please use L instead. =head1 SEE ALSO L. =head1 AUTHOR Burak Gursoy =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2009 by Burak Gursoy. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut Parse-HTTP-UserAgent-0.43/t/db.pl000644 000765 000024 00000005646 15003317605 016631 0ustar00burakstaff000000 000000 use strict; use warnings; use vars qw( $SILENT ); use constant SEPTOR => q{[AGENT]}; use constant RE_SEPTOR => qr{ \Q[AGENT]\E }xms; use Carp qw( croak ); use File::Spec; use File::Basename; use IO::File; use Test::More; use File::Find qw( find ); my $COMMENT = q{Parse::HTTP::UserAgent test file}; my @todo; END { if ( @todo && ! $SILENT ) { diag( 'Tests marked as TODO are listed below' ); diag("$_->[0]: '$_->[1]'") for @todo; } } sub database { my $opt = shift || {}; my @buf; my $tests = merge_files(); my $id = 0; foreach my $test ( split RE_SEPTOR, $tests ) { next if ! $test; my $raw = trim( strip_comments( $test ) ) || next; my($string, $frozen) = split m{ \n }xms, $raw, 2; push @buf, { string => $string, struct => $frozen && $opt->{thaw} ? { thaw( $frozen ) } : $frozen, id => ++$id, }; } return @buf; } sub merge_files { my $base = 't/data'; local *DIR; opendir DIR, $base or die "Can't opendir($base): $!"; my %base_file; while ( my $file = readdir DIR ) { my $exact = join q{/}, $base, $file; next if $file eq '.' || $file eq '..' || -d $exact; $base_file{ $exact } = 1; } closedir DIR; my @files; my $probe = sub { return if -d; return if basename( $_ ) =~ m{ \A [.] }xms; return if $base_file{ $_ }; push @files, $_; }; find { no_chdir => 1, wanted => $probe, }, $base; my $raw = q{}; foreach my $file ( @files ) { my @raw = split RE_SEPTOR, slurp( $file ); $raw .= join SEPTOR, map { qq{\n\n#$COMMENT $file\n\n$_} } @raw; } return $raw; } sub thaw { my $s = shift || die "Frozen?\n"; my %rv; my $eok = eval "\%rv = (\n $s \n);"; die "Can not restore data: $@\n\t>> $s <<" if $@ || ! $eok; return %rv; } sub trim { my $s = shift; return $s if ! $s; $s =~ s{ \A \s+ }{}xms; $s =~ s{ \s+ \z }{}xms; return $s; } sub strip_comments { my $s = shift; return $s if ! $s; my $buf = q{}; my $file; foreach my $line ( split m{ \n }xms, $s ) { chomp $line; next if ! $line; if ( my @m = $line =~ m{ \A [#] (.+?)? \z }xms ) { next if ! $m[0]; # line only had a hash and nothing else if ( my @f = $m[0] =~ m{ \A \Q$COMMENT\E (.+?) \z }xms ) { $file = trim( $f[0] ); } if ( my @n = $m[0] =~ m{ \A TODO: \s? (.+?) \z }xms ) { push @todo, [ $file, $n[0] ]; } next; } $buf .= $line . "\n"; } return $buf; } sub slurp { my $file = shift; my $FH = IO::File->new; $FH->open( $file, 'r') or croak sprintf 'Can not open DB @ %s: %s', $file, $!; my $rv = do { local $/; my $s = <$FH>; $s }; $FH->close; return $rv; } 1; __END__ Parse-HTTP-UserAgent-0.43/t/03-strings.t000644 000765 000024 00000005706 15003317605 020002 0ustar00burakstaff000000 000000 #!/usr/bin/env perl -w use strict; use warnings; use vars qw( $VERSION $SILENT ); BEGIN { $ENV{PARSE_HTTP_USERAGENT_TEST_SUITE} = 1; } use constant TERMINAL_WIDTH => 80; use Test::More qw( no_plan ); use File::Spec; use Getopt::Long; use Parse::HTTP::UserAgent; # Work-around for the removal of "." from @INC in Perl 5.26 if (! grep { $_ eq '.' } @INC) { require FindBin; no warnings 'once'; push @INC, $FindBin::Bin . '/..'; } require_ok( File::Spec->catfile( t => 'db.pl' ) ); GetOptions(\my %opt, qw( dump debug supported )); $SILENT = 1; my(@todo,@wrong, %supported); run(); sub run { if ( @todo ) { diag q{-} x TERMINAL_WIDTH; diag 'UserAgents not yet recognized:'; diag $_ for @todo; } if ( @wrong ) { diag q{-} x TERMINAL_WIDTH; diag 'BOGUS parse results:'; diag $_ for @wrong; } if ( $opt{supported} ) { diag 'Supported user agents are:'; foreach my $name ( sort { lc $a cmp lc $b } keys %supported ) { diag "\t$name"; } } _tests(); return; } sub _tests { foreach my $test ( database() ) { my $str = $test->{string}; my $ua = Parse::HTTP::UserAgent->new( $str ); _basic( $ua, $str ); _extended( $ua, $str ); } return; } sub _extended { my($ua, $str) = @_; if ( $ua->name eq 'MSIE' ) { my @net = $ua->dotnet; @net ? ok( scalar @net, "We got .NET CLR: @net") : $opt{debug} && diag("No .NET identifier in the MSIE Agent: $str"); } $ua->os ? ok(1, sprintf q{The Operating System is '%s'}, $ua->os ) : $opt{debug} && diag("No operating system from $str"); $ua->lang ? ok(1, sprintf q{"The Interface Language is '%s'}, $ua->lang ) : $opt{debug} && diag("No language identifier from $str"); my @mozilla = $ua->mozilla; my @toolkit = $ua->toolkit; my @extras = $ua->extras; if ( $opt{debug} ) { diag "Extras are: @extras" if @extras; diag "Toolkit: @toolkit" if @toolkit; diag "Mozilla: @mozilla" if @mozilla; } # dump the parsed structure ok( my $dump = $ua->dumper, 'It can dump'); diag $dump if $opt{dump}; $supported{ $ua->original_name || $ua->name }++ if $opt{supported}; return; } sub _basic { my($ua, $str) = @_; ok( defined $ua, 'We got an object'); my $oops = $ua->unknown ? 1 : 0; if ( ! $ua->robot && ! $ua->generic && $oops ) { my $e = sprintf qq{%s instead of %s\t'%s'}, $oops ? 'unknown' : lc $ua->name, '???', $str; push @wrong, $e; fail("Bogus parse result! $e"); } ok(1, "Found a robot: $str") if $ua->robot; # interface ok( $ua->name, 'It has name' ); ok( defined $ua->version , "It has version - $str" ); ok( defined $ua->version('raw'), 'It has raw version' ); return; } 1; __END__ Parse-HTTP-UserAgent-0.43/t/author-pod-coverage.t000644 000765 000024 00000000567 15003317605 021744 0ustar00burakstaff000000 000000 #!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use strict; use warnings; use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); Parse-HTTP-UserAgent-0.43/t/00-compile.t000644 000765 000024 00000003172 15003317605 017731 0ustar00burakstaff000000 000000 use 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More; plan tests => 6 + ($ENV{AUTHOR_TESTING} ? 1 : 0); my @module_files = ( 'Parse/HTTP/UserAgent.pm', 'Parse/HTTP/UserAgent/Base/Accessors.pm', 'Parse/HTTP/UserAgent/Base/Dumper.pm', 'Parse/HTTP/UserAgent/Base/IS.pm', 'Parse/HTTP/UserAgent/Base/Parsers.pm', 'Parse/HTTP/UserAgent/Constants.pm' ); # no fake home requested my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ) if $ENV{AUTHOR_TESTING}; Parse-HTTP-UserAgent-0.43/t/02-parser.t000644 000765 000024 00000006025 15003317605 017577 0ustar00burakstaff000000 000000 #!/usr/bin/env perl -w use strict; use warnings; use vars qw( $VERSION $SILENT ); BEGIN { $ENV{PARSE_HTTP_USERAGENT_TEST_SUITE} = 1; } use Carp qw( croak ); use Data::Dumper; use File::Spec; use Getopt::Long; use Parse::HTTP::UserAgent; use Test::More qw( no_plan ); $SILENT = 1 if ! $ENV{HARNESS_IS_VERBOSE}; GetOptions(\my %opt, qw( ids=i@ dump )); # Work-around for the removal of "." from @INC in Perl 5.26 if (! grep { $_ eq '.' } @INC) { require FindBin; no warnings 'once'; push @INC, $FindBin::Bin . '/..'; } require_ok( File::Spec->catfile( t => 'db.pl' ) ); my %wanted = $opt{ids} ? map { ( $_, $_ ) } @{ $opt{ids} } : (); sub ok_to_test { my $id = shift; return 1 if ! %wanted; return $wanted{ $id }; } my %seen; foreach my $test ( database({ thaw => 1 }) ) { next if ! ok_to_test( $test->{id} ); die "No user-agent string defined?\n" if ! $test->{string}; die "Already tested '$test->{string}'!\n" if $seen{ $test->{string} }++; my $parsed = Parse::HTTP::UserAgent->new( $test->{string} ); my %got = $parsed->as_hash; if ( ! $test->{struct} ) { fail 'No data in the test result set? Expected something matching ' . "with these:\n$test->{string}\n\n" . dump_struct( \%got ); next; } is( delete $got{string}, $test->{string}, "Ok got the string back for $got{name}" ); ok( delete $got{string_original}, "Ok got the original string back for $got{name}" ); # remove undefs, so that we can extend the test data with less headache %got = map { $_ => $got{ $_ } } grep { defined $got{$_} } keys %got; # also get rid of empty lists my @empty = grep { ref $got{$_} eq 'ARRAY' && @{ $got{$_} } == 0 } keys %got; delete @got{ @empty }; my $is_eq = is_deeply( \%got, $test->{struct}, sprintf q{Frozen data matches parse result for '%s' -> %s -> %s}, $test->{string}, $got{parser} || '???', $test->{id} ); if ( ! $is_eq || $opt{dump} ) { diag sprintf "GOT: %s\nEXPECTED: %s\n", Dumper( \%got ), Dumper( $test->{struct} ); } } sub dump_struct { my $got = shift; delete $got->{string}; my %ok = map { $_ => $got->{$_} } grep { defined $got->{$_} } keys %{ $got }; my($width) = map { $_ } sort { $b <=> $a } map { length $_ } keys %ok; return join q{}, map { sprintf "% -${width}s => %s,\n", $_, dump_field( $ok{ $_ } ) } sort keys %ok; } sub dump_field { my $thing = shift; my $rv = trim( Dumper $thing ); $rv =~ s{ \n \s+ }{ }xmsg; $rv =~ s{ \A \$VAR1 \s = \s }{}xms; $rv =~ s{ ; \z }{}xms; return $rv; } __END__ Parse-HTTP-UserAgent-0.43/t/00-report-prereqs.t000644 000765 000024 00000013601 15003317605 021271 0ustar00burakstaff000000 000000 #!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.029 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if grep { $_ eq $mod } @exclude; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; if ($mod eq 'perl') { push @reports, ['perl', $want, $]]; next; } my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et: Parse-HTTP-UserAgent-0.43/t/author-pod-syntax.t000644 000765 000024 00000000454 15003317605 021472 0ustar00burakstaff000000 000000 #!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); Parse-HTTP-UserAgent-0.43/t/00-report-prereqs.dd000644 000765 000024 00000004620 15003317605 021416 0ustar00burakstaff000000 000000 do { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '0' } }, 'develop' => { 'requires' => { 'Pod::Coverage::TrustPod' => '0', 'Test::CPAN::Meta' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08' } }, 'runtime' => { 'requires' => { 'Carp' => '0', 'Data::Dumper' => '0', 'Exporter' => '0', 'JSON' => '0', 'Test::More' => '0', 'XML::Simple' => '0', 'YAML' => '0', 'constant' => '0', 'overload' => '0', 'parent' => '0', 'perl' => '5.010', 'strict' => '0', 'version' => '0', 'warnings' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'ExtUtils::MakeMaker' => '0', 'File::Basename' => '0', 'File::Find' => '0', 'File::Spec' => '0', 'FindBin' => '0', 'Getopt::Long' => '0', 'IO::File' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Test::More' => '0', 'perl' => '5.010', 'vars' => '0' } } }; $x; }Parse-HTTP-UserAgent-0.43/t/data/000755 000765 000024 00000000000 15003317605 016605 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/author-distmeta.t000644 000765 000024 00000000425 15003317605 021174 0ustar00burakstaff000000 000000 #!perl BEGIN { unless ($ENV{AUTHOR_TESTING}) { print qq{1..0 # SKIP these tests are for testing by the author\n}; exit } } # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use strict; use warnings; use Test::CPAN::Meta; meta_yaml_ok(); Parse-HTTP-UserAgent-0.43/t/data/desktop/000755 000765 000024 00000000000 15003317605 020256 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/README000644 000765 000024 00000000344 15003317605 017466 0ustar00burakstaff000000 000000 Some of the strings in here were taken from: HTTP::BrowserDetect HTML::ParseBrowser HTTP::DetectUserAgent test suites. Others were taken from various web sites (like useragentstring.com) and the rest from the logs. Parse-HTTP-UserAgent-0.43/t/data/robot/000755 000765 000024 00000000000 15003317605 017732 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/various/000755 000765 000024 00000000000 15003317605 020275 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/000755 000765 000024 00000000000 15003317605 020054 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mua/000755 000765 000024 00000000000 15003317605 017367 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mua/thunderbird/000755 000765 000024 00000000000 15003317605 021701 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mua/thunderbird/17x000644 000765 000024 00000000612 15003317605 022242 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 extras => [ 'WOW64' ], mozilla => [ '17.0', '17.000' ], name => 'Thunderbird', os => 'Windows 7', parser => 'mozilla_family:generic', toolkit => [ 'Gecko', '20130801', '20130801.000' ], version => '17.000008', version_raw => '17.0.8', Parse-HTTP-UserAgent-0.43/t/data/mobile/firefox000644 000765 000024 00000004607 15003317605 021450 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Android; Linux armv7l; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 Fennec/10.0.1 device => 'Linux armv7l', mobile => 1, mozilla => [ '10.0.1', '10.000001' ], name => 'Firefox', original_name => 'Fennec', original_version => '10.0.1', os => 'Android', parser => 'firefox', toolkit => [ 'Gecko', '20100101', '20100101.000' ], version => '10.000001', version_raw => '10.0.1', [AGENT] Mozilla/5.0 (Maemo; Linux armv7l; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 Fennec/10.0.1 device => 'Linux armv7l', mobile => 1, mozilla => [ '10.0.1', '10.000001' ], name => 'Firefox', original_name => 'Fennec', original_version => '10.0.1', os => 'Maemo', parser => 'firefox', toolkit => [ 'Gecko', '20100101', '20100101.000' ], version => '10.000001', version_raw => '10.0.1', [AGENT] Mozilla/5.0 (X11; Linux armv7l; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 Fennec/10.0.1 device => 'Linux armv7l', extras => ['X11'], mobile => 1, mozilla => [ '10.0.1', '10.000001' ], name => 'Firefox', original_name => 'Fennec', original_version => '10.0.1', os => 'Linux', parser => 'firefox', toolkit => [ 'Gecko', '20100101', '20100101.000' ], version => '10.000001', version_raw => '10.0.1', [AGENT] Mozilla/5.0 (X11; Linux i686; rv:10.0.1) Gecko/20100101 Firefox/10.0.1 Fennec/10.0.1 extras => [ 'X11' ], mobile => 1, mozilla => [ '10.0.1', '10.000001' ], name => 'Firefox', original_name => 'Fennec', original_version => '10.0.1', os => 'Linux i686', parser => 'firefox', toolkit => [ 'Gecko', '20100101', '20100101.000' ], version => '10.000001', version_raw => '10.0.1', [AGENT] Mozilla/5.0 (Android; Tablet; rv:10.0.4) Gecko/10.0.4 Firefox/10.0.4 Fennec/10.0.4 device => 'Tablet', mobile => 1, mozilla => [ '10.0.4', '10.000004' ], name => 'Firefox', original_name => 'Fennec', original_version => '10.0.4', os => 'Android', parser => 'firefox', tablet => 1, toolkit => [ 'Gecko', '10.0.4', '10.000004' ], version => '10.000004', version_raw => '10.0.4', Parse-HTTP-UserAgent-0.43/t/data/mobile/tablet/000755 000765 000024 00000000000 15003317605 021327 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/000755 000765 000024 00000000000 15003317605 021165 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/opera/000755 000765 000024 00000000000 15003317605 021162 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/opera/1000644 000765 000024 00000005257 15003317605 021256 0ustar00burakstaff000000 000000 # Opera Mini. Not very innovative UA-string eh? [AGENT] Opera/9.50 (J2ME/MIDP; Opera Mini/4.0.10031/298; U; en) 'original_name' => 'Opera Mini', 'parser' => 'opera_pre', 'strength' => 'U', 'lang' => 'en', 'extras' => ['J2ME/MIDP'], 'version_raw' => '9.50', 'version' => '9.500', 'name' => 'Opera', 'original_version' => '4.0.10031/298', 'mobile' => 1, [AGENT] Opera/9.50 (J2ME/MIDP; Opera Mini/4.0.10031/230; U; en 'original_name' => 'Opera Mini', 'parser' => 'opera_pre', 'strength' => 'U', 'lang' => 'en', 'extras' => ['J2ME/MIDP'], 'version_raw' => '9.50', 'version' => '9.500', 'name' => 'Opera', 'original_version' => '4.0.10031/230', 'mobile' => 1, [AGENT] Opera/8.01 (J2ME/MIDP; Opera Mini/2.0.4509/1378; nl; U; ssr) 'original_name' => 'Opera Mini', 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'ssr', 'extras' => ['J2ME/MIDP','nl'], 'version_raw' => '8.01', 'version' => '8.010', 'name' => 'Opera', 'original_version' => '2.0.4509/1378', 'mobile' => 1, [AGENT] Opera/8.01 (J2ME/MIDP; Opera Mini/1.1.2277/lofi/nordic/int; O2 Xda II; en; U; ssr) 'original_name' => 'Opera Mini', 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'ssr', 'extras' => ['J2ME/MIDP','O2 Xda II','en'], 'version_raw' => '8.01', 'version' => '8.010', 'name' => 'Opera', 'original_version' => '1.1.2277/lofi/nordic/int', 'mobile' => 1, [AGENT] Opera/9.60 (J2ME/MIDP; Opera Mini/4.2.13337/504; U; en) Presto/2.2.0 'original_name' => 'Opera Mini', 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'J2ME/MIDP', 'version_raw' => '9.60', 'lang' => 'en', 'version' => '9.600', 'name' => 'Opera', 'original_version' => '4.2.13337/504', 'toolkit' => ['Presto','2.2.0','2.002000'], 'mobile' => 1, [AGENT] Opera/8.01 (J2ME/MIDP; Opera Mini/1.0.1479/HiFi; SonyEricsson P900; no; U; ssr) 'original_name' => 'Opera Mini', 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'ssr', 'extras' => ['J2ME/MIDP','SonyEricsson P900','no'], 'version_raw' => '8.01', 'version' => '8.010', 'name' => 'Opera', 'original_version' => '1.0.1479/HiFi', 'mobile' => 1, [AGENT] SAMSUNG-SGH-i900/1.0 Opera 9.5 'parser' => 'moz_only', 'extras' => [ 'Opera', '9.5' ], 'version_raw' => '1.0', 'version' => '1.000', 'name' => 'SAMSUNG-SGH-i900',Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/symbian/000755 000765 000024 00000000000 15003317605 022627 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/android/000755 000765 000024 00000000000 15003317605 022605 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/iphone/000755 000765 000024 00000000000 15003317605 022447 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/iphone/1000644 000765 000024 00000003046 15003317605 022535 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en) AppleWebKit/420+ (KHTML, like Gecko) Version/3.0 Mobile/1A543a Safari/419.3 parser => 'safari', strength => 'U', os => 'CPU like Mac OS X', extras => ['KHTML, like Gecko','Mobile/1A543a','Safari/419.3'], version_raw => '3.0', lang => 'en', version => '3.000', name => 'Safari', device => 'iPhone', toolkit => ['AppleWebKit','420+','420.000'], mobile => 1, [AGENT] Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 device => 'iPhone', extras => [ 'KHTML, like Gecko', 'Mobile/9A334', 'Safari/7534.48.3' ], mobile => 1, name => 'Safari', os => 'CPU iPhone OS 5_0 like Mac OS X', parser => 'safari', toolkit => [ 'AppleWebKit', '534.46', '534.460' ], version => '5.100', version_raw => '5.1', [AGENT] Mozilla/5.0 (iPhone; U; CPU iPhone OS 5_1 like Mac OS X; 6534.46) AppleWebKit/en_SG (KHTML, like Gecko) Mobile/8C148 Safari/6533.18.5 device => 'iPhone', extras => [ 'KHTML, like Gecko', 'Safari/6533.18.5' ], lang => 'en_SG', mobile => 1, name => 'Safari', os => 'CPU iPhone OS 5_1 like Mac OS X', parser => 'safari', strength => 'U', toolkit => [ 'AppleWebKit', undef, 0 ], version => '8.148', version_raw => '8C148', Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/android/htc000644 000765 000024 00000005064 15003317605 023313 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; HTC Desire 1.19.161.5 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.1-update1 (ERE27)', 'extras' => ['KHTML, like Gecko', 'Safari/530.17'], 'toolkit' => ['AppleWebKit','530.17','530.170'], 'version_raw' => '4.0', 'lang' => 'de-de', 'version' => '4.000', 'name' => 'Android', 'device' => 'HTC Desire 1.19.161.5', [AGENT] Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; ADR6300 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.1-update1 (ERE27)', 'extras' => ['KHTML, like Gecko','Safari/530.17'], 'toolkit' => ['AppleWebKit','530.17','530.170'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'ADR6300', [AGENT] Mozilla/5.0 (Linux; U; Android 1.6; en-us; WOWMobile myTouch 3G Build/unknown) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 1.6 (unknown)', 'extras' => ['KHTML, like Gecko','Safari/525.20.1'], 'toolkit' => ['AppleWebKit','528.5+','528.500'], 'version_raw' => '3.1.2', 'lang' => 'en-us', 'version' => '3.001002', 'name' => 'Android', 'device' => 'WOWMobile myTouch 3G', [AGENT] Mozilla/5.0 (Linux; U; Android 2.2; nl-nl; Desire_A8181 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.2 (FRF91)', 'extras' => ['KHTML, like Gecko','Safari/533.1'], 'toolkit' => ['AppleWebKit','533.1','533.100'], 'version_raw' => '4.0', 'lang' => 'nl-nl', 'version' => '4.000', 'name' => 'Android', 'device' => 'Desire_A8181', [AGENT] HTC_Dream Mozilla/5.0 (Linux; U; Android 1.5; en-ca; Build/CUPCAKE) AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 1.5', 'extras' => ['KHTML, like Gecko','Safari/525.20.1'], 'toolkit' => ['AppleWebKit','528.5+','528.500'], 'version_raw' => '3.1.2', 'lang' => 'en-ca', 'version' => '3.001002', 'name' => 'Android', 'device' => 'Build/CUPCAKE', Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/android/google000644 000765 000024 00000001750 15003317605 024007 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.2 (FRF91)', 'extras' => ['KHTML, like Gecko','Safari/533.1'], 'toolkit' => ['AppleWebKit','533.1','533.100'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'Nexus One', [AGENT] Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.1 (ERD62)', 'extras' => [ 'KHTML, like Gecko','Safari/530.17'], 'toolkit' => ['AppleWebKit','530.17','530.170'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'Nexus One', Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/android/samsung000644 000765 000024 00000004703 15003317605 024211 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Linux; U; Android 2.3.3; tr-tr; GT-I9000 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.3.3 (GINGERBREAD)', 'extras' => ['KHTML, like Gecko','Safari/533.1'], 'toolkit' => ['AppleWebKit','533.1','533.100'], 'version_raw' => '4.0', 'lang' => 'tr-tr', 'version' => '4.000', 'name' => 'Android', 'device' => 'GT-I9000', [AGENT] Mozilla/5.0 (Linux; U; Android 2.2; tr-tr; GT-I9000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.2 (FROYO)', 'extras' => ['KHTML, like Gecko','Safari/533.1'], 'toolkit' => ['AppleWebKit','533.1','533.100'], 'version_raw' => '4.0', 'lang' => 'tr-tr', 'version' => '4.000', 'name' => 'Android', 'device' => 'GT-I9000', [AGENT] Mozilla/5.0 (Linux; U; Android 2.2; en-gb; GT-P1000 Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.2 (FROYO)', 'extras' => ['KHTML, like Gecko','Safari/533.1'], 'toolkit' => ['AppleWebKit','533.1','533.100'], 'version_raw' => '4.0', 'lang' => 'en-gb', 'version' => '4.000', 'name' => 'Android', 'device' => 'GT-P1000', [AGENT] Mozilla/5.0 (Linux; U; Android 2.2; en-ca; SGH-T959D Build/FROYO) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.2 (FROYO)', 'extras' => ['KHTML, like Gecko','Safari/533.1'], 'toolkit' => ['AppleWebKit','533.1','533.100'], 'version_raw' => '4.0', 'lang' => 'en-ca', 'version' => '4.000', 'name' => 'Android', 'device' => 'SGH-T959D', [AGENT] Mozilla/5.0 (Linux; U; Android 2.0.1; en-us; Droid Build/ESD56) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.0.1 (ESD56)', 'extras' => ['KHTML, like Gecko','Safari/530.17'], 'toolkit' => ['AppleWebKit','530.17','530.170'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'Droid', Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/android/1000644 000765 000024 00000000155 15003317605 022671 0ustar00burakstaff000000 000000 [AGENT] #TODO: Mozilla/5.0 (Linux; U; Android 0.5; en-us) AppleWebKit/522+ (KHTML, like Gecko) Safari/419.3 Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/android/dell000644 000765 000024 00000001121 15003317605 023443 0ustar00burakstaff000000 000000 [AGENT] # Missing the closing parenthesis before "AppleWebKit" Mozilla/5.0 (Linux; U; Android 1.6; en-gb; Dell Streak Build/Donut AppleWebKit/528.5+ (KHTML, like Gecko) Version/3.1.2 Mobile Safari/ 525.20.1 'parser' => 'android:paren_fixer', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 1.6 (Donut)', 'extras' => ['KHTML, like Gecko', 'Safari/','525.20.1' ], 'toolkit' => [ 'AppleWebKit', '528.5+', '528.500' ], 'version_raw' => '3.1.2', 'lang' => 'en-gb', 'version' => '3.001002', 'name' => 'Android', 'device' => 'Dell Streak', Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/android/motorola000644 000765 000024 00000005777 15003317605 024404 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Linux; U; Android 2.2; en-us; DROID2 GLOBAL Build/S273) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.2 (S273)', 'extras' => ['KHTML, like Gecko','Safari/533.1'], 'toolkit' => ['AppleWebKit','533.1','533.100'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'DROID2 GLOBAL', [AGENT] Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 3.0 (HRI39)', 'extras' => ['KHTML, like Gecko','Safari/534.13'], 'toolkit' => ['AppleWebKit','534.13','534.130'], 'version_raw' => '4.0', 'tablet' => 1, 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'Xoom', [AGENT] Mozilla/5.0 (Linux; U; Android 2.2; en-us; Droid Build/FRG22D) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.2 (FRG22D)', 'extras' => ['KHTML, like Gecko','Safari/533.1'], 'toolkit' => ['AppleWebKit','533.1','533.100'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'Droid', [AGENT] Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; DROIDX Build/VZW) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 480X854 motorola DROIDX 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.1-update1 (VZW)', 'extras' => ['KHTML, like Gecko','Safari/530.17','480X854','motorola','DROIDX'], 'toolkit' => ['AppleWebKit','530.17','530.170'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'DROIDX', [AGENT] Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; Droid Build/ESE81) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.1-update1 (ESE81)', 'extras' => ['KHTML, like Gecko','Safari/530.17'], 'toolkit' => ['AppleWebKit','530.17','530.170'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'Droid', [AGENT] Mozilla/5.0 (Linux; U; Android 2.0; en-us; Droid Build/ESD20) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/ 530.17 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.0 (ESD20)', 'extras' => ['KHTML, like Gecko','Safari/','530.17'], 'toolkit' => ['AppleWebKit','530.17','530.170'], 'version_raw' => '4.0', 'lang' => 'en-us', 'version' => '4.000', 'name' => 'Android', 'device' => 'Droid', Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/android/sony000644 000765 000024 00000001015 15003317605 023515 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; E10i Build/2.0.2.A.0.24) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17 'parser' => 'android', 'mobile' => 1, 'strength' => 'U', 'os' => 'Android 2.1-update1 (2.0.2.A.0.24)', 'extras' => [ 'KHTML, like Gecko', 'Safari/530.17' ], 'toolkit' => ['AppleWebKit', '530.17','530.170'], 'version_raw' => '4.0', 'lang' => 'de-de', 'version' => '4.000', 'name' => 'Android', 'device' => 'E10i', Parse-HTTP-UserAgent-0.43/t/data/mobile/phone/symbian/nokia000644 000765 000024 00000003404 15003317605 023654 0ustar00burakstaff000000 000000 [AGENT] Nokia6630/1.0 (3.45.113) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1 device => 'Nokia6630/1.0', extras => [ 'Profile/MIDP-2.0', 'Configuration/CLDC-1.1', '(3.45.113)' ], mobile => 1, name => 'Series60', os => 'SymbianOS/8.0', parser => 'symbian', version => '2.600', version_raw => '2.6', [AGENT] Nokia6682/2.0 (3.01.1) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 configuration/CLDC-1.1 UP.Link/6.3.0.0.0 (compatible;YahooSeeker/M1A1-R2D2; http://help.yahoo.com/help/us/ysearch/crawling/crawling-01.html) device => 'Nokia6682/2.0', extras => [ 'Profile/MIDP-2.0', 'configuration/CLDC-1.1', 'UP.Link/6.3.0.0.0', '(compatible', 'YahooSeeker/M1A1-R2D2', 'http://help.yahoo.com/help/us/ysearch/crawling/crawling-01.html)', '(3.01.1)' ], mobile => 1, name => 'Series60', os => 'SymbianOS/8.0', parser => 'symbian', version => '2.600', version_raw => '2.6', [AGENT] SymbianOS/9.4; Series60/5.0 NokiaN97-4/30.0.004; Profile/MIDP-2.1 Configuration/CLDC-1.1) device => 'NokiaN97-4/30.0.004', extras => [ 'Profile/MIDP-2.1', 'Configuration/CLDC-1.1' ], mobile => 1, name => 'Series60', os => 'SymbianOS/9.4', parser => 'symbian', version => '5.000', version_raw => '5.0', [AGENT] Symbian/3; Series60/5.3 Nokia603/111.020.0310; Profile/MIDP-2.1 Configuration/CLDC-1.1 device => 'Nokia603/111.020.0310', extras => [ 'Profile/MIDP-2.1', 'Configuration/CLDC-1.1' ], mobile => 1, name => 'Series60', os => 'Symbian/3', parser => 'symbian', version => '5.300', version_raw => '5.3',Parse-HTTP-UserAgent-0.43/t/data/mobile/tablet/android/000755 000765 000024 00000000000 15003317605 022747 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/tablet/ipad/000755 000765 000024 00000000000 15003317605 022244 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/tablet/windows/000755 000765 000024 00000000000 15003317605 023021 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/mobile/tablet/windows/1000644 000765 000024 00000000536 15003317605 023110 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows NT 6.3; ARM; Trident/7.0; Touch; rv:11.0) like Gecko device => 'ARM', name => 'MSIE', os => 'Windows 8.1', parser => 'msie11', toolkit => [ 'Trident', '7.0', '7.000' ], touch => 1, version => '11.000', version_raw => '11.0', mobile => 1, Parse-HTTP-UserAgent-0.43/t/data/mobile/tablet/ipad/1000644 000765 000024 00000005337 15003317605 022337 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; fr-fr) AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile/8L1 extras => [ 'KHTML, like Gecko', 'Mobile/8L1' ], lang => 'fr-fr', name => 'iPad', os => 'CPU OS 4_3_5 like Mac OS X', parser => 'safari', strength => 'U', toolkit => [ 'AppleWebKit', '533.17.9', '533.017009' ], mobile => 1, tablet => 1, [AGENT] Mozilla/5.0 (iPad; U; CPU OS OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10 extras => [ 'KHTML, like Gecko', 'Mobile/7B367', 'Safari/531.21.10' ], lang => 'en-us', name => 'iPad', os => 'CPU OS OS 3_2 like Mac OS X', parser => 'safari', strength => 'U', toolkit => [ 'AppleWebKit', '531.21.10', '531.021010' ], version => '4.000004', version_raw => '4.0.4', mobile => 1, tablet => 1, [AGENT] Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B405 Safari/531.21.10 extras => [ 'KHTML, like Gecko', 'Mobile/7B405', 'Safari/531.21.10' ], lang => 'en-us', name => 'iPad', os => 'CPU OS 3_2_1 like Mac OS X', parser => 'safari', strength => 'U', toolkit => [ 'AppleWebKit', '531.21.10', '531.021010' ], version => '4.000004', version_raw => '4.0.4', mobile => 1, tablet => 1, [AGENT] Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405 extras => [ 'KHTML, like Gecko', 'Mobile/7B405' ], lang => 'en-us', name => 'iPad', os => 'CPU OS 3_2_1 like Mac OS X', parser => 'safari', strength => 'U', toolkit => [ 'AppleWebKit', '531.21.10', '531.021010' ], mobile => 1, tablet => 1, [AGENT] Mozilla/5.0 (iPad; U; CPU OS 4_3_5 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8L1 Safari/6533.18.5 extras => [ 'KHTML, like Gecko', 'Mobile/8L1', 'Safari/6533.18.5' ], lang => 'en-us', name => 'iPad', os => 'CPU OS 4_3_5 like Mac OS X', parser => 'safari', strength => 'U', toolkit => [ 'AppleWebKit', '533.17.9', '533.017009' ], version => '5.000002', version_raw => '5.0.2', mobile => 1, tablet => 1, [AGENT] Mozilla/5.0 (iPad; CPU OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3 extras => [ 'KHTML, like Gecko', 'Mobile/9A334', 'Safari/7534.48.3' ], mobile => 1, name => 'iPad', os => 'CPU OS 5_0 like Mac OS X', parser => 'safari', tablet => 1, toolkit => [ 'AppleWebKit', '534.46', '534.460' ], version => '5.100', version_raw => '5.1', Parse-HTTP-UserAgent-0.43/t/data/mobile/tablet/android/samsung000644 000765 000024 00000000764 15003317605 024356 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7100 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13 device => 'GT-P7100', extras => [ 'KHTML, like Gecko', 'Safari/534.13' ], lang => 'en-us', mobile => 1, name => 'Android', os => 'Android 3.0.1 (HRI83)', parser => 'android', strength => 'U', tablet => 1, toolkit => [ 'AppleWebKit', '534.13', '534.130' ], version => '4.000', version_raw => '4.0', Parse-HTTP-UserAgent-0.43/t/data/various/1000644 000765 000024 00000006744 15003317605 020373 0ustar00burakstaff000000 000000 [AGENT] Links (0.96; Unix) 'parser' => 'generic_moz_thing', 'os' => 'Unix', 'version_raw' => '0.96', 'version' => '0.960', 'name' => 'Links', 'generic' => 1 [AGENT] Mozilla/4.0 WebTV/2.6 (compatible; MSIE 4.0) 'parser' => 'moz_only', 'version_raw' => '2.6', 'version' => '2.600', 'name' => 'WebTV', [AGENT] Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c 'parser' => 'moz_only', 'extras' => [ 'libwww-FM/2.14', 'SSL-MM/1.4.1', 'OpenSSL/0.9.6c' ], 'version_raw' => '2.8.4rel.1', 'version' => '2.008004001', 'name' => 'Lynx', [AGENT] Lynx/2.8.3rel.1 libwww-FM/2.14 'parser' => 'moz_only', 'extras' => [ 'libwww-FM/2.14' ], 'version_raw' => '2.8.3rel.1', 'version' => '2.008003001', 'name' => 'Lynx', [AGENT] Lynx/2.8.3rel.1 libwww-FM/2.14FM extras => [ 'libwww-FM/2.14FM' ], name => 'Lynx', parser => 'moz_only', version => '2.008003001', version_raw => '2.8.3rel.1', [AGENT] Lynx/2.8.8dev.5 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/2.8.6 extras => [ 'libwww-FM/2.14', 'SSL-MM/1.4.1', 'GNUTLS/2.8.6' ], name => 'Lynx', parser => 'moz_only', version => '2.008008005', version_raw => '2.8.8dev.5', [AGENT] # HotJava Mozilla/3.0 (x86 [en] Windows NT 5.1; Sun) 'os' => 'Windows XP', 'extras' => ['x86'], 'version_raw' => '3.0', 'lang' => 'en', 'version' => '3.000', 'name' => 'HotJava', [AGENT] BlackBerry7730/3.7.1 UP.Link/5.1.2.5 'parser' => 'moz_only', 'extras' => [ 'UP.Link/5.1.2.5' ], 'version_raw' => '3.7.1', 'version' => '3.007001', 'name' => 'BlackBerry7730', [AGENT] Emacs-W3/2.1.105 URL/1.267 ((Unix?) ; TTY ; sparc-sun-solaris2.3) parser => 'emacs', extras => [ 'TTY','sparc-sun-solaris2.3','URL/1.267' ], version_raw => '2.1.105', version => '2.001105', name => 'Emacs-W3', os => 'Unix?', [AGENT] Emacs-W3/4.0pre.46 URL/p4.0pre.46 (i686-pc-linux; X11) 'parser' => 'emacs', 'os' => 'i686-pc-linux', 'extras' => ['X11', 'URL/p4.0pre.46' ], 'version_raw' => '4.0pre.46', 'version' => '4.000046', 'name' => 'Emacs-W3', [AGENT] fetch/1.0 FreeBSD/4.0-CURRENT (i386) 'parser' => 'generic_moz_thing', 'os' => 'FreeBSD 4.0-CURRENT', 'extras' => ['i386'], 'version_raw' => '1.0', 'version' => '1.000', 'name' => 'fetch', 'generic' => 1 [AGENT] # name/version UP.Browser/4.1.2a-XXXX 'parser' => 'generic_name_version', 'version_raw' => '4.1.2a-XXXX', 'version' => '4.001002', 'name' => 'UP.Browser', 'generic' => 1 [AGENT] Wapalizer/1.0 'parser' => 'generic_name_version', 'version_raw' => '1.0', 'version' => '1.000', 'name' => 'Wapalizer', 'generic' => 1 [AGENT] YourWap/1.16 'parser' => 'generic_name_version', 'version_raw' => '1.16', 'version' => '1.160', 'name' => 'YourWap', 'generic' => 1 [AGENT] Nokia-WAP-Toolkit/1.3beta 'parser' => 'generic_name_version', 'version_raw' => '1.3beta', 'version' => '1.300', 'name' => 'Nokia-WAP-Toolkit', 'generic' => 1 Parse-HTTP-UserAgent-0.43/t/data/various/todo000644 000765 000024 00000000347 15003317605 021171 0ustar00burakstaff000000 000000 [AGENT] #TODO: SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html) [AGENT] #TODO: Mozilla/0.91 Beta (Windows) Parse-HTTP-UserAgent-0.43/t/data/various/2000644 000765 000024 00000002460 15003317605 020363 0ustar00burakstaff000000 000000 #------------------------------------------------------------------------------# # ----[ CATEGORY: name/version (foo) [AGENT] AmigaVoyager/3.3.50 (AmigaOS/PPC) 'parser' => 'generic_moz_thing', 'os' => 'AmigaOS/PPC', 'version_raw' => '3.3.50', 'version' => '3.003050', 'name' => 'AmigaVoyager', 'generic' => 1 [AGENT] AmigaVoyager (compatible; AmigaVoyager; AmigaOS) 'parser' => 'generic_compatible', 'os' => 'AmigaOS', 'version_raw' => 0, 'name' => 'AmigaVoyager', 'generic' => 1 [AGENT] AvantGo 3.2 (compatible; AvantGo 3.2) 'parser' => 'generic_compatible', 'version_raw' => '3.2', 'version' => '3.200', 'name' => 'AvantGo', 'generic' => 1 [AGENT] Nokia7110/1.0 (30.05) 'parser' => 'generic_moz_thing', 'extras' => ['30.05'], 'version_raw' => '1.0', 'version' => '1.000', 'name' => 'Nokia7110', 'generic' => 1 [AGENT] iCab/Pre2.0 (Macintosh; I; PPC) 'parser' => 'generic_moz_thing', 'strength' => 'I', 'os' => 'Macintosh', 'extras' => ['PPC'], 'version_raw' => 'Pre2.0', 'version' => '2.000', 'name' => 'iCab', 'generic' => 1Parse-HTTP-UserAgent-0.43/t/data/robot/1000644 000765 000024 00000014327 15003317605 020024 0ustar00burakstaff000000 000000 [AGENT] # googlebot Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) 'parser' => 'generic_compatible', 'extras' => ['http://www.google.com/bot.html'], 'version_raw' => '2.1', 'version' => '2.100', 'name' => 'Googlebot', 'generic' => 1, 'robot' => 1, [AGENT] # googlebot mobile DoCoMo/1.0/N505i/c20/TB/W20H10 (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html) 'parser' => 'docomo', 'mobile' => 1, 'extras' => [ '+http://www.google.com/bot.html' ], 'version_raw' => '2.1', 'robot' => 1, 'version' => '2.100', 'name' => 'Googlebot-Mobile', [AGENT] # Yahoo! Slurp Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp) 'parser' => 'generic_compatible', 'extras' => ['http://help.yahoo.com/help/us/ysearch/slurp'], 'version_raw' => 0, 'name' => 'Yahoo! Slurp', 'generic' => 1, 'robot' => 1, [AGENT] Baiduspider+(+http://help.baidu.jp/system/05.html) 'parser' => 'generic_moz_thing', 'extras' => ['+http://help.baidu.jp/system/05.html'], 'version_raw' => 0, 'name' => 'Baiduspider+', 'generic' => 1, 'robot' => 1, [AGENT] msnbot/1.1 (+http://search.msn.com/msnbot.htm) 'parser' => 'generic_moz_thing', 'extras' => ['http://search.msn.com/msnbot.htm'], 'version_raw' => '1.1', 'version' => '1.100', 'name' => 'msnbot', 'generic' => 1, 'robot' => 1, [AGENT] #TODO: Mozilla/5.0 (Twiceler-0.9 http://www.cuill.com/twiceler/robot.html) [AGENT] curl/7.13.0 (i686-suse-linux) libcurl/7.13.0 OpenSSL/0.9.7e zlib/1.2.2 'parser' => 'generic_moz_thing', 'extras' => [ 'i686-suse-linux', 'libcurl/7.13.0', 'OpenSSL/0.9.7e', 'zlib/1.2.2' ], 'version_raw' => '7.13.0', 'version' => '7.013000', 'name' => 'curl', 'generic' => 1, 'robot' => 1, [AGENT] Links (2.1pre15; Linux 2.4.26-vc4 i586; x) 'parser' => 'generic_moz_thing', 'extras' => [ 'Linux 2.4.26-vc4 i586', 'x' ], 'version_raw' => '2.1pre15', 'version' => '2.115', 'name' => 'Links', 'generic' => 1, [AGENT] Wget/1.4.5 'parser' => 'generic_name_version', 'version_raw' => '1.4.5', 'version' => '1.004005', 'name' => 'Wget', 'generic' => 1, 'robot' => 1, [AGENT] W3C_Validator/1.183 libwww-perl/5.64 'parser' => 'moz_only', 'extras' => ['libwww-perl/5.64'], 'version_raw' => '1.183', 'version' => '1.183', 'name' => 'W3C_Validator', [AGENT] libwww-perl/5.11 'parser' => 'generic_name_version', 'version_raw' => '5.11', 'version' => '5.110', 'name' => 'libwww-perl', 'generic' => 1, 'robot' => 1, [AGENT] GetRight/3.2.1 'parser' => 'generic_name_version', 'version_raw' => '3.2.1', 'version' => '3.002001', 'name' => 'GetRight', 'generic' => 1, 'robot' => 1, [AGENT] Googlebot/1.0 (googlebot@googlebot.com http://googlebot.com/) 'parser' => 'generic_moz_thing', 'extras' => ['googlebot@googlebot.com http://googlebot.com/'], 'version_raw' => '1.0', 'version' => '1.000', 'name' => 'Googlebot', 'generic' => 1, 'robot' => 1, [AGENT] #TODO: DoCoMo/2.0 N905i(c100;TB;W24H16) (compatible; Googlebot-Mobile/2.1; +http://www.google.com/bot.html) [AGENT] #TODO: Mozilla/5.0 (compatible; FriendFeedBot/0.1; +Http://friendfeed.com/about/bot; 179 subscribers; feed-id=1001488174509690116) [AGENT] #TODO: Mozilla/5.0 (compatible; Yahoo! Slurp China; http://misc.yahoo.com.cn/help.html) [AGENT] #TODO: Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp) [AGENT] #TODO: Mozilla/5.0 (compatible; YandexBot/3.0; MirrorDetector; +http://yandex.com/bots) [AGENT] #TODO: Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07) [AGENT] #TODO: Sogou-Test-Spider/4.0 (compatible; MSIE 5.5; Windows 98) [AGENT] #TODO: Gigabot/3.0 (http://www.gigablast.com/spider.html) [AGENT] Java/1.6.0_21 parser => 'generic_name_version', version_raw => '1.6.0_21', version => '1.006000021', name => 'Java', generic => 1, [AGENT] #TODO: MLBot (www.metadatalabs.com/mlbot) [AGENT] #TODO: Mail.Ru/1.0 [AGENT] #TODO: Mozilla/5.0 (compatible; Exabot/3.0 (BiggerBetter); +http://www.exabot.com/go/robot) [AGENT] #TODO: Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html) [AGENT] #TODO: Mozilla/5.0 (compatible; MJ12bot/v1.3.3; http://www.majestic12.co.uk/bot.php?+) [AGENT] #TODO: Mozilla/5.0 (compatible; ScoutJet; +http://www.scoutjet.com/) [AGENT] #TODO: Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) [AGENT] #TODO: Mozilla/5.0 (compatible; YoudaoBot/1.0; http://www.youdao.com/help/webmaster/spider/; ) [AGENT] #TODO: Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) [AGENT] #TODO: Sosospider+(+http://help.soso.com/webspider.htm) [AGENT] #TODO: Yeti/1.0 (NHN Corp.; http://help.naver.com/robots/) [AGENT] #TODO: Mozilla/4.0 (compatible; http://search.thunderstone.com/texis/websearch/about.html) [AGENT] #TODO: Mozilla/5.0 (compatible; Yahoo! Slurp; http://help.yahoo.com/help/us/ysearch/slurp) [AGENT] #TODO: ADmantX Platform Semantic Analyzer - ADmantX Inc. - www.admantx.com - support@admantx.com [AGENT] #TODO: Google-Test [AGENT] # some archaic phone #TODO: LG/U8120/v1.0 [AGENT] # huh? #TODO: Mac Safari [AGENT] #should be unknown #TODO: Microsoft Office Existence Discovery [AGENT] #TODO: Mozilla/4.0 (compatible; MSIE 999.1; Unknown) [AGENT] # http://synapse.apache.org #TODO: Mozilla/4.0 (compatible; Synapse) [AGENT] #TODO: Mozilla/4.0 [en] (compatible; MSIE 8.0; Windows) [AGENT] # crawler: http://www.httrack.com #TODO: Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98) [AGENT] # http://webmasters.stackexchange.com/questions/22504/what-is-a-sitecon-user-agent #TODO: Mozilla/5.0 (Linux; U; en-gb) AppleWebKit/418.9.1 (KHTML, like Gecko) SiteCon/8.10.22 Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/000755 000765 000024 00000000000 15003317605 021720 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/epiphany/000755 000765 000024 00000000000 15003317605 022073 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/mozilla/000755 000765 000024 00000000000 15003317605 021725 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/lunascape/000755 000765 000024 00000000000 15003317605 022231 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/000755 000765 000024 00000000000 15003317605 021213 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/netscape/000755 000765 000024 00000000000 15003317605 022060 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/sleipnir/000755 000765 000024 00000000000 15003317605 022103 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/camino/000755 000765 000024 00000000000 15003317605 021524 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/safari/000755 000765 000024 00000000000 15003317605 021523 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/konqueror/000755 000765 000024 00000000000 15003317605 022303 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/chrome/000755 000765 000024 00000000000 15003317605 021533 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/000755 000765 000024 00000000000 15003317605 021364 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/tinybrowser/000755 000765 000024 00000000000 15003317605 022645 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/msoffice/000755 000765 000024 00000000000 15003317605 022051 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/seamonkey/000755 000765 000024 00000000000 15003317605 022251 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/maxthon/000755 000765 000024 00000000000 15003317605 021734 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/maxthon/3x000644 000765 000024 00000004450 15003317605 022214 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.12 (KHTML, like Gecko) Maxthon/3.0 Chrome/18.0.966.0 Safari/535.12 extras => [ 'KHTML, like Gecko', 'AppleWebKit/535.12' ], name => 'Maxthon', original_name => 'Maxthon', original_version => '3.0', os => 'Windows XP', parser => 'maxthon', toolkit => [ 'Chrome', '18.0.966.0', '18.000966000' ], version => '535.120', version_raw => '535.12', [AGENT] Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.12 (KHTML, like Gecko) Maxthon/3.0 Chrome/18.0.966.0 Safari/535.12 extras => [ 'KHTML, like Gecko', 'AppleWebKit/535.12' ], name => 'Maxthon', original_name => 'Maxthon', original_version => '3.0', os => 'Windows 7', parser => 'maxthon', toolkit => [ 'Chrome', '18.0.966.0', '18.000966000' ], version => '535.120', version_raw => '535.12', [AGENT] Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.12 (KHTML, like Gecko) Maxthon/3.0 Chrome/18.0.966.0 Safari/535.12 extras => [ 'KHTML, like Gecko', 'AppleWebKit/535.12', 'WOW64' ], name => 'Maxthon', original_name => 'Maxthon', original_version => '3.0', os => 'Windows 7', parser => 'maxthon', toolkit => [ 'Chrome', '18.0.966.0', '18.000966000' ], version => '535.120', version_raw => '535.12', [AGENT] Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.12 (KHTML, like Gecko) Maxthon/3.4.2.3000 Chrome/18.0.966.0 Safari/535.12 extras => [ 'KHTML, like Gecko', 'AppleWebKit/535.12', 'WOW64' ], name => 'Maxthon', original_name => 'Maxthon', original_version => '3.4.2.3000', os => 'Windows 7', parser => 'maxthon', toolkit => [ 'Chrome', '18.0.966.0', '18.000966000' ], version => '535.120', version_raw => '535.12', [AGENT] Mozilla/5.0 (Windows; U; Windows NT 6.1; ) AppleWebKit/534.12 (KHTML, like Gecko) Maxthon/3.0 Safari/534.12 extras => [ 'Windows', 'like', 'Gecko', 'AppleWebKit/534.12' ], name => 'Maxthon', original_name => 'Maxthon', original_version => '3.0', os => 'Windows 7', parser => 'maxthon', strength => 'U', toolkit => [ 'Safari', '534.12', '534.120' ], Parse-HTTP-UserAgent-0.43/t/data/desktop/maxthon/bogus000644 000765 000024 00000000144 15003317605 022775 0ustar00burakstaff000000 000000 [AGENT] #TODO: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Maxthon Parse-HTTP-UserAgent-0.43/t/data/desktop/maxthon/2x000644 000765 000024 00000005125 15003317605 022213 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; MAXTHON 2.0) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'extras' => [ 'SV1' ], 'version_raw' => '8.0', 'version' => '8.000', 'name' => 'MSIE', 'dotnet' => [ '1.1.4322', '2.0.50727' ], 'original_version' => '2.0', 'toolkit' => [ 'Trident', '4.0', '4.000' ] [AGENT] Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MAXTHON 2.0) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows Vista / Server 2008', 'extras' => [ 'SLCC1', 'Media Center PC 5.0' ], 'version_raw' => '8.0', 'version' => '8.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','3.5.30729','3.0.30618'], 'original_version' => '2.0', 'toolkit' => ['Trident','4.0','4.000'] [AGENT] Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; MAXTHON 2.0) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows Server 2003', 'version_raw' => '8.0', 'version' => '8.000', 'name' => 'MSIE', 'original_version' => '2.0', 'toolkit' => ['Trident','4.0','4.000'] [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MAXTHON 2.0) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows Vista / Server 2008', 'extras' => ['SV1','SLCC1','Media Center PC 5.0'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','3.5.30729','3.0.30618'], 'original_version' => '2.0' [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; FunWebProducts; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; Alexa Toolbar; .NET CLR 3.5.30729; .NET CLR 3.0.30618; MAXTHON 2.0) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows Vista / Server 2008', 'extras' => ['FunWebProducts','SLCC1','Media Center PC 5.0','Alexa Toolbar'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','3.5.30729','3.0.30618'], 'original_version' => '2.0' Parse-HTTP-UserAgent-0.43/t/data/desktop/maxthon/1x000644 000765 000024 00000013336 15003317605 022215 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Maxthon; Win64; x64; Trident/4.0) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows 7', 'extras' => ['Win64','x64'], 'version_raw' => '8.0', 'version' => '8.000', 'name' => 'MSIE', 'original_version' => '1.0', 'toolkit' => ['Trident','4.0','4.000'] [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; Maxthon; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 1.1.4322; .NET CLR 3.5.21022; .NET CLR 3.0.30618; .NET CLR 3.5.30729; OfficeLiveConnector.1.3; OfficeLivePatch.0.0) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows Vista / Server 2008', 'extras' => ['SLCC1','Media Center PC 5.0','OfficeLiveConnector.1.3','OfficeLivePatch.0.0'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','1.1.4322','3.5.21022','3.0.30618','3.5.30729'], 'original_version' => '1.0', 'toolkit' => ['Trident','4.0','4.000'] [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; Maxthon; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; .NET CLR 1.1.4322; InfoPath.2) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows Vista / Server 2008', 'extras' => ['SV1','SLCC1','Media Center PC 5.0','InfoPath.2'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','3.0.04506','1.1.4322'], 'original_version' => '1.0' [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Maxthon 2) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','3.0.04506.30','3.0.4506.2152','3.5.30729'], 'original_version' => '2', 'toolkit' => ['Trident','4.0','4.000'] [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'extras' => ['SV1'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322','2.0.50727'], 'original_version' => '1.0' [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; FunWebProducts; Maxthon; FDM) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'extras' => ['SV1','FunWebProducts','FDM'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'original_version' => '1.0' [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'extras' => ['SV1'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322','2.0.50727','3.0.4506.2152','3.5.30729'], 'original_version' => '1.0' [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Maxthon; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.1) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'extras' => ['SV1','InfoPath.1'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'original_version' => '1.0' [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727; InfoPath.1) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'extras' => ['SV1','Media Center PC 4.0','InfoPath.1'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705','1.1.4322','2.0.50727'], 'original_version' => '1.0' [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'extras' => ['iOpus-I-M','SV1'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705','1.1.4322'], 'original_version' => '1.0' [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows 2000', 'extras' => ['SV1'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322','2.0.50727'], 'original_version' => '1.0' [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; MRA 4.6 (build 01425); Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.50727) 'original_name' => 'Maxthon', 'parser' => 'maxthon', 'os' => 'Windows XP', 'extras' => ['SV1','MRA 4.6 build 01425'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322','2.0.50727'], 'original_version' => '1.0'Parse-HTTP-UserAgent-0.43/t/data/desktop/seamonkey/1000644 000765 000024 00000001005 15003317605 022330 0ustar00burakstaff000000 000000 # just the mozilla suite [AGENT] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b1pre) Gecko/20080915000512 SeaMonkey/2.0a1pre 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => ['X11'], 'version_raw' => '2.0a1pre', 'lang' => 'en-US', 'mozilla' => [ '1.9.11', '1.009011'], 'version' => '2.000', 'name' => 'SeaMonkey', 'toolkit' => ['Gecko','20080915000512','2147483647.000'] Parse-HTTP-UserAgent-0.43/t/data/desktop/msoffice/outlook000644 000765 000024 00000000234 15003317605 023467 0ustar00burakstaff000000 000000 [AGENT] #TODO: MacOutlook/14.3.8.130913 (Intel Mac OS X 10.8.5) [AGENT] #TODO: Microsoft Office/14.0 (Windows NT 6.1; Microsoft Outlook 14.0.4760; Pro) Parse-HTTP-UserAgent-0.43/t/data/desktop/tinybrowser/1000644 000765 000024 00000000470 15003317605 022731 0ustar00burakstaff000000 000000 [AGENT] TinyBrowser/2.0 (TinyBrowser Comment) Gecko/20201231 'parser' => 'mozilla_family:generic', 'extras' => ['TinyBrowser Comment'], 'version_raw' => '2.0', 'version' => '2.000', 'name' => 'TinyBrowser', 'toolkit' => ['Gecko','20201231','20201231.000']Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/10x000644 000765 000024 00000002607 15003317605 021724 0ustar00burakstaff000000 000000 [AGENT] Opera/10.00 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.0 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'Macintosh', 'extras' => ['Intel Mac OS X'], 'toolkit' => ['Presto','2.2.0','2.002000'], 'version_raw' => '10.00', 'lang' => 'en', 'version' => '10.000', 'name' => 'Opera', [AGENT] Opera/9.80 (Macintosh; Intel Mac OS X; U; en) Presto/2.2.15 Version/10.00 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'Macintosh', 'extras' => ['Intel Mac OS X'], 'toolkit' => ['Presto','2.2.15','2.002015'], 'version_raw' => '10.00', 'lang' => 'en', 'version' => '10.000', 'name' => 'Opera', [AGENT] Opera/9.80 (Windows NT 6.0; U; tr) Presto/2.6.30 Version/10.63 parser => 'opera_pre', strength => 'U', os => 'Windows Vista / Server 2008', toolkit => [ 'Presto', '2.6.30', '2.006030' ], version_raw => '10.63', lang => 'tr', version => '10.630', name => 'Opera', [AGENT] Opera/9.80 (X11; Linux i686; U; en) Presto/2.6.30 Version/10.63 parser => 'opera_pre', strength => 'U', os => 'X11', extras => ['Linux i686'], toolkit => [ 'Presto','2.6.30','2.006030'], version_raw => '10.63', lang => 'en', version => '10.630', name => 'Opera', Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/08x000644 000765 000024 00000000405 15003317605 021725 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ru) Opera 8.01 parser => 'opera_post', os => 'Windows XP', extras => ['Windows NT 5.1'], version_raw => '8.01', lang => 'ru', version => '8.010', name => 'Opera', Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/48x000644 000765 000024 00000000724 15003317605 021735 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 OPR/48.0.2685.52 extras => [ 'Macintosh', 'KHTML, like Gecko', 'AppleWebKit/537.36' ], name => 'Opera', os => 'Intel Mac OS X 10_12_6', parser => 'chrome', toolkit => [ 'Chrome', '61.0.3163.100', '61.0003163100' ], version => '48.0002685052', version_raw => '48.0.2685.52', Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/05x000644 000765 000024 00000000374 15003317605 021727 0ustar00burakstaff000000 000000 [AGENT] Opera/v5.12 (EPOC; U) [en] 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'EPOC', 'version_raw' => 'v5.12', 'lang' => 'en', 'version' => '5.012000', 'name' => 'Opera' Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/06x000644 000765 000024 00000003130 15003317605 021721 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows 98; U) Opera 6.0 [en] 'parser' => 'opera_post', 'strength' => 'U', 'os' => 'Windows 98', 'version_raw' => '6.0', 'lang' => 'en', 'version' => '6.000', 'name' => 'Opera' [AGENT] Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.05 [en] 'parser' => 'opera_post', 'os' => 'Windows XP', 'version_raw' => '6.05', 'lang' => 'en', 'version' => '6.050', 'name' => 'Opera' [AGENT] Mozilla/4.78 (Windows XP; U) Opera 6.05 [en] 'parser' => 'opera_post', 'strength' => 'U', 'os' => 'Windows XP', 'version_raw' => '6.05', 'lang' => 'en', 'version' => '6.050', 'name' => 'Opera' [AGENT] Mozilla/5.0 (Windows XP; U) Opera 6.05 [en] 'parser' => 'opera_post', 'strength' => 'U', 'os' => 'Windows XP', 'version_raw' => '6.05', 'lang' => 'en', 'version' => '6.050', 'name' => 'Opera' [AGENT] Opera/6.05 (Windows XP; U) [en] 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'Windows XP', 'version_raw' => '6.05', 'lang' => 'en', 'version' => '6.050', 'name' => 'Opera' [AGENT] Opera/6.03 (Linux 2.4.18-4GB i686; U) [en] 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'Linux 2.4.18-4GB i686', 'version_raw' => '6.03', 'lang' => 'en', 'version' => '6.030', 'name' => 'Opera' Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/16x000644 000765 000024 00000000717 15003317605 021732 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.57 Safari/537.36 OPR/16.0.1196.62 extras => [ 'Macintosh', 'KHTML, like Gecko', 'AppleWebKit/537.36' ], name => 'Opera', os => 'Intel Mac OS X 10_8_4', parser => 'chrome', toolkit => [ 'Chrome', '29.0.1547.57', '29.0001547057' ], version => '16.0001196062', version_raw => '16.0.1196.62',Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/07x000644 000765 000024 00000000454 15003317605 021730 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.21 [pl] 'parser' => 'opera_post', 'os' => 'Linux i686', 'extras' => ['X11'], 'version_raw' => '7.21', 'lang' => 'pl', 'version' => '7.210', 'name' => 'Opera' Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/03x000644 000765 000024 00000000463 15003317605 021724 0ustar00burakstaff000000 000000 [AGENT] # edge case Mozilla/4.0 (compatible; Opera/3.0; Windows 4.10) 3.50 'parser' => 'generic_compatible', 'os' => 'Windows 98', 'extras' => [ '3.50' ], 'version_raw' => '3.0', 'version' => '3.000', 'name' => 'Opera', 'generic' => 1, Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/09x000644 000765 000024 00000001747 15003317605 021740 0ustar00burakstaff000000 000000 [AGENT] Opera/9.62 (Windows NT 5.1; U; tr) Presto/2.1.1 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'Windows XP', 'version_raw' => '9.62', 'lang' => 'tr', 'version' => '9.620', 'name' => 'Opera', 'toolkit' => ['Presto','2.1.1','2.001001'], [AGENT] Mozilla/5.0 (Windows NT 6.0; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.51 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'Windows Vista / Server 2008', 'version_raw' => '9.51', 'lang' => 'en', 'version' => '9.510', 'name' => 'Opera' [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 9.51 'parser' => 'opera_post', 'os' => 'en', 'extras' => ['Windows NT 5.1'], 'version_raw' => '9.51', 'lang' => 'en', 'version' => '9.510', 'name' => 'Opera', 'os' => 'Windows XP', Parse-HTTP-UserAgent-0.43/t/data/desktop/opera/11x000644 000765 000024 00000001271 15003317605 021721 0ustar00burakstaff000000 000000 [AGENT] Opera/9.80 (Macintosh; Intel Mac OS X 10.6.8; U; en) Presto/2.9.168 Version/11.52 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'Macintosh', 'extras' => ['Intel Mac OS X 10.6.8'], 'toolkit' => ['Presto','2.9.168','2.009168'], 'version_raw' => '11.52', 'lang' => 'en', 'version' => '11.520', 'name' => 'Opera', [AGENT] Opera/9.80 (Windows NT 6.0; U; tr) Presto/2.9.168 Version/11.52 'parser' => 'opera_pre', 'strength' => 'U', 'os' => 'Windows Vista / Server 2008', 'toolkit' => ['Presto','2.9.168','2.009168'], 'version_raw' => '11.52', 'lang' => 'tr', 'version' => '11.520', 'name' => 'Opera', Parse-HTTP-UserAgent-0.43/t/data/desktop/chrome/1000644 000765 000024 00000006035 15003317605 021622 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13 'parser' => 'chrome', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows','KHTML, like Gecko'], 'version_raw' => '0.2.149.27', 'lang' => 'en-US', 'version' => '0.002149027', 'name' => 'Chrome', 'toolkit' => ['AppleWebKit','525.13','525.130'] [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.54 Safari/535.2 parser => 'chrome', os => 'Intel Mac OS X 10_7_1', extras => [ 'Macintosh', 'KHTML, like Gecko' ], toolkit => [ 'AppleWebKit', '535.2', '535.200' ], version_raw => '15.0.874.54', version => '15.000874054', name => 'Chrome', [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.11 Safari/532.5 parser => 'chrome', strength => 'U', os => 'Windows XP', extras => ['Windows','KHTML, like Gecko'], toolkit => ['AppleWebKit','532.5','532.500'], version_raw => '4.0.249.11', lang => 'en-US', version => '4.000249011', name => 'Chrome', [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1 'parser' => 'chrome', 'os' => 'Intel Mac OS X 10_6_8', 'extras' => ['Macintosh','KHTML, like Gecko'], 'toolkit' => ['AppleWebKit','535.1','535.100'], 'version_raw' => '14.0.835.202', 'version' => '14.000835202', 'name' => 'Chrome', [AGENT] Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.106 Safari/535.2 extras => [ 'KHTML, like Gecko' ], name => 'Chrome', os => 'Windows XP', parser => 'chrome', toolkit => [ 'AppleWebKit', '535.2', '535.200' ], version => '15.000874106', version_raw => '15.0.874.106', [AGENT] Mozilla/5.0 (X11; Linux i686 (x86_64)) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.785.0 Safari/535.1 extras => [ 'X11', 'KHTML, like Gecko' ], name => 'Chrome', os => 'Linux i686 x86_64 ', parser => 'chrome', toolkit => [ 'AppleWebKit', '535.1', '535.100' ], version => '14.000785000', version_raw => '14.0.785.0', [AGENT] Mozilla/5.0 (X11; Linux x86_64; 6.0) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/12.0.1410.63 Safari/537.31 extras => [ 'X11', 'KHTML, like Gecko', '6.0' ], name => 'Chrome', os => 'Linux x86_64', parser => 'chrome', toolkit => [ 'AppleWebKit', '537.31', '537.310' ], version => '12.0001410063', version_raw => '12.0.1410.63', [AGENT] #TODO: Mozilla/5.0 (X11; FreeBSD; U; Viera; bg-BG) AppleWebKit/535.1 (KHTML, like Gecko) Viera/1.5.2 Chrome/14.0.835.202 Safari/535.1 [AGENT] #TODO: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/30.0.1599.114 Chrome/30.0.1599.114 Safari/537.36 Parse-HTTP-UserAgent-0.43/t/data/desktop/chrome/62x000644 000765 000024 00000000645 15003317605 022102 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 extras => [ 'Macintosh', 'KHTML, like Gecko' ], name => 'Chrome', os => 'Intel Mac OS X 10_12_6', parser => 'chrome', toolkit => [ 'AppleWebKit', '537.36', '537.360' ], version => '62.0003202094', version_raw => '62.0.3202.94', Parse-HTTP-UserAgent-0.43/t/data/desktop/konqueror/3x000644 000765 000024 00000006704 15003317605 022567 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (compatible; Konqueror/3.1-rc6; i686 Linux; 20020607) generic => 1, lang => '20020607', name => 'Konqueror', os => 'i686 Linux', parser => 'generic_compatible', version => '3.001000006', version_raw => '3.1-rc6', [AGENT] Mozilla/5.0 (compatible; Konqueror/3.0.0; Linux) generic => 1, name => 'Konqueror', os => 'Linux', parser => 'generic_compatible', version => '3.000000', version_raw => '3.0.0', [AGENT] Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux) generic => 1, name => 'Konqueror', os => 'Linux', parser => 'generic_compatible', version => '3.000000010', version_raw => '3.0.0-10', [AGENT] Mozilla/5.0 (compatible; Konqueror/3.0; i686 Linux; 20020423) generic => 1, lang => '20020423', name => 'Konqueror', os => 'i686 Linux', parser => 'generic_compatible', version => '3.000', version_raw => '3.0', [AGENT] Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.2 (like Gecko) (Debian package 4:3.4.2-4) extras => [ 'KHTML/3.4.2', 'like Gecko', '', 'Debian package 4:3.4.2-4' ], generic => 1, name => 'Konqueror', os => 'Linux', parser => 'generic_compatible', version => '3.400', version_raw => '3.4', [AGENT] Mozilla/5.0 (compatible; Konqueror/3.4; Linux 2.6.12; X11) KHTML/3.4.1 (like Gecko) (Debian package 4:3.4.1-1) extras => [ 'KHTML/3.4.1', 'like Gecko', '', 'Debian package 4:3.4.1-1' ], generic => 1, lang => 'X11', name => 'Konqueror', os => 'Linux 2.6.12', parser => 'generic_compatible', version => '3.400', version_raw => '3.4', [AGENT] Mozilla/5.0 (compatible; Konqueror/3.4) KHTML/3.4.2 (like Gecko) extras => [ 'KHTML/3.4.2', 'like Gecko' ], generic => 1, name => 'Konqueror', parser => 'generic_compatible', version => '3.400', version_raw => '3.4', [AGENT] Mozilla/5.0 (compatible; Konqueror/3.5; Linux; i686; U; it-IT) KHTML/3.5.5 (like Gecko) (Debian) extras => [ 'i686', 'KHTML/3.5.5', 'like Gecko', '', 'Debian' ], generic => 1, lang => 'it-IT', name => 'Konqueror', os => 'Linux', parser => 'generic_compatible', strength => 'U', version => '3.500', version_raw => '3.5', [AGENT] Mozilla/5.0 (compatible; Konqueror/3.5; Linux; en_US) KHTML/3.5.6 (like Gecko) (Kubuntu) extras => [ 'KHTML/3.5.6', 'like Gecko', '', 'Kubuntu' ], generic => 1, lang => 'en_US', name => 'Konqueror', os => 'Linux', parser => 'generic_compatible', version => '3.500', version_raw => '3.5', [AGENT] Mozilla/5.0 (compatible; Konqueror/3; Linux 2.4.18-4GB; X11; i686; en_US) 'parser' => 'generic_compatible', 'os' => 'Linux 2.4.18-4GB', 'extras' => ['X11','i686'], 'version_raw' => '3', 'lang' => 'en_US', 'version' => '3.000', 'name' => 'Konqueror', 'generic' => 1 [AGENT] Mozilla/5.0 (compatible; Konqueror/3; Linux) 'parser' => 'generic_compatible', 'os' => 'Linux', 'version_raw' => '3', 'version' => '3.000', 'name' => 'Konqueror', 'generic' => 1 [AGENT] Mozilla/5.0 (compatible; Konqueror/3; Darwin) 'parser' => 'generic_compatible', 'os' => 'Darwin', 'version_raw' => '3', 'version' => '3.000', 'name' => 'Konqueror', 'generic' => 1 Parse-HTTP-UserAgent-0.43/t/data/desktop/konqueror/4x000644 000765 000024 00000001020 15003317605 022552 0ustar00burakstaff000000 000000 [AGENT] #TODO: Mozilla/5.0 (compatible; Konqueror/4.1; Linux 2.6.27.7-134.fc10.x86_64; X11; x86_64) KHTML/4.1.3 (like Gecko) Fedora/4.1.3-4.fc10 [AGENT] Mozilla/5.0 (compatible; Konqueror/4.4; Linux 2.6.32-22-generic; X11; en_US) KHTML/4.4.3 (like Gecko) Kubuntu extras => [ 'X11', 'KHTML/4.4.3', 'like Gecko', 'Kubuntu' ], generic => 1, lang => 'en_US', name => 'Konqueror', os => 'Linux 2.6.32-22-generic', parser => 'generic_compatible', version => '4.400', version_raw => '4.4', Parse-HTTP-UserAgent-0.43/t/data/desktop/konqueror/2x000644 000765 000024 00000000637 15003317605 022565 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (compatible; Konqueror/2.2.2; Linux 2.4.18; X11; i686; en) LindowsOS (Lindows.com, Inc.) 'parser' => 'generic_compatible', 'os' => 'Linux 2.4.18', 'extras' => ['X11','i686','LindowsOS','Lindows.com, Inc.'], 'version_raw' => '2.2.2', 'lang' => 'en', 'version' => '2.002002', 'name' => 'Konqueror', 'generic' => 1 Parse-HTTP-UserAgent-0.43/t/data/desktop/konqueror/1x000644 000765 000024 00000000304 15003317605 022553 0ustar00burakstaff000000 000000 [AGENT] Konqueror/1.1.2 'parser' => 'generic_name_version', 'version_raw' => '1.1.2', 'version' => '1.001002', 'name' => 'Konqueror', 'generic' => 1 Parse-HTTP-UserAgent-0.43/t/data/desktop/safari/1000644 000765 000024 00000005207 15003317605 021612 0ustar00burakstaff000000 000000 [AGENT] # this is a mobile agent Mozilla/5.0 (SymbianOS/9.1; U; en-us) AppleWebKit/413 (KHTML, like Gecko) Safari/413 UP.Link/6.3.1.15.0 'parser' => 'safari', 'strength' => 'U', 'os' => 'SymbianOS/9.1', 'extras' => ['KHTML, like Gecko','UP.Link/6.3.1.15.0'], 'version_raw' => '413', 'lang' => 'en-us', 'version' => '413.000', 'name' => 'Safari', 'toolkit' => ['AppleWebKit','413','413.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1 'parser' => 'safari', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows','KHTML, like Gecko','Safari/525.27.1'], 'version_raw' => '3.2.1', 'lang' => 'en-US', 'version' => '3.002001', 'name' => 'Safari', 'toolkit' => ['AppleWebKit','525.27.1','525.027001'] [AGENT] Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1 'parser' => 'safari', 'strength' => 'U', 'os' => 'PPC Mac OS X', 'extras' => ['Macintosh','KHTML, like Gecko'], 'version_raw' => '125.1', 'lang' => 'en', 'version' => '125.100', 'name' => 'Safari', 'toolkit' => ['AppleWebKit','124','124.000'] [AGENT] Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/106.2 (KHTML, like Gecko) Safari/100.1 'parser' => 'safari', 'strength' => 'U', 'os' => 'PPC Mac OS X', 'extras' => ['Macintosh','KHTML, like Gecko'], 'version_raw' => '100.1', 'lang' => 'en', 'version' => '100.100', 'name' => 'Safari', 'toolkit' => ['AppleWebKit','106.2','106.200'] [AGENT] Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/74 (KHTML, like Gecko) Safari/74 'parser' => 'safari', 'strength' => 'U', 'os' => 'PPC Mac OS X', 'extras' => ['Macintosh','KHTML, like Gecko'], 'version_raw' => '74', 'lang' => 'en-us', 'version' => '74.000', 'name' => 'Safari', 'toolkit' => ['AppleWebKit','74','74.000'] [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.51.22 (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22 'parser' => 'safari', 'os' => 'Intel Mac OS X 10_6_8', 'extras' => ['Macintosh','KHTML, like Gecko', 'Safari/534.51.22'], 'toolkit' => ['AppleWebKit','534.51.22','534.051022'], 'version_raw' => '5.1.1', 'version' => '5.001001', 'name' => 'Safari', Parse-HTTP-UserAgent-0.43/t/data/desktop/safari/11x000644 000765 000024 00000000656 15003317605 022066 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/604.3.5 (KHTML, like Gecko) Version/11.0.1 Safari/604.3.5 extras => [ 'Macintosh', 'KHTML, like Gecko', 'Safari/604.3.5' ], name => 'Safari', os => 'Intel Mac OS X 10_12_6', parser => 'safari', toolkit => [ 'AppleWebKit', '604.3.5', '604.003005' ], version => '11.000001', version_raw => '11.0.1', Parse-HTTP-UserAgent-0.43/t/data/desktop/camino/1000644 000765 000024 00000001760 15003317605 021613 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'PPC Mac OS X Mach-O', 'extras' => ['Macintosh'], 'version_raw' => '0.8.1', 'lang' => 'en-US', 'mozilla' => [ '1.7.2','1.007002'], 'version' => '0.008001', 'name' => 'Camino', 'toolkit' => ['Gecko','20040825','20040825.000'] [AGENT] Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.14) Gecko/20080409 Camino/1.6 (like Firefox/2.0.0.14) 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Intel Mac OS X', 'extras' => ['Macintosh','like Firefox/2.0.0.14'], 'toolkit' => ['Gecko','20080409','20080409.000'], 'version_raw' => '1.6', 'lang' => 'en', 'version' => '1.600', 'mozilla' => ['1.8.1.14','1.008001014'], 'name' => 'Camino', Parse-HTTP-UserAgent-0.43/t/data/desktop/sleipnir/1000644 000765 000024 00000000702 15003317605 022165 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath.1) Sleipnir/2.8.0 'parser' => 'generic_compatible', 'os' => 'Windows XP', 'extras' => ['SV1'], 'version_raw' => '2.8.0', 'lang' => 'InfoPath.1', 'version' => '2.008000', 'name' => 'Sleipnir', 'dotnet' => ['1.1.4322','2.0.50727'], 'generic' => 1 Parse-HTTP-UserAgent-0.43/t/data/desktop/netscape/3x000644 000765 000024 00000000760 15003317605 022340 0ustar00burakstaff000000 000000 [AGENT] Mozilla/3.03Gold (Win95; I) 'parser' => 'netscape', 'strength' => 'I', 'os' => 'Windows 95', 'version_raw' => '3.03Gold', 'version' => '3.030', 'name' => 'Netscape' [AGENT] Mozilla/3.0 (Macintosh; I; PPC) 'parser' => 'netscape', 'strength' => 'I', 'os' => 'Macintosh', 'extras' => ['PPC'], 'version_raw' => '3.0', 'version' => '3.000', 'name' => 'Netscape' Parse-HTTP-UserAgent-0.43/t/data/desktop/netscape/7x000644 000765 000024 00000002606 15003317605 022345 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => ['X11'], 'version_raw' => '7.0', 'lang' => 'en-US', 'mozilla' => [ '1.0.1','1.000001'], 'version' => '7.000', 'name' => 'Netscape', 'toolkit' => ['Gecko','20020823','20020823.000'] [AGENT] Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'PPC', 'extras' => ['Macintosh'], 'version_raw' => '7.0', 'lang' => 'en-US', 'mozilla' => [ '1.0.1','1.000001'], 'version' => '7.000', 'name' => 'Netscape', 'toolkit' => ['Gecko','20020823','20020823.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-SillyDog) 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows','CK-SillyDog'], 'version_raw' => '7.0', 'lang' => 'en-US', 'mozilla' => [ '1.0.1','1.000001'], 'version' => '7.000', 'name' => 'Netscape', 'toolkit' => ['Gecko','20020823','20020823.000'] Parse-HTTP-UserAgent-0.43/t/data/desktop/netscape/4x000644 000765 000024 00000004005 15003317605 022335 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.06 [en] (Win98; I ;Nav) 'parser' => 'netscape', 'strength' => 'I', 'os' => 'Windows 98', 'extras' => ['Nav'], 'version_raw' => '4.06', 'lang' => 'en', 'version' => '4.060', 'name' => 'Netscape' [AGENT] Mozilla/4.5 [en] (X11; I; FreeBSD 2.2.7-RELEASE i386) 'parser' => 'netscape', 'strength' => 'I', 'os' => 'FreeBSD 2.2.7-RELEASE i386', 'extras' => ['X11'], 'version_raw' => '4.5', 'lang' => 'en', 'version' => '4.500', 'name' => 'Netscape' [AGENT] Mozilla/4.79 [en] (Win95; U) 'parser' => 'netscape', 'strength' => 'U', 'os' => 'Windows 95', 'version_raw' => '4.79', 'lang' => 'en', 'version' => '4.790', 'name' => 'Netscape' [AGENT] Mozilla/4.08 [en] (WinNT; I ;Nav) 'parser' => 'netscape', 'os' => 'Windows NT', 'extras' => ['Nav'], 'version_raw' => '4.08', 'lang' => 'en', 'strength' => 'I', 'version' => '4.080', 'name' => 'Netscape' [AGENT] Mozilla/4.8 (Macintosh; U; PPC) 'parser' => 'netscape', 'strength' => 'U', 'os' => 'Macintosh', 'extras' => ['PPC'], 'version_raw' => '4.8', 'version' => '4.800', 'name' => 'Netscape' [AGENT] Mozilla/4.79 [en] (X11; U; Linux 2.4.18-4GB i686) 'parser' => 'netscape', 'strength' => 'U', 'os' => 'Linux 2.4.18-4GB i686', 'extras' => ['X11'], 'version_raw' => '4.79', 'lang' => 'en', 'version' => '4.790', 'name' => 'Netscape' [AGENT] Mozilla/4.79 [en]C-CCK-MCD {SillyDog} (Windows NT 5.0; U) 'parser' => 'netscape', 'strength' => 'U', 'os' => 'Windows 2000', 'version_raw' => '4.79', 'lang' => 'en', 'version' => '4.790', 'name' => 'Netscape' Parse-HTTP-UserAgent-0.43/t/data/desktop/netscape/5x000644 000765 000024 00000000711 15003317605 022336 0ustar00burakstaff000000 000000 [AGENT] Mozilla/9.876 (X11; U; Linux 2.2.12-20 i686, en) Gecko/25250101 Netscape/5.432b1 (C-MindSpring) 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'lang' => 'en', 'os' => 'Linux 2.2.12-20 i686', 'extras' => ['X11','C-MindSpring'], 'version_raw' => '5.432b1', 'version' => '5.432', 'name' => 'Netscape', 'toolkit' => ['Gecko','25250101','25250101.000'] Parse-HTTP-UserAgent-0.43/t/data/desktop/netscape/6x000644 000765 000024 00000003771 15003317605 022350 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows 98', 'extras' => ['Windows'], 'version_raw' => '6.1', 'lang' => 'en-US', 'mozilla' => [ '0.9.2','0.009002'], 'version' => '6.100', 'name' => 'Netscape', 'toolkit' => ['Gecko','20010726','20010726.000'], 'original_name' => 'Netscape6', [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows'], 'version_raw' => '6.2.3', 'lang' => 'en-US', 'mozilla' => [ '0.9.4.1','0.009004001'], 'version' => '6.002003', 'name' => 'Netscape', 'toolkit' => ['Gecko','20020508','20020508.000'], 'original_name' => 'Netscape6', [AGENT] Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'PPC Mac OS X', 'extras' => ['Macintosh'], 'version_raw' => '7.02', 'lang' => 'en-US', 'mozilla' => [ '1.0.2', '1.000002'], 'version' => '7.020', 'name' => 'Netscape', 'toolkit' => ['Gecko','20030208','20030208.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 (CK-SillyDog) 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows','CK-SillyDog'], 'version_raw' => '6.2.1', 'lang' => 'en-US', 'mozilla' => [ '0.9.4','0.009004'], 'version' => '6.002001', 'name' => 'Netscape', 'toolkit' => ['Gecko','20011128','20011128.000'], 'original_name' => 'Netscape6', Parse-HTTP-UserAgent-0.43/t/data/desktop/netscape/2x000644 000765 000024 00000000711 15003317605 022333 0ustar00burakstaff000000 000000 [AGENT] Mozilla/2.0 (Win95; I) 'parser' => 'netscape', 'strength' => 'I', 'os' => 'Windows 95', 'version_raw' => '2.0', 'version' => '2.000', 'name' => 'Netscape' [AGENT] Mozilla/2.02Gold (WinNT; I) 'parser' => 'netscape', 'strength' => 'I', 'os' => 'Windows NT', 'version_raw' => '2.02Gold', 'version' => '2.020', 'name' => 'Netscape' Parse-HTTP-UserAgent-0.43/t/data/desktop/netscape/1x000644 000765 000024 00000000715 15003317605 022336 0ustar00burakstaff000000 000000 [AGENT] Mozilla/1.1 (Windows 3.0; I) 'parser' => 'netscape', 'strength' => 'I', 'os' => 'Windows 3.0', 'version_raw' => '1.1', 'version' => '1.100', 'name' => 'Netscape' [AGENT] Mozilla/1.1 (Windows 3.1; I) 'parser' => 'netscape', 'strength' => 'I', 'os' => 'Windows 3.1', 'version_raw' => '1.1', 'version' => '1.100', 'name' => 'Netscape' Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/10x000644 000765 000024 00000004110 15003317605 021542 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0) name => 'MSIE', os => 'Windows 7', parser => 'msie', toolkit => [ 'Trident', '6.0', '6.000' ], version => '10.000', version_raw => '10.0', [AGENT] # compat mode. only identifier is the trident version # http://blogs.msdn.com/b/ie/archive/2011/04/15/the-ie10-user-agent-string.aspx Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0) name => 'MSIE', original_name => 'MSIE', original_version => 10, os => 'Windows 7', parser => 'msie', toolkit => [ 'Trident', '6.0', '6.000' ], version => '7.000', version_raw => '7.0', [AGENT] Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0) name => 'MSIE', os => 'Windows 8', parser => 'msie', toolkit => [ 'Trident', '6.0', '6.000' ], version => '10.000', version_raw => '10.0', [AGENT] # http://msdn.microsoft.com/en-us/library/ie/hh920767(v=vs.85).aspx Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0; Touch) name => 'MSIE', mobile => 1, os => 'Windows 8', parser => 'msie', toolkit => [ 'Trident', '6.0', '6.000' ], touch => 1, version => '10.000', version_raw => '10.0', [AGENT] Mozilla/5.0 (compatible;FW 2.0.4857.p; MSIE 10.0; Windows NT 6.1; Trident/6.0) name => 'MSIE', os => 'Windows 7', parser => 'msie', toolkit => [ 'Trident', '6.0', '6.000' ], version => '10.000', version_raw => '10.0', [AGENT] Mozilla/5.0 (compatible; MSIE 9.0; qdesk 2.5.1270.201; Windows NT 6.1; WOW64; Trident/6.0; QQBrowser/7.4.16830.400) extras => [ 'qdesk 2.5.1270.201', 'WOW64', 'QQBrowser/7.4.16830.400' ], name => 'MSIE', original_name => 'MSIE', original_version => 10, os => 'Windows 7', parser => 'msie', toolkit => [ 'Trident', '6.0', '6.000' ], version => '9.000', version_raw => '9.0', Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/3x000644 000765 000024 00000002161 15003317605 021470 0ustar00burakstaff000000 000000 [AGENT] Mozilla/2.0 (compatible; MSIE 3.01; Windows 95) 'parser' => 'msie', 'os' => 'Windows 95', 'version_raw' => '3.01', 'version' => '3.010', 'name' => 'MSIE', [AGENT] Mozilla/2.0 (compatible; MSIE 3.01; Windows NT) 'parser' => 'msie', 'os' => 'Windows NT', 'version_raw' => '3.01', 'version' => '3.010', 'name' => 'MSIE', [AGENT] Mozilla/2.0 (compatible; MSIE 3.0; AOL 3.0; Windows 95) 'parser' => 'msie', 'os' => 'Windows 95', 'extras' => [ 'AOL 3.0' ], 'version_raw' => '3.0', 'version' => '3.000', 'name' => 'MSIE', [AGENT] Mozilla/2.0 (compatible; MSIE 3.0; Windows 3.1) 'parser' => 'msie', 'os' => 'Windows 3.1', 'version_raw' => '3.0', 'version' => '3.000', 'name' => 'MSIE', [AGENT] Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; 240x320) 'parser' => 'msie', 'os' => 'Windows CE', 'extras' => ['240x320'], 'version_raw' => '3.02', 'version' => '3.020', 'name' => 'MSIE', Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/broken/000755 000765 000024 00000000000 15003317605 022473 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/7x000644 000765 000024 00000010042 15003317605 021471 0ustar00burakstaff000000 000000 [AGENT] # Weirdo Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.0.3705; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 1.1.4322; .NET CLR 3.0.04506.590; .NET CLR 3.5.20706; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; Zune 2.5; WWTClient2; MS-RTC LM 8; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['MSIE 6.0','SV1','InfoPath.1','Zune 2.5','WWTClient2','MS-RTC LM 8'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705','2.0.50727','3.0.04506.30','1.1.4322','3.0.04506.590','3.5.20706','3.0.04506.648','3.5.21022','3.0.4506.2152','3.5.30729'], [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => [ 'InfoPath.2' ], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322','2.0.50727','3.0.04506.30','3.0.04506.648','3.5.21022'], [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Supplied by Tesco.net; .NET CLR 1.1.4322; .NET CLR 2.0.50727) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => [ 'Supplied by Tesco.net' ], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => [ '1.1.4322', '2.0.50727' ], [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Tesco; .NET CLR 1.1.4322) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['Tesco'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322'], [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Sky Broadband; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506; Tesco) 'parser' => 'msie', 'os' => 'Windows Vista / Server 2008', 'extras' => ['Sky Broadband','SLCC1','Media Center PC 5.0','Tesco'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','3.0.04506'], [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Tesco; .NET CLR 1.1.4322; .NET CLR 2.0.50727) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['Tesco'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322','2.0.50727'], [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Tesco; YPC 3.2.0; .NET CLR 1.1.4322; yplus 5.3.04b) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['Tesco','YPC 3.2.0','yplus 5.3.04b'], 'version_raw' => '7.0', 'version' => '7.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322'], [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1) name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '7.000', version_raw => '7.0', [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; BT Openworld Broadband; .NET CLR 1.1.4322) dotnet => [ '1.1.4322' ], extras => [ 'BT Openworld Broadband' ], name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '7.000', version_raw => '7.0', [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; yie5.5_SBCDSL; SU 3.005; .NET CLR 1.0.3705) dotnet => [ '1.0.3705' ], extras => [ 'yie5.5_SBCDSL', 'SU 3.005' ], name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '7.000', version_raw => '7.0', [AGENT] #TODO: Mozilla/4.0 (compatible; MSIE 7.0; MSIE 8.0; PAG-IE8; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E) Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/4x000644 000765 000024 00000001203 15003317605 021465 0ustar00burakstaff000000 000000 [AGENT] Mozilla/2.0 (compatible; MSIE 4.0; Windows 95) 'parser' => 'msie', 'os' => 'Windows 95', 'version_raw' => '4.0', 'version' => '4.000', 'name' => 'MSIE', [AGENT] Mozilla/3.0 (compatible; MSIE 4.0; Windows 95) 'parser' => 'msie', 'os' => 'Windows 95', 'version_raw' => '4.0', 'version' => '4.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 4.01; Windows 95) 'parser' => 'msie', 'os' => 'Windows 95', 'version_raw' => '4.01', 'version' => '4.010', 'name' => 'MSIE', Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/5x000644 000765 000024 00000005312 15003317605 021473 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; AT&T WNS5.0; AT&T CSM7.0) 'parser' => 'msie', 'os' => 'Windows 98', 'extras' => [ 'AT&T WNS5.0', 'AT&T CSM7.0' ], 'version_raw' => '5.5', 'version' => '5.500', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.0; Windows NT) 'parser' => 'msie', 'os' => 'Windows NT', 'version_raw' => '5.0', 'version' => '5.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; .NET CLR 1.0.3705) 'parser' => 'msie', 'os' => 'Windows 2000', 'extras' => [ 'T312461' ], 'version_raw' => '5.5', 'version' => '5.500', 'name' => 'MSIE', 'dotnet' => [ '1.0.3705' ], [AGENT] Mozilla/4.0 (compatible; MSIE 5.0b2; Windows NT) 'parser' => 'msie', 'os' => 'Windows NT', 'version_raw' => '5.0b2', 'version' => '5.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT) 'parser' => 'msie', 'os' => 'Windows NT', 'version_raw' => '5.5', 'version' => '5.500', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) 'parser' => 'msie', 'os' => 'Windows 2000', 'version_raw' => '5.5', 'version' => '5.500', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.0; Win32) 'parser' => 'msie', 'os' => 'Win32', 'version_raw' => '5.0', 'version' => '5.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.0b1; Windows NT 5.0) 'parser' => 'msie', 'os' => 'Windows 2000', 'version_raw' => '5.0b1', 'version' => '5.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) 'parser' => 'msie', 'os' => 'Mac_PowerPC', 'version_raw' => '5.0', 'version' => '5.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.21; Mac_PowerPC) 'parser' => 'msie', 'os' => 'Mac_PowerPC', 'version_raw' => '5.21', 'version' => '5.210', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC) 'parser' => 'msie', 'os' => 'Mac_PowerPC', 'version_raw' => '5.22', 'version' => '5.220', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) 'parser' => 'msie', 'os' => 'Windows NT 4.0', 'version_raw' => '5.5', 'version' => '5.500', 'name' => 'MSIE', Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/6x000644 000765 000024 00000012662 15003317605 021502 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['Q312461','Alexa Toolbar'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705','1.1.4322'], [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; YComp 5.0.0.0; .NET CLR 1.0.3705) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['AOL 9.0','YComp 5.0.0.0'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705'], [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.0.3705) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['AOL 9.0'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705'], [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;) 'parser' => 'msie', 'os' => 'Windows 2000', 'extras' => [ 'Google Wireless Transcoder' ], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Tesco; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => [ 'SV1', 'Tesco', 'Media Center PC 4.0' ], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => [ '1.0.3705', '1.1.4322', '2.0.50727' ], [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Supplied by Tesco.net; YPC 3.2.0; SV1; yplus 5.3.04b) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['Supplied by Tesco.net','YPC 3.2.0','SV1','yplus 5.3.04b'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Supplied by Tesco.net) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['Supplied by Tesco.net'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; .NET CLR 1.0.3705) 'parser' => 'msie', 'os' => 'Windows NT 4.0', 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705'], [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322) 'parser' => 'msie', 'os' => 'Windows 2000', 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705','1.1.4322'], [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) 'parser' => 'msie', 'os' => 'Windows XP', 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) 'parser' => 'msie', 'os' => 'Windows XP', 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.1.4322'], [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; America Online Browser 1.1; Windows NT 5.1; SV1; YPC 3.2.0) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['America Online Browser 1.1','SV1','YPC 3.2.0'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) 'parser' => 'msie', 'os' => 'Windows 2000', 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer 1.5.0; .NET CLR 1.0.3705) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['Deepnet Explorer 1.5.0'], 'version_raw' => '6.0', 'version' => '6.000', 'name' => 'MSIE', 'dotnet' => ['1.0.3705'], [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.2; .NET CLR 1.1.4322; yplus 4.4.02b) dotnet => [ '1.1.4322' ], extras => [ 'SV1', 'YPC 3.0.2', 'yplus 4.4.02b' ], name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '6.000', version_raw => '6.0', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; acc=jocker) extras => [ 'SV1', 'acc=jocker' ], name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '6.000', version_raw => '6.0', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; InfoPath.1) extras => [ 'sbcydsl 3.12', 'InfoPath.1' ], name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '6.000', version_raw => '6.0', [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0B6660AB-643B-4F5D-8ECF-2DA8B9759F4C}; .NET CLR 1.1.4322) dotnet => [ '1.1.4322' ], extras => [ '{0B6660AB-643B-4F5D-8ECF-2DA8B9759F4C}' ], name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '6.000', version_raw => '6.0', [AGENT] # WTF? #TODO: Mozilla/4.0 (compatible; MSIE 6.0; GomezAgent 2.0; Windows NT) Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/8x000644 000765 000024 00000003476 15003317605 021507 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.30729; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 3.0.30729; OfficeLiveConnector.1.4; OfficeLivePatch.1.3) 'parser' => 'msie', 'os' => 'Windows Vista / Server 2008', 'extras' => ['SLCC1','Media Center PC 5.0','InfoPath.2','OfficeLiveConnector.1.4','OfficeLivePatch.1.3'], 'version_raw' => '8.0', 'version' => '8.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','3.5.30729','1.1.4322','3.0.30729'], 'toolkit' => ['Trident','4.0','4.000'] [AGENT] Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0) 'parser' => 'msie', 'os' => 'Windows Vista / Server 2008', 'version_raw' => '8.0', 'version' => '8.000', 'name' => 'MSIE', [AGENT] Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30729) 'parser' => 'msie', 'os' => 'Windows Vista / Server 2008', 'extras' => ['SLCC1','Media Center PC 5.0','InfoPath.2'], 'toolkit' => ['Trident','4.0','4.000'], 'version_raw' => '8.0', 'version' => '8.000', 'name' => 'MSIE', 'dotnet' => ['2.0.50727','3.5.30729','3.0.30729'], [AGENT] Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727) dotnet => [ '2.0.50727' ], extras => [ 'SV1' ], name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '8.000', version_raw => '8.0', [AGENT] #TODO: Mozilla/4.0 (compatible; MSIE 8.0; TS7; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E; InfoPath.3; MS-RTC LM 8) Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/11x000644 000765 000024 00000003740 15003317605 021553 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko name => 'MSIE', os => 'Windows 8.1', parser => 'msie11', toolkit => [ 'Trident', '7.0', '7.000' ], version => '11.000', version_raw => '11.0', [AGENT] Mozilla/5.0 (Windows NT 6.1; Trident/7.0; rv:11.0) like Gecko name => 'MSIE', os => 'Windows 7', parser => 'msie11', toolkit => [ 'Trident', '7.0', '7.000' ], version => '11.000', version_raw => '11.0', [AGENT] Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.3; Trident/7.0) name => 'MSIE', original_name => 'MSIE', original_version => 11, os => 'Windows 8.1', parser => 'msie', toolkit => [ 'Trident', '7.0', '7.000' ], version => '7.000', version_raw => '7.0', [AGENT] Mozilla/5.0 (MSIE 9.0; qdesk 2.4.1263.203; Windows NT 6.1; WOW64; Trident/7.0; rv:11.0; QQBrowser/7.5.17872.400) like Gecko extras => [ 'MSIE 9.0', 'qdesk 2.4.1263.203', 'WOW64', 'QQBrowser/7.5.17872.400' ], name => 'MSIE', os => 'Windows 7', parser => 'msie11', toolkit => [ 'Trident', '7.0', '7.000' ], version => '11.000', version_raw => '11.0', [AGENT] #virus: http://systemexplorer.net/file-database/file/2345explorer-exe Mozilla/5.0 (MSIE 9.0; Windows NT 6.1; Trident/7.0; rv:11.0; like Gecko; 2345Explorer) extras => [ 'MSIE 9.0', 'like Gecko', '2345Explorer' ], name => 'MSIE', os => 'Windows 7', parser => 'msie11', toolkit => [ 'Trident', '7.0', '7.000' ], version => '11.000', version_raw => '11.0', [AGENT] Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko extras => [ 'WOW64' ], name => 'MSIE', os => 'Windows 7', parser => 'msie11', toolkit => [ 'Trident', '7.0', '7.000' ], version => '11.000', version_raw => '11.0', Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/extras/000755 000765 000024 00000000000 15003317605 022521 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/extras/10x000644 000765 000024 00000001003 15003317605 023046 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (compatible; MSIE 10.6; Windows NT 6.1; Trident/5.0; InfoPath.2; SLCC1; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) 3gpp-gba UNTRUSTED/1.0 dotnet => [ '3.0.4506.2152', '3.5.30729', '2.0.50727' ], extras => [ 'InfoPath.2', 'SLCC1', '3gpp-gba', 'UNTRUSTED/1.0' ], name => 'MSIE', os => 'Windows 7', parser => 'msie', toolkit => [ 'Trident', '5.0', '5.000' ], version => '10.600', version_raw => '10.6', Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/broken/9x000644 000765 000024 00000000117 15003317605 022755 0ustar00burakstaff000000 000000 [AGENT] #TODO: Mozilla/5.0 ( ; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0) Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/broken/6x000644 000765 000024 00000000472 15003317605 022756 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; GoogleToolbar 6.4.1208.1530; Windows XP 5.1; MSIE 6.0.2900.2180) extras => [ 'GoogleToolbar/6.4.1208.1530' ], name => 'MSIE', os => 'Windows XP', parser => 'msie', version => '6.00029002180', version_raw => '6.0.2900.2180', Parse-HTTP-UserAgent-0.43/t/data/desktop/msie/broken/8x000644 000765 000024 00000000144 15003317605 022754 0ustar00burakstaff000000 000000 [AGENT] #TODO: Mozilla/4.0 ( ; MSIE 8.0; Windows NT 6.0; Trident/4.0; GTB6.6; .NET CLR 3.5.30729) Parse-HTTP-UserAgent-0.43/t/data/desktop/lunascape/1000644 000765 000024 00000000556 15003317605 022322 0ustar00burakstaff000000 000000 [AGENT] Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; Lunascape 4.7.3) 'parser' => 'msie', 'os' => 'Windows XP', 'extras' => ['SV1'], 'version_raw' => '4.7.3', 'version' => '4.007003', 'name' => 'Lunascape', 'dotnet' => ['1.1.4322','2.0.50727'] Parse-HTTP-UserAgent-0.43/t/data/desktop/mozilla/1000644 000765 000024 00000010505 15003317605 022011 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020909 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'PPC Mac OS X', 'extras' => ['Macintosh'], 'version_raw' => '5.0', 'lang' => 'en-US', 'mozilla' => [ '1.0.1','1.000001'], 'version' => '5.000', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20020909','20020909.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2a) Gecko/20020910 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows'], 'version_raw' => '5.0', 'lang' => 'en-US', 'mozilla' => [ '1.2','1.200'], 'version' => '5.000', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20020910','20020910.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows'], 'version_raw' => '5.0', 'lang' => 'en-US', 'mozilla' => [ '1.1','1.100'], 'version' => '5.000', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20020826','20020826.000'] [AGENT] Mozilla/5.0 (X11; U; Linux i686; en-US; SkipStone 0.8.3) Gecko/20020913 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => ['X11','en-US','SkipStone 0.8.3'], 'version_raw' => '5.0', 'version' => '5.000', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20020913','20020913.000'] [AGENT] Mozilla/5.0 (X11; U; Linux 2.4.3-20mdk i586; en-US; rv:0.9.1) Gecko/20010611 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Linux 2.4.3-20mdk i586', 'extras' => ['X11'], 'version_raw' => '5.0', 'lang' => 'en-US', 'mozilla' => [ '0.9.1','0.009001'], 'version' => '5.000', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20010611','20010611.000'] [AGENT] Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2a) Gecko/20020910 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows NT 4.0', 'extras' => ['Windows'], 'version_raw' => '5.0', 'lang' => 'en-US', 'mozilla' => [ '1.2','1.200'], 'version' => '5.000', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20020910','20020910.000'] [AGENT] Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.1) Gecko/20020826 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows NT 4.0', 'extras' => ['Windows'], 'version_raw' => '5.0', 'lang' => 'en-US', 'mozilla' => [ '1.0.1','1.000001'], 'version' => '5.000', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20020826','20020826.000'] [AGENT] Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.1b) Gecko/20020721 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Windows 95', 'extras' => ['Windows'], 'version_raw' => '5.0', 'lang' => 'en-US', 'mozilla' => [ '1.1','1.100'], 'version' => '5.000', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20020721','20020721.000'], [AGENT] Mozilla/5.0 (Windows; U; WinNT; en; Stable) Gecko/20020911 Beonex/0.8.1-stable 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'lang' => 'en', 'extras' => ['WinNT','Stable'], 'version_raw' => '0.8.1-stable', 'version' => '0.008001', 'name' => 'Mozilla', 'toolkit' => ['Gecko','20020911','20020911.000'], 'original_name' => 'Beonex', 'os' => 'Windows', [AGENT] Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'extras' => ['windows','en-us'], 'version_raw' => '5.001', 'version' => '5.001', 'name' => 'Mozilla', 'os' => 'Windows NT 4.0', 'toolkit' => ['Gecko','25250101','25250101.000'] Parse-HTTP-UserAgent-0.43/t/data/desktop/epiphany/1000644 000765 000024 00000003471 15003317605 022163 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.14eol) Gecko/20070505 (Debian-1.8.0.15~pre080323b-0etch2) Epiphany/2.14 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => [ 'X11', 'Debian-1.8.0.15~pre080323b-0etch2', 'Epiphany/2.14' ], 'toolkit' => [ 'Gecko', '20070505', '20070505.000' ], 'version_raw' => '2.14', 'lang' => 'en-US', 'version' => '2.140', 'mozilla' => ['1.8.0.14','1.008000014'], 'name' => 'Epiphany', [AGENT] Mozilla/5.0 (X11; U; Linux i686; en; rv:1.9.0.11) Gecko/20080528 Epiphany/2.22 Firefox/3.0 'parser' => 'mozilla_family:generic', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => ['X11','Firefox/3.0'], 'toolkit' => ['Gecko','20080528','20080528.000'], 'version_raw' => '2.22', 'lang' => 'en', 'version' => '2.220', 'mozilla' => ['1.9.0.11','1.009000011'], 'name' => 'Epiphany', [AGENT] Mozilla/5.0 (X11; U; Linux x86_64; c) AppleWebKit/525.1+ (KHTML, like Gecko, Safari/525.1+) epiphany 'parser' => 'safari', 'strength' => 'U', 'os' => 'Linux x86_64', 'extras' => ['X11','KHTML, like Gecko, Safari/525.1+'], 'toolkit' => ['AppleWebKit','525.1+','525.100'], 'lang' => 'c', 'name' => 'Epiphany', [AGENT] Mozilla/5.0 (X11; U; Linux i686; en-us) AppleWebKit/528.5+ (KHTML, like Gecko, Safari/528.5+) epiphany-browser 'parser' => 'safari', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => ['X11','KHTML, like Gecko, Safari/528.5+'], 'toolkit' => ['AppleWebKit','528.5+','528.500'], 'lang' => 'en-us', 'name' => 'Epiphany', Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/0x000644 000765 000024 00000007675 15003317605 022211 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040619 Firefox/0.9 'parser' => 'firefox', 'strength' => 'U', 'os' => 'FreeBSD i386', 'extras' => ['X11'], 'version_raw' => '0.9', 'lang' => 'en-US', 'mozilla' => ['1.7','1.700'], 'version' => '0.900', 'name' => 'Firefox', 'toolkit' => ['Gecko','20040619','20040619.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows'], 'version_raw' => '0.9', 'lang' => 'en-US', 'mozilla' => ['1.7','1.700'], 'version' => '0.900', 'name' => 'Firefox', 'toolkit' => ['Gecko','20040614','20040614.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040416 Firefox/0.8.0+ 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Windows 2000', 'extras' => ['Windows'], 'version_raw' => '0.8.0+', 'lang' => 'en-US', 'mozilla' => ['1.8','1.800'], 'version' => '0.008000', 'name' => 'Firefox', 'toolkit' => ['Gecko','20040416','20040416.000'] [AGENT] Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.6) Gecko/20040207 Firefox/0.8 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => ['X11'], 'version_raw' => '0.8', 'lang' => 'de-DE', 'mozilla' => ['1.6','1.600'], 'version' => '0.800', 'name' => 'Firefox', 'toolkit' => ['Gecko','20040207','20040207.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.5) Gecko/20031007 Firebird/0.7 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows'], 'version_raw' => '0.7', 'lang' => 'fr', 'mozilla' => ['1.5','1.500'], 'version' => '0.700', 'name' => 'Firefox', 'toolkit' => ['Gecko','20031007','20031007.000'] [AGENT] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20031002 Mozilla Firebird/0.6.1 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => ['X11','Firebird/0.6.1'], 'version_raw' => '0.6.1', 'lang' => 'en-US', 'mozilla' => ['1.5','1.500'], 'version' => '0.006001', 'name' => 'Firefox', 'toolkit' => ['Gecko','20031002','20031002.000'] [AGENT] Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Windows NT 4.0', 'extras' => ['Windows'], 'version_raw' => '0.5', 'lang' => 'en-US', 'mozilla' => [ '1.3', '1.300'], 'version' => '0.500', 'name' => 'Firefox', 'toolkit' => ['Gecko','20021207','20021207.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2b) Gecko/20020923 Phoenix/0.1 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Windows XP', 'extras' => ['Windows'], 'version_raw' => '0.1', 'lang' => 'en-US', 'mozilla' => [ '1.2','1.200'], 'version' => '0.100', 'name' => 'Firefox', 'toolkit' => ['Gecko','20020923','20020923.000'] [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021001 Phoenix/0.2 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Windows 2000', 'extras' => ['Windows'], 'version_raw' => '0.2', 'lang' => 'en-US', 'mozilla' => [ '1.2','1.200'], 'version' => '0.200', 'name' => 'Firefox', 'toolkit' => ['Gecko','20021001','20021001.000'] Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/3x000644 000765 000024 00000001606 15003317605 022200 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3 'parser' => 'firefox', 'os' => 'Windows XP', 'strength' => 'U', 'extras' => ['Windows'], 'version_raw' => '3.0.3', 'lang' => 'tr', 'version' => '3.000003', 'mozilla' => ['1.9.0.3','1.009000003'], 'name' => 'Firefox', 'toolkit' => ['Gecko','2008092417','2008092417.000'] [AGENT] Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Intel Mac OS X 10.5', 'extras' => ['Macintosh'], 'toolkit' => ['Gecko','20100401','20100401.000'], 'version_raw' => '3.6.3', 'lang' => 'en-US', 'version' => '3.006003', 'mozilla' => ['1.9.2.3','1.009002003'], 'name' => 'Firefox', Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/7x000644 000765 000024 00000001275 15003317605 022206 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 'parser' => 'firefox', 'os' => 'Intel Mac OS X 10.6', 'toolkit' => ['Gecko','20100101','20100101.000'], 'version_raw' => '7.0.1', 'version' => '7.000001', 'mozilla' => ['7.0.1','7.000001'], 'name' => 'Firefox', extras => ['Macintosh'], [AGENT] Mozilla/5.0 (Windows NT 6.0; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 'parser' => 'firefox', 'os' => 'Windows Vista / Server 2008', 'toolkit' => ['Gecko','20100101','20100101.000'], 'version_raw' => '7.0.1', 'version' => '7.000001', 'mozilla' => ['7.0.1','7.000001'], 'name' => 'Firefox', Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/57x000644 000765 000024 00000000605 15003317605 022267 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:57.0) Gecko/20100101 Firefox/57.0 extras => [ 'Macintosh' ], mozilla => [ '57.0', '57.000' ], name => 'Firefox', os => 'Intel Mac OS X 10.12', parser => 'firefox', toolkit => [ 'Gecko', '20100101', '20100101.000' ], version => '57.000', version_raw => '57.0', Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/16x000644 000765 000024 00000000547 15003317605 022267 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (X11; SunOS i86pc; rv:16.0) Gecko/20100101 Firefox/16.0 extras => [ 'X11' ], mozilla => [ '16.0', '16.000' ], name => 'Firefox', os => 'SunOS i86pc', parser => 'firefox', toolkit => [ 'Gecko', '20100101', '20100101.000' ], version => '16.000', version_raw => '16.0', Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/6x000644 000765 000024 00000000562 15003317605 022203 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 'os' => 'Intel Mac OS X 10.6', 'toolkit' => ['Gecko','20100101','20100101.000'], 'version_raw' => '6.0.2', 'version' => '6.000002', 'mozilla' => ['6.0.2','6.000002'], 'name' => 'Firefox', parser => 'firefox', extras => ['Macintosh'], Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/suspect/000755 000765 000024 00000000000 15003317605 023406 5ustar00burakstaff000000 000000 Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/2x000644 000765 000024 00000001771 15003317605 022202 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080129 Iceweasel/2.0.0.12 (Debian-2.0.0.12-1) 'parser' => 'firefox', 'strength' => 'U', 'os' => 'Linux i686', 'extras' => ['X11','Debian-2.0.0.12-1'], 'version_raw' => '2.0.0.12', 'lang' => 'en-US', 'mozilla' => ['1.8.1.12','1.008001012'], 'version' => '2.000000012', 'name' => 'Firefox', 'toolkit' => ['Gecko','20080129','20080129.000'] [AGENT] Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.19) Gecko/20081202 Iceweasel/2.0.0.19 (Debian-2.0.0.19-0etch1) extras => [ 'X11', 'Debian-2.0.0.19-0etch1' ], lang => 'de', mozilla => [ '1.8.1.19', '1.008001019' ], name => 'Firefox', os => 'Linux i686 x86_64 ', parser => 'firefox', strength => 'U', toolkit => [ 'Gecko', '20081202', '20081202.000' ], version => '2.000000019', version_raw => '2.0.0.19', Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/1x000644 000765 000024 00000000641 15003317605 022174 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (compatible; SnapPreviewBot; en-US; rv:1.8.0.9) Gecko/20061206 Firefox/1.5.0.9 'parser' => 'firefox', 'extras' => ['SnapPreviewBot'], 'version_raw' => '1.5.0.9', 'lang' => 'en-US', 'mozilla' => ['1.8.0.9','1.008000009'], 'version' => '1.005000009', 'name' => 'Firefox', 'toolkit' => ['Gecko','20061206','20061206.000'] Parse-HTTP-UserAgent-0.43/t/data/desktop/firefox/suspect/3x000644 000765 000024 00000000566 15003317605 023672 0ustar00burakstaff000000 000000 [AGENT] Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.1.2) Firefox/3.5.2 extras => [ 'Windows' ], lang => 'zh-CN', mozilla => [ '1.9.1.2', '1.009001002' ], name => 'Firefox', os => 'Windows XP', parser => 'ff_suspect', strength => 'U', version => '3.005002', version_raw => '3.5.2', Parse-HTTP-UserAgent-0.43/etc/Migration.pod000644 000765 000024 00000010754 15003317605 020650 0ustar00burakstaff000000 000000 =pod =encoding utf8 =head1 NAME Migration.pod - Migration from other parsers =head1 HTTP::BrowserDetect to Parse::HTTP::UserAgent migration cheat sheet =head2 Operating Systems win16 N/A (no test data) win3x $ua->os =~ m{Windows 3} win31 $ua->os eq 'Windows 3.1' win95 $ua->os eq 'Windows 95' win98 $ua->os eq 'Windows 98' winnt $ua->os =~ m{Windows} && $ua->os !~ m{(?:9[58]|3[.]1|Me)} windows $ua->os =~ m{Windows} win32 $ua->os =~ m{Windows} win2k $ua->os eq 'Windows 2000' winxp $ua->os eq 'Windows XP' win2k3 $ua->os eq 'Windows 2003' winvista $ua->os eq 'Windows Vista / 2008' winme $ua->os eq 'Windows Me' dotnet $ua->dotnet mac $ua->os =~ m{Mac}i macosx $ua->os =~ m{Mac OS X}i mac68k N/A (no test data) macppc $ua->os =~ m{PowerPC}i os2 N/A (no test data) unix N/A (no test data) sun N/A (no test data) sun4 N/A (no test data) sun5 N/A (no test data) suni86 N/A (no test data) irix N/A (no test data) irix5 N/A (no test data) irix6 N/A (no test data) hpux N/A (no test data) hpux9 N/A (no test data) hpux10 N/A (no test data) aix N/A (no test data) aix1 N/A (no test data) aix2 N/A (no test data) aix3 N/A (no test data) aix4 N/A (no test data) linux $ua->os =~ m{linux}i sco N/A (no test data) unixware N/A (no test data) mpras N/A (no test data) reliant N/A (no test data) dec N/A (no test data) sinix N/A (no test data) freebsd $ua->os =~ m{FreeBSD}i bsd $ua->os =~ m{BSD}i vms N/A (no test data) x11 my @e = $ua->extras; $e[0] && $e[0] eq 'X11' amiga $ua->os =~ m{Amiga}i =head2 Devices Not supported yet. palm audrey iopener wap blackberry =head2 Browsers mosaic N/A netscape $ua eq 'Netscape' nav2 $ua eq 'Netscape' && $ua >= 2 && $ua < 3 nav3 $ua eq 'Netscape' && $ua >= 3 && $ua < 4 nav4 $ua eq 'Netscape' && $ua >= 4 && $ua < 5 nav4up $ua eq 'Netscape' && $ua >= 4 nav45 $ua eq 'Netscape' && $ua >= 4.5 && $ua < 5 nav45up $ua eq 'Netscape' && $ua >= 4.5 nav6 $ua eq 'Netscape' && $ua >= 6 && $ua < 7 nav6up $ua eq 'Netscape' && $ua >= 6 navgold $ua eq 'Netscape' && $ua->version('raw') =~ m{Gold}i; firefox $ua eq 'Firefox' safari $ua eq 'Safari' ie $ua eq 'MSIE' ie3 $ua eq 'MSIE' && $ua >= 3 && $ua < 4 ie4 $ua eq 'MSIE' && $ua >= 3 && $ua < 4 ie4up $ua eq 'MSIE' && $ua >= 4 ie5 $ua eq 'MSIE' && $ua >= 5 && $ua < 5.5 ie5up $ua eq 'MSIE' && $ua >= 5 ie55 $ua eq 'MSIE' && $ua >= 5.5 && $ua < 6 ie55up $ua eq 'MSIE' && $ua >= 5.5 ie6 $ua eq 'MSIE' && $ua >= 6 && $ua < 7 opera $ua eq 'Opera' opera3 $ua eq 'Opera' && $ua >= 3 && $ua < 4 opera4 $ua eq 'Opera' && $ua >= 4 && $ua < 5 opera5 $ua eq 'Opera' && $ua >= 5 && $ua < 6 opera6 $ua eq 'Opera' && $ua >= 6 && $ua < 7 opera7 $ua eq 'Opera' && $ua >= 7 && $ua < 8 lynx TODO links TODO aol my @e = $ua->extras; $e[0] && $e[0] =~ m{AOL}i aol3 my @e = $ua->extras; $e[0] && $e[0] =~ m{AOL 3}i aol4 my @e = $ua->extras; $e[0] && $e[0] =~ m{AOL 4}i aol5 my @e = $ua->extras; $e[0] && $e[0] =~ m{AOL 5}i aol6 my @e = $ua->extras; $e[0] && $e[0] =~ m{AOL 6}i neoplanet N/A (no test data) neoplanet2 N/A (no test data) avantgo $ua eq 'AvantGo' emacs TODO mozilla $ua eq 'Mozilla' gecko my @tk = $ua->toolkit; $tk[0] && $tk[0] eq 'Gecko' konqueror $ua eq 'Konqueror' =head2 Robots wget $ua eq 'Wget' getright $ua eq 'GetRight' robot $ua->robot yahoo $ua =~ m{Yahoo}i altavista N/A (no test data) lycos N/A (no test data) infoseek N/A (no test data) lwp $ua eq 'libwww-perl' webcrawler N/A (no test data) linkexchange N/A (no test data) slurp $ua =~ m{slurp}i webtv TODO staroffice N/A (no test data) lotusnotes N/A (no test data) icab $ua eq 'iCab' google $ua =~ m{google}i java N/A (no test data) =head1 SEE ALSO L. =cut