Codebase list libhttp-browserdetect-perl / f56cc86
[svn-upgrade] new version libhttp-browserdetect-perl (1.26) Angel Abad Contreras 12 years ago
9 changed file(s) with 89 addition(s) and 35 deletion(s). Raw diff Collapse all Expand all
2525 'Olaf Alders <olaf@wundercounter.com> (current maintainer)'
2626 ],
2727 'dist_name' => 'HTTP-BrowserDetect',
28 'dist_version' => '1.24',
28 'dist_version' => '1.26',
2929 'license' => 'perl',
3030 'module_name' => 'HTTP::BrowserDetect',
3131 'recommends' => {},
00 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)
18
29 1.24 2011-05-13
310 - Removes dependency on Modern::Perl, which was accidentally introduced
55 "Olaf Alders <olaf@wundercounter.com> (current maintainer)"
66 ],
77 "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",
99 "license" : [
1010 "perl_5"
1111 ],
5555 "web" : "http://github.com/oalders/http-browserdetect"
5656 }
5757 },
58 "version" : "1.24"
58 "version" : "1.26"
5959 }
6060
3131 'Exporter' => '0',
3232 'vars' => '0'
3333 },
34 'VERSION' => '1.24',
34 'VERSION' => '1.26',
3535 'test' => {
3636 'TESTS' => 't/*.t'
3737 }
22 an HTTP user agent string
33
44 VERSION
5 version 1.24
5 version 1.26
66
77 SYNOPSIS
88 use HTTP::BrowserDetect;
3838
3939 This module is based upon the JavaScript browser detection code
4040 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>.
4242
4343 INSTALLATION
4444 In most cases, you can just issue the following commands:
372372
373373 Yoshiki Kurihara
374374
375 Paul Findlay
376
375377 TO DO
376378 The _engine() method currently only handles Gecko. It needs to be
377379 expanded to handle other rendering engines.
380382
381383 SEE ALSO
382384 "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>
384386
385387 "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>
387389
388390 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,
390392 retrieved 2007-06-20)
391393
392394 "Safari Agent Strings",
393 http://homepage.mac.com/jprince/designSandbox/web/safari-agents/
395 <http://homepage.mac.com/jprince/designSandbox/web/safari-agents/>
394396
395397 perl(1), HTTP::Headers, HTTP::Headers::UserAgent.
398
396399
397400 SUPPORT
398401 You can find documentation for this module with the perldoc command.
405408
406409 <http://github.com/oalders/http-browserdetect>
407410
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>
411414
412415 * AnnoCPAN: Annotated CPAN documentation
413416
419422
420423 * Search CPAN
421424
422 <http://search.cpan.org/dist/HTTP-BrowserDetect/>
425 <http://beta.metacpan.org/module/HTTP::BrowserDetect>
423426
424427 BUGS AND LIMITATIONS
425428 The biggest limitation at this point is the test suite, which really
429432 Patches are certainly welcome, with many thanks for the excellent
430433 contributions which have already been received. The preferred method of
431434 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.
433436
434437 If you're able to add test cases, this will speed up the time to release
435438 your changes. Just edit t/useragents.json so that the test coverage
436439 includes any changes you have made. Please contact me if you have any
437440 questions.
438441
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
439447 AUTHORS
440448 * Lee Semel <lee@semel.net>
441449
44 license = Perl_5
55 copyright_holder = Lee Semel
66 copyright_year = 2011
7 version = 1.24
7 version = 1.26
88 main_module = lib/HTTP/BrowserDetect.pm
99
1010 [GatherDir]
00 use strict;
11 package HTTP::BrowserDetect;
22 BEGIN {
3 $HTTP::BrowserDetect::VERSION = '1.24';
3 $HTTP::BrowserDetect::VERSION = '1.26';
44 }
55
66 use vars qw(@ISA @EXPORT @EXPORT_OK @ALL_TESTS);
5757 aol5 aol6 neoplanet
5858 neoplanet2 avantgo emacs
5959 mozilla gecko r1
60 iceweasel netfront mobile_safari
61 elinks
60 elinks netfront mobile_safari
6261 );
6362
6463 # Firefox variants
525524 || index( $ua, "symbos" ) != -1
526525 || index( $ua, "opera mobi" ) != -1
527526 || index( $ua, "fennec" ) != -1
527 || index( $ua, "opera tablet" ) != -1
528528 || $tests->{PSP}
529529 );
530530
11081108
11091109 =head1 VERSION
11101110
1111 version 1.24
1111 version 1.26
11121112
11131113 =head1 SYNOPSIS
11141114
11441144 string. The results of these tests are available via methods of the object.
11451145
11461146 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>.
11481148
11491149 =head1 INSTALLATION
11501150
15591559
15601560 Yoshiki Kurihara
15611561
1562 Paul Findlay
1563
15621564 =head1 TO DO
15631565
15641566 The _engine() method currently only handles Gecko. It needs to be expanded to
15681570
15691571 =head1 SEE ALSO
15701572
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/>
15781580
15791581 perl(1), L<HTTP::Headers>, L<HTTP::Headers::UserAgent>.
15801582
1583 =head1
1584
15811585 =head1 SUPPORT
15821586
15831587 You can find documentation for this module with the perldoc command.
15921596
15931597 L<http://github.com/oalders/http-browserdetect>
15941598
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>
15981602
15991603 =item * AnnoCPAN: Annotated CPAN documentation
16001604
16061610
16071611 =item * Search CPAN
16081612
1609 L<http://search.cpan.org/dist/HTTP-BrowserDetect/>
1613 L<http://beta.metacpan.org/module/HTTP::BrowserDetect>
16101614
16111615 =back
16121616
16191623
16201624 Patches are certainly welcome, with many thanks for the excellent
16211625 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,
16231627 but plain old patch files are also welcome.
16241628
16251629 If you're able to add test cases, this will speed up the time to release your
16261630 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.
16281636
16291637 =head1 AUTHORS
16301638
77 use FindBin;
88 use JSON::PP;
99 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
1119
1220 my $json = read_file( "$FindBin::Bin/useragents.json" );
1321
26102610 "public_minor" : ".6",
26112611 "public_version" : "1.6",
26122612 "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"
26132636 }
26142637 }
26152638