line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Pictogram::MobileJp::EmojiNumber; |
2
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
68
|
|
3
|
2
|
|
|
2
|
|
8
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
46
|
|
4
|
2
|
|
|
2
|
|
30
|
use 5.00800; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
71
|
|
5
|
2
|
|
|
2
|
|
1481
|
use HTML::Pictogram::MobileJp::EmojiNumber::Map; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
540
|
|
6
|
2
|
|
|
2
|
|
1451
|
use HTML::Pictogram::MobileJp::Util qw/is_iphone/; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
1190
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub convert { |
9
|
7
|
|
|
7
|
0
|
21
|
my ( $class, $ma, $html ) = @_; |
10
|
|
|
|
|
|
|
|
11
|
7
|
|
|
|
|
65
|
$html =~ s{\[emoji:(\d+)\]}{ |
12
|
7
|
100
|
100
|
|
|
48
|
if ($ma->is_docomo) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
13
|
2
|
|
|
|
|
18
|
my $i = $DOCOMO->{$1}; |
14
|
2
|
|
|
|
|
9
|
"$i;"; |
15
|
|
|
|
|
|
|
} elsif ($ma->is_softbank || is_iphone($ma->user_agent)) { |
16
|
3
|
|
|
|
|
56
|
my $s = $SOFTBANK->{$1}; |
17
|
3
|
100
|
|
|
|
54
|
if ($s =~ /^\w+$/) { |
18
|
2
|
|
|
|
|
11
|
"$s;"; |
19
|
|
|
|
|
|
|
} else { |
20
|
1
|
|
|
|
|
5
|
$s; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
} elsif ($ma->is_ezweb) { |
23
|
1
|
|
|
|
|
7
|
my $e = $EZWEB->{$1}; |
24
|
1
|
50
|
|
|
|
7
|
if ($e =~ /^[0-9]+$/) { |
25
|
1
|
|
|
|
|
8
|
sprintf '', $e; |
26
|
|
|
|
|
|
|
} else { |
27
|
0
|
|
|
|
|
0
|
$e; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
} else { |
30
|
|
|
|
|
|
|
# non-mobile |
31
|
1
|
|
|
|
|
10
|
"[emoji:$1]"; |
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
}ge; |
34
|
|
|
|
|
|
|
|
35
|
7
|
|
|
|
|
57
|
$html; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
__END__ |