[svn-upgrade] new version libhttp-browserdetect-perl (1.26)
Angel Abad Contreras
12 years ago
25 | 25 | 'Olaf Alders <olaf@wundercounter.com> (current maintainer)' |
26 | 26 | ], |
27 | 27 | 'dist_name' => 'HTTP-BrowserDetect', |
28 | 'dist_version' => '1.24', | |
28 | 'dist_version' => '1.26', | |
29 | 29 | 'license' => 'perl', |
30 | 30 | 'module_name' => 'HTTP::BrowserDetect', |
31 | 31 | 'recommends' => {}, |
0 | 0 | Revision history for Perl extension HTTP::BrowserDetect. |
1 | ||
2 | 1.26 2011-07-12 | |
3 | - Fixes Pod typo | |
4 | ||
5 | 1.25 2011-07-12 | |
6 | - Fix warnings about iceweasel test being defined twice (Paul Findlay) | |
7 | - Adds Opera Tablet to mobile devices (Jacob Rask) | |
1 | 8 | |
2 | 9 | 1.24 2011-05-13 |
3 | 10 | - Removes dependency on Modern::Perl, which was accidentally introduced |
5 | 5 | "Olaf Alders <olaf@wundercounter.com> (current maintainer)" |
6 | 6 | ], |
7 | 7 | "dynamic_config" : 0, |
8 | "generated_by" : "Dist::Zilla version 4.200006, CPAN::Meta::Converter version 2.110930", | |
8 | "generated_by" : "Dist::Zilla version 4.200008, CPAN::Meta::Converter version 2.110440", | |
9 | 9 | "license" : [ |
10 | 10 | "perl_5" |
11 | 11 | ], |
55 | 55 | "web" : "http://github.com/oalders/http-browserdetect" |
56 | 56 | } |
57 | 57 | }, |
58 | "version" : "1.24" | |
58 | "version" : "1.26" | |
59 | 59 | } |
60 | 60 |
31 | 31 | 'Exporter' => '0', |
32 | 32 | 'vars' => '0' |
33 | 33 | }, |
34 | 'VERSION' => '1.24', | |
34 | 'VERSION' => '1.26', | |
35 | 35 | 'test' => { |
36 | 36 | 'TESTS' => 't/*.t' |
37 | 37 | } |
2 | 2 | an HTTP user agent string |
3 | 3 | |
4 | 4 | VERSION |
5 | version 1.24 | |
5 | version 1.26 | |
6 | 6 | |
7 | 7 | SYNOPSIS |
8 | 8 | use HTTP::BrowserDetect; |
38 | 38 | |
39 | 39 | This module is based upon the JavaScript browser detection code |
40 | 40 | available at |
41 | http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html. | |
41 | <http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html>. | |
42 | 42 | |
43 | 43 | INSTALLATION |
44 | 44 | In most cases, you can just issue the following commands: |
372 | 372 | |
373 | 373 | Yoshiki Kurihara |
374 | 374 | |
375 | Paul Findlay | |
376 | ||
375 | 377 | TO DO |
376 | 378 | The _engine() method currently only handles Gecko. It needs to be |
377 | 379 | expanded to handle other rendering engines. |
380 | 382 | |
381 | 383 | SEE ALSO |
382 | 384 | "The Ultimate JavaScript Client Sniffer, Version 3.0", |
383 | http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html | |
385 | <http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html> | |
384 | 386 | |
385 | 387 | "Browser ID (User-Agent) Strings", |
386 | http://www.zytrax.com/tech/web/browser_ids.htm | |
388 | <http://www.zytrax.com/tech/web/browser_ids.htm> | |
387 | 389 | |
388 | 390 | Safari "Historical User Agent strings", |
389 | http://developer.apple.com/internet/safari/uamatrix.html (now gone, | |
391 | <http://developer.apple.com/internet/safari/uamatrix.html> (now gone, | |
390 | 392 | retrieved 2007-06-20) |
391 | 393 | |
392 | 394 | "Safari Agent Strings", |
393 | http://homepage.mac.com/jprince/designSandbox/web/safari-agents/ | |
395 | <http://homepage.mac.com/jprince/designSandbox/web/safari-agents/> | |
394 | 396 | |
395 | 397 | perl(1), HTTP::Headers, HTTP::Headers::UserAgent. |
398 | ||
396 | 399 | |
397 | 400 | SUPPORT |
398 | 401 | You can find documentation for this module with the perldoc command. |
405 | 408 | |
406 | 409 | <http://github.com/oalders/http-browserdetect> |
407 | 410 | |
408 | * RT: CPAN's request tracker | |
409 | ||
410 | <http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTTP-BrowserDetect> | |
411 | * Reporting Issues | |
412 | ||
413 | <https://github.com/oalders/http-browserdetect/issues> | |
411 | 414 | |
412 | 415 | * AnnoCPAN: Annotated CPAN documentation |
413 | 416 | |
419 | 422 | |
420 | 423 | * Search CPAN |
421 | 424 | |
422 | <http://search.cpan.org/dist/HTTP-BrowserDetect/> | |
425 | <http://beta.metacpan.org/module/HTTP::BrowserDetect> | |
423 | 426 | |
424 | 427 | BUGS AND LIMITATIONS |
425 | 428 | The biggest limitation at this point is the test suite, which really |
429 | 432 | Patches are certainly welcome, with many thanks for the excellent |
430 | 433 | contributions which have already been received. The preferred method of |
431 | 434 | patching would be to fork the GitHub repo and then send me a pull |
432 | requests, but plain old patch files are also welcome. | |
435 | request, but plain old patch files are also welcome. | |
433 | 436 | |
434 | 437 | If you're able to add test cases, this will speed up the time to release |
435 | 438 | your changes. Just edit t/useragents.json so that the test coverage |
436 | 439 | includes any changes you have made. Please contact me if you have any |
437 | 440 | questions. |
438 | 441 | |
442 | This distribution uses Dist::Zilla. If you're not familiar with this | |
443 | module, please see | |
444 | <https://github.com/oalders/http-browserdetect/issues/5> for some | |
445 | helpful tips to get you started. | |
446 | ||
439 | 447 | AUTHORS |
440 | 448 | * Lee Semel <lee@semel.net> |
441 | 449 |
4 | 4 | license = Perl_5 |
5 | 5 | copyright_holder = Lee Semel |
6 | 6 | copyright_year = 2011 |
7 | version = 1.24 | |
7 | version = 1.26 | |
8 | 8 | main_module = lib/HTTP/BrowserDetect.pm |
9 | 9 | |
10 | 10 | [GatherDir] |
0 | 0 | use strict; |
1 | 1 | package HTTP::BrowserDetect; |
2 | 2 | BEGIN { |
3 | $HTTP::BrowserDetect::VERSION = '1.24'; | |
3 | $HTTP::BrowserDetect::VERSION = '1.26'; | |
4 | 4 | } |
5 | 5 | |
6 | 6 | use vars qw(@ISA @EXPORT @EXPORT_OK @ALL_TESTS); |
57 | 57 | aol5 aol6 neoplanet |
58 | 58 | neoplanet2 avantgo emacs |
59 | 59 | mozilla gecko r1 |
60 | iceweasel netfront mobile_safari | |
61 | elinks | |
60 | elinks netfront mobile_safari | |
62 | 61 | ); |
63 | 62 | |
64 | 63 | # Firefox variants |
525 | 524 | || index( $ua, "symbos" ) != -1 |
526 | 525 | || index( $ua, "opera mobi" ) != -1 |
527 | 526 | || index( $ua, "fennec" ) != -1 |
527 | || index( $ua, "opera tablet" ) != -1 | |
528 | 528 | || $tests->{PSP} |
529 | 529 | ); |
530 | 530 | |
1108 | 1108 | |
1109 | 1109 | =head1 VERSION |
1110 | 1110 | |
1111 | version 1.24 | |
1111 | version 1.26 | |
1112 | 1112 | |
1113 | 1113 | =head1 SYNOPSIS |
1114 | 1114 | |
1144 | 1144 | string. The results of these tests are available via methods of the object. |
1145 | 1145 | |
1146 | 1146 | This module is based upon the JavaScript browser detection code available at |
1147 | B<http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html>. | |
1147 | L<http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html>. | |
1148 | 1148 | |
1149 | 1149 | =head1 INSTALLATION |
1150 | 1150 | |
1559 | 1559 | |
1560 | 1560 | Yoshiki Kurihara |
1561 | 1561 | |
1562 | Paul Findlay | |
1563 | ||
1562 | 1564 | =head1 TO DO |
1563 | 1565 | |
1564 | 1566 | The _engine() method currently only handles Gecko. It needs to be expanded to |
1568 | 1570 | |
1569 | 1571 | =head1 SEE ALSO |
1570 | 1572 | |
1571 | "The Ultimate JavaScript Client Sniffer, Version 3.0", B<http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html> | |
1572 | ||
1573 | "Browser ID (User-Agent) Strings", B<http://www.zytrax.com/tech/web/browser_ids.htm> | |
1574 | ||
1575 | Safari "Historical User Agent strings", B<http://developer.apple.com/internet/safari/uamatrix.html> (now gone, retrieved 2007-06-20) | |
1576 | ||
1577 | "Safari Agent Strings", B<http://homepage.mac.com/jprince/designSandbox/web/safari-agents/> | |
1573 | "The Ultimate JavaScript Client Sniffer, Version 3.0", L<http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html> | |
1574 | ||
1575 | "Browser ID (User-Agent) Strings", L<http://www.zytrax.com/tech/web/browser_ids.htm> | |
1576 | ||
1577 | Safari "Historical User Agent strings", L<http://developer.apple.com/internet/safari/uamatrix.html> (now gone, retrieved 2007-06-20) | |
1578 | ||
1579 | "Safari Agent Strings", L<http://homepage.mac.com/jprince/designSandbox/web/safari-agents/> | |
1578 | 1580 | |
1579 | 1581 | perl(1), L<HTTP::Headers>, L<HTTP::Headers::UserAgent>. |
1580 | 1582 | |
1583 | =head1 | |
1584 | ||
1581 | 1585 | =head1 SUPPORT |
1582 | 1586 | |
1583 | 1587 | You can find documentation for this module with the perldoc command. |
1592 | 1596 | |
1593 | 1597 | L<http://github.com/oalders/http-browserdetect> |
1594 | 1598 | |
1595 | =item * RT: CPAN's request tracker | |
1596 | ||
1597 | L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=HTTP-BrowserDetect> | |
1599 | =item * Reporting Issues | |
1600 | ||
1601 | L<https://github.com/oalders/http-browserdetect/issues> | |
1598 | 1602 | |
1599 | 1603 | =item * AnnoCPAN: Annotated CPAN documentation |
1600 | 1604 | |
1606 | 1610 | |
1607 | 1611 | =item * Search CPAN |
1608 | 1612 | |
1609 | L<http://search.cpan.org/dist/HTTP-BrowserDetect/> | |
1613 | L<http://beta.metacpan.org/module/HTTP::BrowserDetect> | |
1610 | 1614 | |
1611 | 1615 | =back |
1612 | 1616 | |
1619 | 1623 | |
1620 | 1624 | Patches are certainly welcome, with many thanks for the excellent |
1621 | 1625 | contributions which have already been received. The preferred method of |
1622 | patching would be to fork the GitHub repo and then send me a pull requests, | |
1626 | patching would be to fork the GitHub repo and then send me a pull request, | |
1623 | 1627 | but plain old patch files are also welcome. |
1624 | 1628 | |
1625 | 1629 | If you're able to add test cases, this will speed up the time to release your |
1626 | 1630 | changes. Just edit t/useragents.json so that the test coverage includes any |
1627 | changes you have made. Please contact me if you have any questions. | |
1631 | changes you have made. Please contact me if you have any questions. | |
1632 | ||
1633 | This distribution uses L<Dist::Zilla>. If you're not familiar with this | |
1634 | module, please see L<https://github.com/oalders/http-browserdetect/issues/5> | |
1635 | for some helpful tips to get you started. | |
1628 | 1636 | |
1629 | 1637 | =head1 AUTHORS |
1630 | 1638 |
7 | 7 | use FindBin; |
8 | 8 | use JSON::PP; |
9 | 9 | use Test::More qw( no_plan ); |
10 | require_ok( 'HTTP::BrowserDetect' ); | |
10 | ||
11 | # test that the module loads without errors | |
12 | my $w; | |
13 | { | |
14 | local $SIG{__WARN__} = sub { $w = shift }; | |
15 | require_ok( 'HTTP::BrowserDetect' ); | |
16 | } | |
17 | ok !$w; | |
18 | ||
11 | 19 | |
12 | 20 | my $json = read_file( "$FindBin::Bin/useragents.json" ); |
13 | 21 |
2610 | 2610 | "public_minor" : ".6", |
2611 | 2611 | "public_version" : "1.6", |
2612 | 2612 | "version" : "1.6" |
2613 | }, | |
2614 | // | |
2615 | "Opera/9.80 (Windows NT 6.1; Opera Tablet/11648; U; en) Presto/2.7.81 Version/11.00" : { | |
2616 | "browser_string" : null, | |
2617 | "country" : null, | |
2618 | "language" : "EN", | |
2619 | "major" : "11", | |
2620 | "match" : [ | |
2621 | "mobile", | |
2622 | "win32", | |
2623 | "windows", | |
2624 | "win7", | |
2625 | "opera", | |
2626 | "winnt" | |
2627 | ], | |
2628 | "minor" : ".0", | |
2629 | "no_match" : null, | |
2630 | "os" : "WinNT", | |
2631 | "other" : null, | |
2632 | "public_major" : "11.0", | |
2633 | "public_minor" : ".0", | |
2634 | "public_version" : "11.0", | |
2635 | "version" : "11.0" | |
2613 | 2636 | } |
2614 | 2637 | } |
2615 | 2638 |