Merge tag 'upstream/1.60' into upstream
Upstream version 1.60
gregor herrmann
10 years ago
19 | 19 |
"Olaf Alders <olaf\@wundercounter.com> (current maintainer)"
|
20 | 20 |
],
|
21 | 21 |
"dist_name" => "HTTP-BrowserDetect",
|
22 | |
"dist_version" => "1.59",
|
|
22 |
"dist_version" => "1.60",
|
23 | 23 |
"license" => "perl",
|
24 | 24 |
"module_name" => "HTTP::BrowserDetect",
|
25 | 25 |
"recommends" => {},
|
0 | 0 |
Revision history for Perl extension HTTP::BrowserDetect.
|
|
1 |
|
|
2 |
1.60 2013-08-29 23:02:13 America/Toronto
|
|
3 |
- Fixes bug where "Linux" rather than "Android" was returned as os_string
|
|
4 |
for Android devices.
|
1 | 5 |
|
2 | 6 |
1.59 2013-08-18 00:38:21 America/Toronto
|
3 | 7 |
- Revert 1.57's behaviour of returning a robot name in browser_string.
|
62 | 62 |
"web" : "https://github.com/oalders/http-browserdetect"
|
63 | 63 |
}
|
64 | 64 |
},
|
65 | |
"version" : "1.59",
|
|
65 |
"version" : "1.60",
|
66 | 66 |
"x_contributors" : [
|
67 | 67 |
"Aran Deltac <bluefeet@gmail.com>",
|
68 | 68 |
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
35 | 35 |
"Test::Most" => 0,
|
36 | 36 |
"Test::NoWarnings" => 0
|
37 | 37 |
},
|
38 | |
"VERSION" => "1.59",
|
|
38 |
"VERSION" => "1.60",
|
39 | 39 |
"test" => {
|
40 | 40 |
"TESTS" => "t/*.t"
|
41 | 41 |
}
|
2 | 2 |
an HTTP user agent string
|
3 | 3 |
|
4 | 4 |
VERSION
|
5 | |
version 1.59
|
|
5 |
version 1.60
|
6 | 6 |
|
7 | 7 |
SYNOPSIS
|
8 | 8 |
use HTTP::BrowserDetect;
|
4 | 4 |
license = Perl_5
|
5 | 5 |
copyright_holder = Lee Semel
|
6 | 6 |
copyright_year = 2013
|
7 | |
version = 1.59
|
|
7 |
version = 1.60
|
8 | 8 |
main_module = lib/HTTP/BrowserDetect.pm
|
9 | 9 |
|
10 | 10 |
[GatherDir]
|
2 | 2 |
|
3 | 3 |
package HTTP::BrowserDetect;
|
4 | 4 |
{
|
5 | |
$HTTP::BrowserDetect::VERSION = '1.59';
|
|
5 |
$HTTP::BrowserDetect::VERSION = '1.60';
|
6 | 6 |
}
|
7 | 7 |
|
8 | 8 |
use vars qw(@ALL_TESTS);
|
|
1052 | 1052 |
return 'Win8' if $self->win8;
|
1053 | 1053 |
return 'WinNT' if $self->winnt;
|
1054 | 1054 |
return 'Windows Phone' if $self->winphone;
|
1055 | |
return 'Mac OS X' if $self->macosx;
|
1056 | 1055 |
return 'Win3x' if $self->win3x;
|
1057 | |
return 'OS2' if $self->os2;
|
1058 | |
return 'Unix' if $self->unix && !$self->linux;
|
|
1056 |
return 'Android' if $self->android;
|
1059 | 1057 |
return 'Linux' if $self->linux;
|
|
1058 |
return 'Unix' if $self->unix;
|
1060 | 1059 |
return 'Firefox OS' if $self->firefoxos;
|
1061 | 1060 |
return 'RIM Tablet OS' if $self->rimtabletos;
|
1062 | 1061 |
return 'Playstation 3 GameOS' if $self->ps3gameos;
|
1063 | 1062 |
return 'Playstation Portable GameOS' if $self->pspgameos;
|
1064 | 1063 |
return 'iOS' if $self->iphone || $self->ipod || $self->ipad;
|
|
1064 |
return 'Mac OS X' if $self->macosx;
|
1065 | 1065 |
return 'Mac' if $self->mac;
|
|
1066 |
return 'OS2' if $self->os2;
|
1066 | 1067 |
return;
|
1067 | 1068 |
}
|
1068 | 1069 |
|
|
1451 | 1452 |
|
1452 | 1453 |
=head1 VERSION
|
1453 | 1454 |
|
1454 | |
version 1.59
|
|
1455 |
version 1.60
|
1455 | 1456 |
|
1456 | 1457 |
=head1 SYNOPSIS
|
1457 | 1458 |
|
2 | 2 |
use strict;
|
3 | 3 |
use warnings;
|
4 | 4 |
|
5 | |
use File::Slurp;
|
6 | |
use FindBin;
|
7 | |
use JSON::PP;
|
8 | 5 |
use Test::Most;
|
9 | 6 |
use Test::FailWarnings;
|
10 | 7 |
|
|
8 |
use File::Slurp;
|
|
9 |
use FindBin;
|
|
10 |
use HTTP::BrowserDetect;
|
|
11 |
use JSON::PP;
|
|
12 |
|
11 | 13 |
bail_on_fail();
|
12 | |
|
13 | |
# test that the module loads without errors
|
14 | |
my $w;
|
15 | |
{
|
16 | |
local $SIG{__WARN__} = sub { $w = shift };
|
17 | |
require_ok( 'HTTP::BrowserDetect' );
|
18 | |
}
|
19 | |
ok !$w;
|
20 | 14 |
|
21 | 15 |
my $json = read_file( "$FindBin::Bin/useragents.json" );
|
22 | 16 |
|