Codebase list libhttp-browserdetect-perl / upstream/1.40
Imported Upstream version 1.40 Angel Abad 12 years ago
8 changed file(s) with 38 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
2626 "Olaf Alders <olaf\@wundercounter.com> (current maintainer)"
2727 ],
2828 "dist_name" => "HTTP-BrowserDetect",
29 "dist_version" => "1.39",
29 "dist_version" => "1.40",
3030 "license" => "perl",
3131 "module_name" => "HTTP::BrowserDetect",
3232 "recommends" => {},
00 Revision history for Perl extension HTTP::BrowserDetect.
1
2 1.40 2012-01-05
3 - Fixes false positive results for RealPlayer browser (John Oatis)
14
25 1.39 2011-12-01
36 - Adds logical groupings of test cases BrowserDetect.pm (Olivier Bilodeau)
0 This software is copyright (c) 2011 by Lee Semel.
0 This software is copyright (c) 2012 by Lee Semel.
11
22 This is free software; you can redistribute it and/or modify it under
33 the same terms as the Perl 5 programming language system itself.
1111
1212 --- The GNU General Public License, Version 1, February 1989 ---
1313
14 This software is Copyright (c) 2011 by Lee Semel.
14 This software is Copyright (c) 2012 by Lee Semel.
1515
1616 This is free software, licensed under:
1717
271271
272272 --- The Artistic License 1.0 ---
273273
274 This software is Copyright (c) 2011 by Lee Semel.
274 This software is Copyright (c) 2012 by Lee Semel.
275275
276276 This is free software, licensed under:
277277
5757 "web" : "https://github.com/oalders/http-browserdetect"
5858 }
5959 },
60 "version" : "1.39"
60 "version" : "1.40"
6161 }
6262
3333 "strict" => 0,
3434 "vars" => 0
3535 },
36 "VERSION" => "1.39",
36 "VERSION" => "1.40",
3737 "test" => {
3838 "TESTS" => "t/*.t"
3939 }
22 an HTTP user agent string
33
44 VERSION
5 version 1.39
5 version 1.40
66
77 SYNOPSIS
88 use HTTP::BrowserDetect;
239239 netscape nav2 nav3 nav4 nav4up nav45 nav45up navgold nav6 nav6up
240240 opera opera3 opera4 opera5 opera6 opera7
241241 realplayer
242 realplayer_browser
243 The realplayer method above tests for the presence of either the RealPlayer
244 plug-in "(r1 " or the browser "RealPlayer". To preserve
245 "bugwards compatibility" and prevent false reporting, browser_string calls
246 this method which ignores the "(r1 " plug-in signature.
242247 safari
243248 staroffice
244249 webtv
462467 * Olaf Alders <olaf@wundercounter.com> (current maintainer)
463468
464469 COPYRIGHT AND LICENSE
465 This software is copyright (c) 2011 by Lee Semel.
470 This software is copyright (c) 2012 by Lee Semel.
466471
467472 This is free software; you can redistribute it and/or modify it under
468473 the same terms as the Perl 5 programming language system itself.
33 author = Olaf Alders <olaf@wundercounter.com> (current maintainer)
44 license = Perl_5
55 copyright_holder = Lee Semel
6 copyright_year = 2011
7 version = 1.39
6 copyright_year = 2012
7 version = 1.40
88 main_module = lib/HTTP/BrowserDetect.pm
99
1010 [GatherDir]
00 use strict;
11 package HTTP::BrowserDetect;
22 {
3 $HTTP::BrowserDetect::VERSION = '1.39';
3 $HTTP::BrowserDetect::VERSION = '1.40';
44 }
55
66 use vars qw(@ISA @EXPORT @EXPORT_OK @ALL_TESTS);
779779
780780 $self->{realplayer_version} = undef;
781781 if ( $tests->{REALPLAYER} ) {
782 if ( $ua =~ /realplayer\/([\d\.]+)/ ) {
782 if ( $ua =~ /realplayer\/([\d+\.]+)/ ) {
783783 $self->{realplayer_version} = $1;
784784 my @version = split( /\./, $self->{realplayer_version} );
785785 $major = shift @version;
786786 $minor = shift @version;
787 }
788 elsif ( $ua =~ /realplayer\s(\w+)/ ){
789 $self->{realplayer_version} = $1;
787790 }
788791 }
789792
817820 $browser_string = 'Mosaic' if $self->mosaic;
818821 $browser_string = 'Lynx' if $self->lynx;
819822 $browser_string = 'Links' if $self->links;
820 $browser_string = 'RealPlayer' if $self->realplayer;
823 $browser_string = 'RealPlayer' if $self->realplayer_browser;
821824 $browser_string = 'IceWeasel' if $self->iceweasel;
822825 $browser_string = 'curl' if $self->curl;
823826 $browser_string = 'puf' if $self->puf;
879882 return 0;
880883 }
881884
885 sub realplayer_browser {
886 my ( $self, $check ) = _self_or_default( @_ );
887 return 1 if $self->{realplayer_version};
888 return 0;
889 }
890
882891 sub gecko_version {
883892 my ( $self, $check ) = _self_or_default( @_ );
884893 my $version;
12001209
12011210 =head1 VERSION
12021211
1203 version 1.39
1212 version 1.40
12041213
12051214 =head1 SYNOPSIS
12061215
14851494
14861495 =head3 realplayer
14871496
1497 =head3 realplayer_browser
1498 The realplayer method above tests for the presence of either the RealPlayer
1499 plug-in "(r1 " or the browser "RealPlayer". To preserve
1500 "bugwards compatibility" and prevent false reporting, browser_string calls
1501 this method which ignores the "(r1 " plug-in signature.
1502
14881503 =head3 safari
14891504
14901505 =head3 staroffice
17611776
17621777 =head1 COPYRIGHT AND LICENSE
17631778
1764 This software is copyright (c) 2011 by Lee Semel.
1779 This software is copyright (c) 2012 by Lee Semel.
17651780
17661781 This is free software; you can redistribute it and/or modify it under
17671782 the same terms as the Perl 5 programming language system itself.