NAME
Plack::Middleware::BrowserDetector - Plack middleware to identify browsers
SYNOPSIS
# in your .psgi
...
builder {
enable 'BrowserDetector';
$app;
}
# in your app
my $browser = $env->{'BrowserDetector.browser'}; # HTTP::BrowserDetect object
# check if browser appears to be mobile device
if ($browser->mobile) {
# ...
}
# check if browser appears to be chrome device
DESCRIPTION
This Plack middleware sets a key in the PSGI environment which is HTTP::BrowserDetect object. The HTTP::BrowserDetect determines Web browser, version, and platform from an HTTP user agent string.
See also: Plack::Middleware::BotDetector, HTTP::BrowserDetect
AUTHOR
Dimitar Petrov <mitakaa@gmail.com>