|
Revision 8650, 1.0 kB
(checked in by tokuhirom, 5 years ago)
|
|
softbank のテストとおす。
|
| Line | |
|---|
| 1 | package HTTP::MobileAttribute::Plugin::IS; |
|---|
| 2 | use strict; |
|---|
| 3 | use warnings; |
|---|
| 4 | use base qw/Class::Component::Plugin/; |
|---|
| 5 | |
|---|
| 6 | sub is_docomo: Method('is_docomo') { |
|---|
| 7 | my ($self, $c) = @_; |
|---|
| 8 | return $c->carrier_longname eq 'DoCoMo' ? 1 : 0; |
|---|
| 9 | } |
|---|
| 10 | |
|---|
| 11 | sub is_j_phone: Method('is_j_phone') { |
|---|
| 12 | my ($self, $c) = @_; |
|---|
| 13 | return $c->carrier_longname eq 'ThirdForce' ? 1 : 0; |
|---|
| 14 | } |
|---|
| 15 | |
|---|
| 16 | sub is_vodafone: Method('is_vodafone') { |
|---|
| 17 | my ($self, $c) = @_; |
|---|
| 18 | return $c->carrier_longname eq 'ThirdForce' ? 1 : 0; |
|---|
| 19 | } |
|---|
| 20 | |
|---|
| 21 | sub is_softbank: Method('is_softbank') { |
|---|
| 22 | my ($self, $c) = @_; |
|---|
| 23 | return $c->carrier_longname eq 'ThirdForce' ? 1 : 0; |
|---|
| 24 | } |
|---|
| 25 | |
|---|
| 26 | sub is_ezweb: Method('is_ezweb') { |
|---|
| 27 | my ($self, $c) = @_; |
|---|
| 28 | return $c->carrier_longname eq 'EZweb' ? 1 : 0; |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | sub is_airh_phone: Method('is_airh_phone') { |
|---|
| 32 | my ($self, $c) = @_; |
|---|
| 33 | return $c->carrier_longname eq 'AirHPhone' ? 1 : 0; |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | sub is_non_mobile: Method('is_non_mobile') { |
|---|
| 37 | my ($self, $c) = @_; |
|---|
| 38 | return $c->carrier_longname eq 'NonMobile' ? 1 : 0; |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | 1; |
|---|