[svn-upgrade] new version libhttp-browserdetect-perl (1.24)
Angel Abad Contreras
12 years ago
11 | 11 | 'File::Slurp' => '0', |
12 | 12 | 'FindBin' => '0', |
13 | 13 | 'JSON::PP' => '0', |
14 | 'Modern::Perl' => '0', | |
15 | 14 | 'Module::Build' => '0.3601', |
16 | 'Test::More' => '0', | |
17 | 'YAML' => '0', | |
18 | 'YAML::Syck' => '0' | |
15 | 'Test::More' => '0' | |
19 | 16 | }, |
20 | 17 | 'configure_requires' => { |
21 | 18 | 'ExtUtils::MakeMaker' => '6.30', |
28 | 25 | 'Olaf Alders <olaf@wundercounter.com> (current maintainer)' |
29 | 26 | ], |
30 | 27 | 'dist_name' => 'HTTP-BrowserDetect', |
31 | 'dist_version' => '1.23', | |
28 | 'dist_version' => '1.24', | |
32 | 29 | 'license' => 'perl', |
33 | 30 | 'module_name' => 'HTTP::BrowserDetect', |
34 | 31 | 'recommends' => {}, |
0 | 0 | Revision history for Perl extension HTTP::BrowserDetect. |
1 | 1 | |
2 | 1.24 2011-05-13 | |
3 | - Removes dependency on Modern::Perl, which was accidentally introduced | |
4 | (Yoshiki Kurihara) | |
5 | ||
2 | 6 | 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) | |
6 | 13 | - Adds wince method (Windows CE) (Olivier Bilodeau) |
7 | 14 | - Now detects Java UserAgent as a robot (Graham Barr) |
8 | 15 | - Now detects Jakarta Commons-HttpClient as a Java client (Graham Barr) |
9 | 16 | - UserAgent tests moved from YAML to JSON |
10 | 17 | - Moves issue tracking to Github |
11 | - Dist now includes META.json file | |
18 | - Dist now includes META.json rather than META.yaml | |
12 | 19 | |
13 | 20 | 1.22 2011-03-10 |
14 | 21 | - Adds Namoroka to list of Firefox browsers (Viacheslav Tykhanovskyi) |
17 | 17 | |
18 | 18 | The GNU General Public License, Version 1, February 1989 |
19 | 19 | |
20 | GNU GENERAL PUBLIC LICENSE | |
21 | Version 1, February 1989 | |
20 | GNU GENERAL PUBLIC LICENSE | |
21 | Version 1, February 1989 | |
22 | 22 | |
23 | 23 | 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 | ||
25 | 26 | Everyone is permitted to copy and distribute verbatim copies |
26 | 27 | of this license document, but changing it is not allowed. |
27 | 28 | |
28 | Preamble | |
29 | Preamble | |
29 | 30 | |
30 | 31 | The license agreements of most software companies try to keep users |
31 | 32 | at the mercy of those companies. By contrast, our General Public |
66 | 67 | The precise terms and conditions for copying, distribution and |
67 | 68 | modification follow. |
68 | 69 | |
69 | GNU GENERAL PUBLIC LICENSE | |
70 | GNU GENERAL PUBLIC LICENSE | |
70 | 71 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
71 | 72 | |
72 | 73 | 0. This License Agreement applies to any program or other work which |
184 | 185 | of preserving the free status of all derivatives of our free software and |
185 | 186 | of promoting the sharing and reuse of software generally. |
186 | 187 | |
187 | NO WARRANTY | |
188 | NO WARRANTY | |
188 | 189 | |
189 | 190 | 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
190 | 191 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
206 | 207 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
207 | 208 | POSSIBILITY OF SUCH DAMAGES. |
208 | 209 | |
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 | |
212 | 213 | |
213 | 214 | If you develop a new program, and you want it to be of the greatest |
214 | 215 | possible use to humanity, the best way to achieve this is to make it |
234 | 235 | GNU General Public License for more details. |
235 | 236 | |
236 | 237 | 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 | ||
239 | 241 | |
240 | 242 | Also add information on how to contact you by electronic and paper mail. |
241 | 243 |
7 | 7 | README |
8 | 8 | TODO |
9 | 9 | dist.ini |
10 | http-browserdetect.komodoproject | |
11 | 10 | lib/HTTP/BrowserDetect.pm |
12 | 11 | t/01-detect.t |
13 | 12 | t/author-critic.t |
14 | 13 | t/release-pod-coverage.t |
15 | 14 | t/useragents.json |
16 | t/yaml2json.pl |
39 | 39 | "File::Slurp" : 0, |
40 | 40 | "FindBin" : 0, |
41 | 41 | "JSON::PP" : 0, |
42 | "Modern::Perl" : 0, | |
43 | "Test::More" : 0, | |
44 | "YAML" : 0, | |
45 | "YAML::Syck" : 0 | |
42 | "Test::More" : 0 | |
46 | 43 | } |
47 | 44 | } |
48 | 45 | }, |
51 | 48 | "bugtracker" : { |
52 | 49 | "web" : "http://github.com/oalders/HTTP-BrowserDetect/issues" |
53 | 50 | }, |
54 | "homepage" : "http://github.com/oalders/http-browserdetect/tree", | |
51 | "homepage" : "http://github.com/oalders/http-browserdetect", | |
55 | 52 | "repository" : { |
56 | 53 | "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" | |
59 | 56 | } |
60 | 57 | }, |
61 | "version" : "1.23" | |
58 | "version" : "1.24" | |
62 | 59 | } |
63 | 60 |
16 | 16 | 'File::Slurp' => '0', |
17 | 17 | 'FindBin' => '0', |
18 | 18 | 'JSON::PP' => '0', |
19 | 'Modern::Perl' => '0', | |
20 | 19 | 'Module::Build' => '0.3601', |
21 | 'Test::More' => '0', | |
22 | 'YAML' => '0', | |
23 | 'YAML::Syck' => '0' | |
20 | 'Test::More' => '0' | |
24 | 21 | }, |
25 | 22 | 'CONFIGURE_REQUIRES' => { |
26 | 23 | 'ExtUtils::MakeMaker' => '6.30', |
34 | 31 | 'Exporter' => '0', |
35 | 32 | 'vars' => '0' |
36 | 33 | }, |
37 | 'VERSION' => '1.23', | |
34 | 'VERSION' => '1.24', | |
38 | 35 | 'test' => { |
39 | 36 | 'TESTS' => 't/*.t' |
40 | 37 | } |
2 | 2 | an HTTP user agent string |
3 | 3 | |
4 | 4 | VERSION |
5 | version 1.23 | |
5 | version 1.24 | |
6 | 6 | |
7 | 7 | SYNOPSIS |
8 | 8 | use HTTP::BrowserDetect; |
370 | 370 | |
371 | 371 | Olivier Bilodeau |
372 | 372 | |
373 | Yoshiki Kurihara | |
374 | ||
373 | 375 | TO DO |
374 | 376 | The _engine() method currently only handles Gecko. It needs to be |
375 | 377 | expanded to handle other rendering engines. |
430 | 432 | requests, but plain old patch files are also welcome. |
431 | 433 | |
432 | 434 | 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 | |
434 | 436 | includes any changes you have made. Please contact me if you have any |
435 | 437 | questions. |
436 | 438 |
4 | 4 | license = Perl_5 |
5 | 5 | copyright_holder = Lee Semel |
6 | 6 | copyright_year = 2011 |
7 | version = 1.23 | |
7 | version = 1.24 | |
8 | 8 | main_module = lib/HTTP/BrowserDetect.pm |
9 | 9 | |
10 | 10 | [GatherDir] |
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> |
0 | 0 | use strict; |
1 | 1 | package HTTP::BrowserDetect; |
2 | 2 | BEGIN { |
3 | $HTTP::BrowserDetect::VERSION = '1.23'; | |
3 | $HTTP::BrowserDetect::VERSION = '1.24'; | |
4 | 4 | } |
5 | 5 | |
6 | 6 | use vars qw(@ISA @EXPORT @EXPORT_OK @ALL_TESTS); |
195 | 195 | ( [^.]* ) # Major version number is everything before first dot |
196 | 196 | \. # The first dot |
197 | 197 | ( [\d]* ) # Minor version nnumber is digits after first dot |
198 | }x | |
198 | }xo | |
199 | 199 | ) |
200 | 200 | { |
201 | 201 | $major = $2; |
1108 | 1108 | |
1109 | 1109 | =head1 VERSION |
1110 | 1110 | |
1111 | version 1.23 | |
1111 | version 1.24 | |
1112 | 1112 | |
1113 | 1113 | =head1 SYNOPSIS |
1114 | 1114 | |
1557 | 1557 | |
1558 | 1558 | Olivier Bilodeau |
1559 | 1559 | |
1560 | Yoshiki Kurihara | |
1561 | ||
1560 | 1562 | =head1 TO DO |
1561 | 1563 | |
1562 | 1564 | The _engine() method currently only handles Gecko. It needs to be expanded to |
1621 | 1623 | but plain old patch files are also welcome. |
1622 | 1624 | |
1623 | 1625 | 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 | |
1625 | 1627 | changes you have made. Please contact me if you have any questions. |
1626 | 1628 | |
1627 | 1629 | =head1 AUTHORS |
7 | 7 | use FindBin; |
8 | 8 | use JSON::PP; |
9 | 9 | use Test::More qw( no_plan ); |
10 | use YAML qw( LoadFile ); | |
11 | 10 | require_ok( 'HTTP::BrowserDetect' ); |
12 | 11 | |
13 | 12 | my $json = read_file( "$FindBin::Bin/useragents.json" ); |
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 |