line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTTP::MobileAgent::Plugin::RoamingZone; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
110715
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
55
|
|
4
|
2
|
|
|
2
|
|
10
|
use strict; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
51
|
|
5
|
2
|
|
|
2
|
|
9
|
use Carp; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
166
|
|
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
2105
|
use version; our $VERSION = qv('0.0.3'); |
|
2
|
|
|
|
|
4355
|
|
|
2
|
|
|
|
|
11
|
|
8
|
2
|
|
|
2
|
|
2001
|
use HTTP::MobileAgent; |
|
2
|
|
|
|
|
44130
|
|
|
2
|
|
|
|
|
72
|
|
9
|
2
|
|
|
2
|
|
901
|
use Mobile::Data::ITU; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use Mobile::Data::SID; |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
########################################## |
13
|
|
|
|
|
|
|
# Base Module |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
package # hide from PAUSE |
16
|
|
|
|
|
|
|
HTTP::MobileAgent; |
17
|
|
|
|
|
|
|
use Mobile::Data::ITU; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub zone_code { $_[0]->_zone_code || '440' } |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub _zone_code {} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub zone_name { |
24
|
|
|
|
|
|
|
my $ret = $_[0]->_zone_name; |
25
|
|
|
|
|
|
|
unless ( $ret ) { |
26
|
|
|
|
|
|
|
my $code = $_[0]->zone_code; |
27
|
|
|
|
|
|
|
$ret = itu2country($code) if ($code =~ /^\d+$/); |
28
|
|
|
|
|
|
|
$ret = 'Unknown' unless ($ret); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
$ret; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub _zone_name {} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
sub is_oversea { $_[0]->zone_name eq 'Japan' ? 0 : 1 } |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
########################################## |
39
|
|
|
|
|
|
|
# DoCoMo Module |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
package # hide from PAUSE |
42
|
|
|
|
|
|
|
HTTP::MobileAgent::DoCoMo; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub _zone_code { |
45
|
|
|
|
|
|
|
my $ret = $_[0]->get_header('x-dcmroaming'); |
46
|
|
|
|
|
|
|
$ret =~ s/^.*(\d{3}).*$/$1/ if ( $ret ); |
47
|
|
|
|
|
|
|
$ret; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
########################################## |
51
|
|
|
|
|
|
|
# EZWeb Module |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
package # hide from PAUSE |
54
|
|
|
|
|
|
|
HTTP::MobileAgent::EZweb; |
55
|
|
|
|
|
|
|
use Mobile::Data::SID; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub _zone_code { $_[0]->get_header('x-up-devcap-zone') || 12304 } |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub _zone_name { sid2country( $_[0]->zone_code ) } |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
########################################## |
62
|
|
|
|
|
|
|
# SoftBank Module |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
package # hide from PAUSE |
65
|
|
|
|
|
|
|
HTTP::MobileAgent::Vodafone; |
66
|
|
|
|
|
|
|
use Mobile::Data::ITU; |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub _zone_code { $_[0]->get_header('x-jphone-region') } |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
#sub _zone_name {'Japan' if ( $_[0]->zone_code eq '44020' ) } |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
1; # Magic true value required at end of module |
74
|
|
|
|
|
|
|
__END__ |