Subject: | doesn't detect palm pre |
Mozilla/5.0 (webOS/1.0; U; en-US
) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1
Pre/1.0
--- HTTP-BrowserDetect-1.18/lib/HTTP/BrowserDetect.pm 2010-09-06
19:18:05.000000000 -0500
+++ HTTP-BrowserDetect-1.18.new/lib/HTTP/BrowserDetect.pm 2010-09-17
15:54:56.934631984 -0500
@@ -37,7 +37,7 @@
palm audrey iopener
wap blackberry iphone
ipod ipad ps3
- psp kindle
+ psp kindle webos
);
# Browsers
@@ -451,6 +451,7 @@
$tests->{BLACKBERRY} = ( index( $ua, "blackberry" ) != -1 );
$tests->{IPHONE} = ( index( $ua, "iphone" ) != -1 );
+ $tests->{WEBOS} = ( index( $ua, "webos" ) != -1 );
$tests->{IPOD} = ( index( $ua, "ipod" ) != -1 );
$tests->{IPAD} = ( index( $ua, "ipad" ) != -1 );
$tests->{KINDLE} = ( index( $ua, "kindle" ) != -1 );
@@ -992,7 +993,7 @@
my ( $self, $check ) = _self_or_default( @_ );
my @devices = qw(
- blackberry iphone ipod ipad ps3 psp
+ blackberry iphone ipod ipad ps3 psp webos
);
foreach my $device ( @devices ) {
@@ -1013,6 +1014,7 @@
ipad => 'iPad',
psp => 'Sony PlayStation Portable',
ps3 => 'Sony PlayStation 3',
+ webos => 'webOS',
);
my $device = $self->device;
@@ -1164,7 +1166,7 @@
=head2 device()
Returns the method name of the actual hardware, if it can be detected.
-Currently returns one of: blackberry, iphone, ipod or ipad Returns
UNDEF if
+Currently returns one of: blackberry, webos, iphone, ipod or ipad
Returns UNDEF if
no hardware can be detected
=head2 device_name()
@@ -1408,6 +1410,8 @@
=head3 palm
+=head3 webos
+
=head3 wap
=head3 psp
Only in HTTP-BrowserDetect-1.18.new/: pm_to_blib
diff -ur HTTP-BrowserDetect-1.18/t/useragents.yaml
HTTP-BrowserDetect-1.18.new/t/useragents.yaml
--- HTTP-BrowserDetect-1.18/t/useragents.yaml 2010-09-06
19:18:05.000000000 -0500
+++ HTTP-BrowserDetect-1.18.new/t/useragents.yaml 2010-09-17
15:57:11.366631655 -0500
@@ -2148,4 +2148,15 @@
public_version: 4.0
public_major: 4
public_minor: 0
+---
+useragent: 'Mozilla/5.0 (webOS/1.0; U; en-US) AppleWebKit/525.27.1
(KHTML, like Gecko) Version/1.0 Safari/525.27.1 Pre/1.0'
+language: EN
+country: US
+match:
+ - safari
+ - mobile
+ - webos
+engine_string: KHTML
+device: webos
+device_name: webOS