| Egg-Release documentation | view source | Contained in the Egg-Release distribution. |
Egg::Plugin::HTTP::BrowserDetect - Plugin for HTTP::BrowserDetect.
use Egg qw/ HTTP::BrowserDetect /;
if ($e->browser->windows) {
# OS is Windows.
} elsif ($e->browser->mac) {
# OS is Macintosh.
} elsif ($e->browser->unix) {
# OS is Unix.
} else {
# Other OS.
}
Information on a browser etc. that the client uses is examined.
see HTTP::BrowserDetect.
The object of HTTP::BrowserDetect is returned.
It is not necessary usually though USER_AGENT can be passed to the argument.
my $browser= $e->browser;
Masatoshi Mizuno <lushe&64;cpan.org>
Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.
| Egg-Release documentation | view source | Contained in the Egg-Release distribution. |