Codebase list libhttp-browserdetect-perl / 063d4d7
[svn-upgrade] new version libhttp-browserdetect-perl (1.24) Angel Abad Contreras 12 years ago
12 changed file(s) with 44 addition(s) and 83 deletion(s). Raw diff Collapse all Expand all
1111 'File::Slurp' => '0',
1212 'FindBin' => '0',
1313 'JSON::PP' => '0',
14 'Modern::Perl' => '0',
1514 'Module::Build' => '0.3601',
16 'Test::More' => '0',
17 'YAML' => '0',
18 'YAML::Syck' => '0'
15 'Test::More' => '0'
1916 },
2017 'configure_requires' => {
2118 'ExtUtils::MakeMaker' => '6.30',
2825 'Olaf Alders <olaf@wundercounter.com> (current maintainer)'
2926 ],
3027 'dist_name' => 'HTTP-BrowserDetect',
31 'dist_version' => '1.23',
28 'dist_version' => '1.24',
3229 'license' => 'perl',
3330 'module_name' => 'HTTP::BrowserDetect',
3431 'recommends' => {},
00 Revision history for Perl extension HTTP::BrowserDetect.
11
2 1.24 2011-05-13
3 - Removes dependency on Modern::Perl, which was accidentally introduced
4 (Yoshiki Kurihara)
5
26 1.23 2011-05-02
3 - Adds a browser_properties() call that exposes all the browser "properties" (Olivier Bilodeau)
4 - Fixes issues where a Chrome string would return 1 to a ->nav45up check (Olivier Bilodeau)
5 - Fixes issue where some WebKit/KHTML browsers returned 1 on ->gecko (Olivier Bilodeau)
7 - Adds a browser_properties() call that exposes all the browser
8 "properties" (Olivier Bilodeau)
9 - Fixes issues where a Chrome string would return 1 to a ->nav45up check
10 (Olivier Bilodeau)
11 - Fixes issue where some WebKit/KHTML browsers returned 1 on ->gecko
12 (Olivier Bilodeau)
613 - Adds wince method (Windows CE) (Olivier Bilodeau)
714 - Now detects Java UserAgent as a robot (Graham Barr)
815 - Now detects Jakarta Commons-HttpClient as a Java client (Graham Barr)
916 - UserAgent tests moved from YAML to JSON
1017 - Moves issue tracking to Github
11 - Dist now includes META.json file
18 - Dist now includes META.json rather than META.yaml
1219
1320 1.22 2011-03-10
1421 - Adds Namoroka to list of Firefox browsers (Viacheslav Tykhanovskyi)
1717
1818 The GNU General Public License, Version 1, February 1989
1919
20 GNU GENERAL PUBLIC LICENSE
21 Version 1, February 1989
20 GNU GENERAL PUBLIC LICENSE
21 Version 1, February 1989
2222
2323 Copyright (C) 1989 Free Software Foundation, Inc.
24 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
2526 Everyone is permitted to copy and distribute verbatim copies
2627 of this license document, but changing it is not allowed.
2728
28 Preamble
29 Preamble
2930
3031 The license agreements of most software companies try to keep users
3132 at the mercy of those companies. By contrast, our General Public
6667 The precise terms and conditions for copying, distribution and
6768 modification follow.
6869
69 GNU GENERAL PUBLIC LICENSE
70 GNU GENERAL PUBLIC LICENSE
7071 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7172
7273 0. This License Agreement applies to any program or other work which
184185 of preserving the free status of all derivatives of our free software and
185186 of promoting the sharing and reuse of software generally.
186187
187 NO WARRANTY
188 NO WARRANTY
188189
189190 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
190191 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
206207 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
207208 POSSIBILITY OF SUCH DAMAGES.
208209
209 END OF TERMS AND CONDITIONS
210
211 Appendix: How to Apply These Terms to Your New Programs
210 END OF TERMS AND CONDITIONS
211
212 Appendix: How to Apply These Terms to Your New Programs
212213
213214 If you develop a new program, and you want it to be of the greatest
214215 possible use to humanity, the best way to achieve this is to make it
234235 GNU General Public License for more details.
235236
236237 You should have received a copy of the GNU General Public License
237 along with this program; if not, write to the Free Software Foundation,
238 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
238 along with this program; if not, write to the Free Software
239 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
240
239241
240242 Also add information on how to contact you by electronic and paper mail.
241243
77 README
88 TODO
99 dist.ini
10 http-browserdetect.komodoproject
1110 lib/HTTP/BrowserDetect.pm
1211 t/01-detect.t
1312 t/author-critic.t
1413 t/release-pod-coverage.t
1514 t/useragents.json
16 t/yaml2json.pl
3939 "File::Slurp" : 0,
4040 "FindBin" : 0,
4141 "JSON::PP" : 0,
42 "Modern::Perl" : 0,
43 "Test::More" : 0,
44 "YAML" : 0,
45 "YAML::Syck" : 0
42 "Test::More" : 0
4643 }
4744 }
4845 },
5148 "bugtracker" : {
5249 "web" : "http://github.com/oalders/HTTP-BrowserDetect/issues"
5350 },
54 "homepage" : "http://github.com/oalders/http-browserdetect/tree",
51 "homepage" : "http://github.com/oalders/http-browserdetect",
5552 "repository" : {
5653 "type" : "git",
57 "url" : "git://github.com/oalders/http-browserdetect.git",
58 "web" : "http://github.com/oalders/http-browserdetect/tree"
54 "url" : "http://github.com/oalders/http-browserdetect",
55 "web" : "http://github.com/oalders/http-browserdetect"
5956 }
6057 },
61 "version" : "1.23"
58 "version" : "1.24"
6259 }
6360
1616 'File::Slurp' => '0',
1717 'FindBin' => '0',
1818 'JSON::PP' => '0',
19 'Modern::Perl' => '0',
2019 'Module::Build' => '0.3601',
21 'Test::More' => '0',
22 'YAML' => '0',
23 'YAML::Syck' => '0'
20 'Test::More' => '0'
2421 },
2522 'CONFIGURE_REQUIRES' => {
2623 'ExtUtils::MakeMaker' => '6.30',
3431 'Exporter' => '0',
3532 'vars' => '0'
3633 },
37 'VERSION' => '1.23',
34 'VERSION' => '1.24',
3835 'test' => {
3936 'TESTS' => 't/*.t'
4037 }
22 an HTTP user agent string
33
44 VERSION
5 version 1.23
5 version 1.24
66
77 SYNOPSIS
88 use HTTP::BrowserDetect;
370370
371371 Olivier Bilodeau
372372
373 Yoshiki Kurihara
374
373375 TO DO
374376 The _engine() method currently only handles Gecko. It needs to be
375377 expanded to handle other rendering engines.
430432 requests, but plain old patch files are also welcome.
431433
432434 If you're able to add test cases, this will speed up the time to release
433 your changes. Just edit t/useragents.yaml so that the test coverage
435 your changes. Just edit t/useragents.json so that the test coverage
434436 includes any changes you have made. Please contact me if you have any
435437 questions.
436438
44 license = Perl_5
55 copyright_holder = Lee Semel
66 copyright_year = 2011
7 version = 1.23
7 version = 1.24
88 main_module = lib/HTTP/BrowserDetect.pm
99
1010 [GatherDir]
+0
-7
http-browserdetect.komodoproject less more
0 <?xml version="1.0" encoding="UTF-8"?>
1 <!-- Komodo Project File - DO NOT EDIT -->
2 <project id="018c76ef-85a2-0d4c-87a2-15d228772baf" kpf_version="5" name="http-browserdetect.komodoproject">
3 <preference-set idref="018c76ef-85a2-0d4c-87a2-15d228772baf">
4 <boolean id="import_live">1</boolean>
5 </preference-set>
6 </project>
00 use strict;
11 package HTTP::BrowserDetect;
22 BEGIN {
3 $HTTP::BrowserDetect::VERSION = '1.23';
3 $HTTP::BrowserDetect::VERSION = '1.24';
44 }
55
66 use vars qw(@ISA @EXPORT @EXPORT_OK @ALL_TESTS);
195195 ( [^.]* ) # Major version number is everything before first dot
196196 \. # The first dot
197197 ( [\d]* ) # Minor version nnumber is digits after first dot
198 }x
198 }xo
199199 )
200200 {
201201 $major = $2;
11081108
11091109 =head1 VERSION
11101110
1111 version 1.23
1111 version 1.24
11121112
11131113 =head1 SYNOPSIS
11141114
15571557
15581558 Olivier Bilodeau
15591559
1560 Yoshiki Kurihara
1561
15601562 =head1 TO DO
15611563
15621564 The _engine() method currently only handles Gecko. It needs to be expanded to
16211623 but plain old patch files are also welcome.
16221624
16231625 If you're able to add test cases, this will speed up the time to release your
1624 changes. Just edit t/useragents.yaml so that the test coverage includes any
1626 changes. Just edit t/useragents.json so that the test coverage includes any
16251627 changes you have made. Please contact me if you have any questions.
16261628
16271629 =head1 AUTHORS
77 use FindBin;
88 use JSON::PP;
99 use Test::More qw( no_plan );
10 use YAML qw( LoadFile );
1110 require_ok( 'HTTP::BrowserDetect' );
1211
1312 my $json = read_file( "$FindBin::Bin/useragents.json" );
+0
-33
t/yaml2json.pl less more
0 #!/usr/bin/env perl
1
2 use Modern::Perl;
3 use JSON::PP qw( encode_json );
4 use YAML::Syck qw(Load);
5 use Data::Dump qw( dump );
6
7 my $yaml;
8 while (<>) {
9 $yaml .= $_;
10 }
11 #say $yaml;
12
13 my @ref = Load( $yaml );
14 #say dump \@ref;
15
16
17
18 my %hash = ( );
19 foreach my $agent ( @ref ) {
20 my $name = delete $agent->{useragent};
21 $hash{ $name } = $agent;
22 }
23
24 my $json = JSON::PP->new->ascii->pretty->allow_nonref->canonical(1)->encode( \%hash );
25 say $json;
26
27
28 #$json->canonical( 1 );
29
30 #print $json->encode_json( \%hash );
31 #say dump \%hash;
32