root/lang/perl/HTTP-MobileAttribute/trunk/lib/HTTP/MobileAttribute/Plugin/IS.pm @ 8650

Revision 8650, 1.0 kB (checked in by tokuhirom, 5 years ago)

softbank のテストとおす。

Line 
1package HTTP::MobileAttribute::Plugin::IS;
2use strict;
3use warnings;
4use base qw/Class::Component::Plugin/;
5
6sub is_docomo: Method('is_docomo') {
7    my ($self, $c) = @_;
8    return $c->carrier_longname eq 'DoCoMo' ? 1 : 0;
9}
10
11sub is_j_phone: Method('is_j_phone') {
12    my ($self, $c) = @_;
13    return $c->carrier_longname eq 'ThirdForce' ? 1 : 0;
14}
15
16sub is_vodafone: Method('is_vodafone') {
17    my ($self, $c) = @_;
18    return $c->carrier_longname eq 'ThirdForce' ? 1 : 0;
19}
20
21sub is_softbank: Method('is_softbank') {
22    my ($self, $c) = @_;
23    return $c->carrier_longname eq 'ThirdForce' ? 1 : 0;
24}
25
26sub is_ezweb: Method('is_ezweb') {
27    my ($self, $c) = @_;
28    return $c->carrier_longname eq 'EZweb' ? 1 : 0;
29}
30
31sub is_airh_phone: Method('is_airh_phone') {
32    my ($self, $c) = @_;
33    return $c->carrier_longname eq 'AirHPhone' ? 1 : 0;
34}
35
36sub is_non_mobile: Method('is_non_mobile') {
37    my ($self, $c) = @_;
38    return $c->carrier_longname eq 'NonMobile' ? 1 : 0;
39}
40
411;
Note: See TracBrowser for help on using the browser.