The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

HTTP::MobileAgent::Plugin::SmartPhone - Plugin of HTTP::MobileAgent for detecting smartphone

SYNOPSIS

    use HTTP::MobileAgent;
    use HTTP::MobileAgent::Plugin::SmartPhone;

    my $agent = HTTP::MobileAgent->new;
    if ($agent->is_smartphone) {
        if ($agent->is_ios) {
            if ($agent->is_iphone) {
                ...
            }
            elsif ($agent->is_ipod) {
                ...
            }
            elsif ($agent->is_ipad) {
                ...
            }
        }
        elsif ($agent->is_android) {
            if ($agent->is_android_tablet) {
                ...
            }
            else {
                ...
            }
        }
    }
    $agent->ios_version;      # eg. 5
    $agent->ios_full_version; # eg. 5_0_1

DESCRIPTION

HTTP::MobileAgent::Plugin::SmartPhone is a plugin of HTTP::MobileAgent for detecting smartphone.

METHODS

is_smartphone

True if ios or android.

is_ios

Checking iOS or not. Including iPhone, iPod and iPad.

is_iphone
is_ipod
is_ipad
ios_version

iOS major version. ex. 5. undef unless iOS.

ios_full_version

iOS full version. ex. 5_0_1. undef unless iOS.

is_android
is_android_tablet

experimental.

is_tablet

experimental.

AUTHOR

Masayuki Matsuki <y.songmu@gmail.com>

SEE ALSO

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.