HTTP::MobileAttribute::Plugin::IS - is_* を定義する


HTTP-MobileAttribute documentation Contained in the HTTP-MobileAttribute distribution.

Index


Code Index:

NAME

Top

HTTP::MobileAttribute::Plugin::IS - is_* を定義する

METHODS

Top

is_docomo

DoCoMo 端末かどうかを判定します。

is_j_phone =item is_vodafone =item is_softbank =item is_thirdforce

SoftBank 端末かどうかを判定します。

is_ezweb

EZweb 端末かどうかを判定します。

is_airh_phone

AirHPhone かどうかを判定します。

is_non_mobile

モバイル端末ではないかどうかを判定します。

AUTHOR

Top

Tokuhiro Matsuno


HTTP-MobileAttribute documentation Contained in the HTTP-MobileAttribute distribution.

package HTTP::MobileAttribute::Plugin::IS;
use strict;
use warnings;
use base qw/HTTP::MobileAttribute::Plugin/;

sub is_docomo: Method {
    my ($self, $c) = @_;
    return $c->carrier_longname eq 'DoCoMo' ? 1 : 0;
}

sub is_j_phone: Method {
    my ($self, $c) = @_;
    return $c->carrier_longname eq 'ThirdForce' ? 1 : 0;
}

sub is_vodafone: Method {
    my ($self, $c) = @_;
    return $c->carrier_longname eq 'ThirdForce' ? 1 : 0;
}

sub is_softbank: Method {
    my ($self, $c) = @_;
    return $c->carrier_longname eq 'ThirdForce' ? 1 : 0;
}

sub is_thirdforce: Method {
    my ($self, $c) = @_;
    return $c->carrier_longname eq 'ThirdForce' ? 1 : 0;
}

sub is_ezweb: Method {
    my ($self, $c) = @_;
    return $c->carrier_longname eq 'EZweb' ? 1 : 0;
}

sub is_airh_phone: Method {
    my ($self, $c) = @_;
    return $c->carrier_longname eq 'AirHPhone' ? 1 : 0;
}

sub is_non_mobile: Method {
    my ($self, $c) = @_;
    return $c->carrier_longname eq 'NonMobile' ? 1 : 0;
}

1;
__END__