Plack::Middleware::BrowserDetector - Plack middleware to identify browsers
# in your .psgi ... builder { enable 'BrowserDetector'; $app; } # and after that in your aplication 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 if ($browser->chrome) { }
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
Dimitar Petrov <mitakaa@gmail.com>
To install Plack::Middleware::BrowserDetector, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack::Middleware::BrowserDetector
CPAN shell
perl -MCPAN -e shell install Plack::Middleware::BrowserDetector
For more information on module installation, please visit the detailed CPAN module installation guide.