r58842 - in /branches/upstream/libhttp-browserdetect-perl/current: Changes META.yml lib/HTTP/BrowserDetect.pm t/useragents.yaml
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Fri Jun 4 11:36:15 UTC 2010
Author: ansgar-guest
Date: Fri Jun 4 11:32:22 2010
New Revision: 58842
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=58842
Log:
[svn-upgrade] Integrating new upstream version, libhttp-browserdetect-perl (1.11)
Modified:
branches/upstream/libhttp-browserdetect-perl/current/Changes
branches/upstream/libhttp-browserdetect-perl/current/META.yml
branches/upstream/libhttp-browserdetect-perl/current/lib/HTTP/BrowserDetect.pm
branches/upstream/libhttp-browserdetect-perl/current/t/useragents.yaml
Modified: branches/upstream/libhttp-browserdetect-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-browserdetect-perl/current/Changes?rev=58842&op=diff
==============================================================================
--- branches/upstream/libhttp-browserdetect-perl/current/Changes (original)
+++ branches/upstream/libhttp-browserdetect-perl/current/Changes Fri Jun 4 11:32:22 2010
@@ -1,6 +1,9 @@
Revision history for Perl extension HTTP::BrowserDetect.
-1.10 2010-04-05
+1.11 2010-06-03
+ - Added ps3 and psp (commit 85a619c9a977c0a8e403) (Alexey Surikov)
+
+1.10 2010-05-05
- Google toolbar no longer triggers false positive for Googlebot (Jay
Rifkin)
Modified: branches/upstream/libhttp-browserdetect-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-browserdetect-perl/current/META.yml?rev=58842&op=diff
==============================================================================
--- branches/upstream/libhttp-browserdetect-perl/current/META.yml (original)
+++ branches/upstream/libhttp-browserdetect-perl/current/META.yml Fri Jun 4 11:32:22 2010
@@ -19,7 +19,7 @@
provides:
HTTP::BrowserDetect:
file: lib/HTTP/BrowserDetect.pm
- version: 1.10
+ version: 1.11
resources:
license: http://dev.perl.org/licenses/
-version: 1.10
+version: 1.11
Modified: branches/upstream/libhttp-browserdetect-perl/current/lib/HTTP/BrowserDetect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-browserdetect-perl/current/lib/HTTP/BrowserDetect.pm?rev=58842&op=diff
==============================================================================
--- branches/upstream/libhttp-browserdetect-perl/current/lib/HTTP/BrowserDetect.pm (original)
+++ branches/upstream/libhttp-browserdetect-perl/current/lib/HTTP/BrowserDetect.pm Fri Jun 4 11:32:22 2010
@@ -7,7 +7,7 @@
@ISA = qw(Exporter);
@EXPORT = qw();
@EXPORT_OK = qw();
-$VERSION = '1.10';
+$VERSION = '1.11';
# Operating Systems
push @ALL_TESTS, qw(
@@ -27,14 +27,15 @@
reliant dec sinix
freebsd bsd vms
x11 amiga android
- win7
+ win7 ps3gameos pspgameos
);
# Devices
push @ALL_TESTS, qw(
palm audrey iopener
wap blackberry iphone
- ipod ipad
+ ipod ipad ps3
+ psp
);
# Browsers
@@ -54,7 +55,7 @@
aol5 aol6 neoplanet
neoplanet2 avantgo emacs
mozilla gecko r1
- iceweasel
+ iceweasel netfront
);
# Robots
@@ -246,7 +247,9 @@
&& index( $ua, "compatible" ) == -1
&& index( $ua, "opera" ) == -1
&& index( $ua, "webtv" ) == -1
- && index( $ua, "hotjava" ) == -1 );
+ && index( $ua, "hotjava" ) == -1
+ && index( $ua, "playstation 3" ) == -1
+ && index( $ua, "playstation portable" ) == -1 );
if ( $tests->{GECKO}
&& $tests->{NETSCAPE}
@@ -385,6 +388,10 @@
|| index( $ua, "ia_archive" ) != -1
|| index( $ua, "zyborg" ) != -1
);
+ $tests->{NETFRONT} = (
+ index( $ua, "playstation 3" ) != -1
+ || index( $ua, "playstation portable" ) != -1
+ );
# Devices
@@ -411,6 +418,8 @@
|| index( $ua, "wap" ) == 0
|| index( $ua, "wapper" ) != -1
|| index( $ua, "zetor" ) != -1 );
+ $tests->{PS3} = ( index( $ua, "playstation 3" ) != -1 );
+ $tests->{PSP} = ( index( $ua, "playstation portable" ) != -1 );
$tests->{MOBILE} = (
index( $ua, "up.browser" ) != -1
@@ -447,6 +456,7 @@
|| index( $ua, "samsung" ) != -1
|| index( $ua, "zetor" ) != -1
|| index( $ua, "android" ) != -1
+ || $tests->{PSP}
);
# Operating System
@@ -587,6 +597,9 @@
$tests->{ANDROID} = ( index( $ua, "android" ) != -1 );
+ $tests->{PS3GAMEOS} = $tests->{PS3} && $tests->{NETFRONT};
+ $tests->{PSPGAMEOS} = $tests->{PSP} && $tests->{NETFRONT};
+
# A final try at browser version, if we haven't gotten it so far
if ( !defined( $major ) || $major eq '' ) {
if ( $ua =~ /[A-Za-z]+\/(\d+)\;/ ) {
@@ -642,6 +655,7 @@
$browser_string = 'IceWeasel' if $self->iceweasel;
$browser_string = 'curl' if $self->curl;
$browser_string = 'puf' if $self->puf;
+ $browser_string = 'NetFront' if $self->netfront;
}
return $browser_string;
}
@@ -665,6 +679,8 @@
$os_string = 'OS2' if $self->os2;
$os_string = 'Unix' if $self->unix && !$self->linux;
$os_string = 'Linux' if $self->linux;
+ $os_string = 'Playstation 3 GameOS' if $self->ps3gameos;
+ $os_string = 'Playstation Portable GameOS' if $self->pspgameos;
}
return $os_string;
}
@@ -805,6 +821,10 @@
return 'MSIE';
}
+ if( $self->netfront ) {
+ return 'NetFront';
+ }
+
return;
}
@@ -891,7 +911,7 @@
my ( $self, $check ) = _self_or_default( @_ );
my @devices = qw(
- blackberry iphone ipod ipad
+ blackberry iphone ipod ipad ps3 psp
);
foreach my $device ( @devices ) {
@@ -910,6 +930,8 @@
iphone => 'iPhone',
ipod => 'iPod',
ipad => 'iPad',
+ psp => 'Sony PlayStation Portable',
+ ps3 => 'Sony PlayStation 3',
);
my $device = $self->device;
@@ -973,7 +995,7 @@
=head1 VERSION
-Version 1.10
+Version 1.11
=head1 SYNOPSIS
@@ -1143,7 +1165,7 @@
Returns one of the following:
-Gecko, KHTML, MSIE
+Gecko, KHTML, MSIE, NetFront
Returns undef if no string can be found.
@@ -1195,6 +1217,10 @@
=head2 amiga()
+=head2 ps3gameos()
+
+=head2 pspgameos()
+
It may not be possibile to detect Win98 in Netscape 4.x and earlier. On Opera
3.0, the userAgent string includes "Windows 95/NT4" on all Win32, so you can't
distinguish between Win95 and WinNT.
@@ -1205,7 +1231,7 @@
compatibility with the L<HTTP::Headers::UserAgent> module.
Win95, Win98, WinNT, Win2K, WinXP, Win2K3, WinVista, Win7, Mac, Mac OS X,
- Win3x, OS2, Unix, Linux
+ Win3x, OS2, Unix, Linux, Playstation 3 GameOS, Playstation Portable GameOS
=head1 Detecting Browser Vendor
@@ -1254,6 +1280,8 @@
=head3 curl
=head3 realplayer
+
+=head3 netfront
Netscape 6, even though its called six, in the userAgent string has version
number 5. The nav6 and nav6up methods correctly handle this quirk. The firefox
@@ -1302,6 +1330,10 @@
=head3 wap
+=head3 psp
+
+=head3 ps3
+
=head2 mobile()
Returns true if the browser appears to belong to a handheld device.
Modified: branches/upstream/libhttp-browserdetect-perl/current/t/useragents.yaml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-browserdetect-perl/current/t/useragents.yaml?rev=58842&op=diff
==============================================================================
--- branches/upstream/libhttp-browserdetect-perl/current/t/useragents.yaml (original)
+++ branches/upstream/libhttp-browserdetect-perl/current/t/useragents.yaml Fri Jun 4 11:32:22 2010
@@ -1366,3 +1366,24 @@
version: 8.0
major: 8
minor: 0
+---
+useragent: Mozilla/4.0 (PSP (PlayStation Portable); 2.00)
+match:
+ - psp
+ - pspgameos
+ - mobile
+ - netfront
+no_match:
+ - netscape
+engine_string: NetFront
+device_name: Sony PlayStation Portable
+---
+useragent: Mozilla/5.0 (PLAYSTATION 3; 2.00)
+match:
+ - ps3
+ - ps3gameos
+ - netfront
+no_match:
+ - netscape
+engine_string: NetFront
+device_name: Sony PlayStation 3
More information about the Pkg-perl-cvs-commits
mailing list