line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
=head1 NAME |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
Unicode::Emoji::Google - Emoji for Google and cross-mapping table |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 SYNOPSIS |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
use Unicode::Emoji::E4U; |
8
|
|
|
|
|
|
|
my $e4u = Unicode::Emoji::E4U->new; |
9
|
|
|
|
|
|
|
my $google = $e4u->google; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my $e; |
12
|
|
|
|
|
|
|
$e = $google->list->[0]; |
13
|
|
|
|
|
|
|
$e = $google->find(unicode => 'E04A'); |
14
|
|
|
|
|
|
|
print "id: ", $e->id, "\n"; |
15
|
|
|
|
|
|
|
print "name: ", $e->name, "\n"; |
16
|
|
|
|
|
|
|
print "desc: ", $e->desc, "\n"; |
17
|
|
|
|
|
|
|
print "text_fallback: ", $e->text_fallback, "\n"; |
18
|
|
|
|
|
|
|
print "in_proposal: ", $e->in_proposal, "\n"; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
my $de = $e->docomo_emoji; # Unicode::Emoji::DoCoMo::Emoji |
21
|
|
|
|
|
|
|
my $ke = $e->kddi_emoji; # Unicode::Emoji::KDDI::Emoji |
22
|
|
|
|
|
|
|
my $se = $e->softbank_emoji; # Unicode::Emoji::SoftBank::Emoji |
23
|
|
|
|
|
|
|
my $ge = $e->google_emoji; # Unicode::Emoji::Google::Emoji |
24
|
|
|
|
|
|
|
my $ue = $e->unicode_emoji; # Unicode::Emoji::Unicode::Emoji |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
print "is_alt: ", $ge->is_alt, "\n"; |
27
|
|
|
|
|
|
|
print "unicode_string: ", $ge->unicode_string, "\n"; |
28
|
|
|
|
|
|
|
print "unicode_octets: ", $ge->unicode_octets, "\n"; |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 DEFINITION |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
L |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 AUTHOR |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Yusuke Kawasaki, L |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SEE ALSO |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
L |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
L |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
L |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
L |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 COPYRIGHT |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Copyright 2009 Yusuke Kawasaki, all rights reserved. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
package Unicode::Emoji::Google; |
55
|
7
|
|
|
7
|
|
4465
|
use Unicode::Emoji::Base; |
|
7
|
|
|
|
|
1440
|
|
|
7
|
|
|
|
|
512
|
|
56
|
7
|
|
|
7
|
|
5436
|
use Unicode::Emoji::DoCoMo; |
|
7
|
|
|
|
|
851
|
|
|
7
|
|
|
|
|
285
|
|
57
|
7
|
|
|
7
|
|
4966
|
use Unicode::Emoji::KDDI; |
|
7
|
|
|
|
|
675
|
|
|
7
|
|
|
|
|
338
|
|
58
|
7
|
|
|
7
|
|
5541
|
use Unicode::Emoji::SoftBank; |
|
7
|
|
|
|
|
685
|
|
|
7
|
|
|
|
|
288
|
|
59
|
7
|
|
|
7
|
|
59
|
use Unicode::Emoji::Google; |
|
7
|
|
|
|
|
14
|
|
|
7
|
|
|
|
|
169
|
|
60
|
7
|
|
|
7
|
|
33
|
use Any::Moose; |
|
7
|
|
|
|
|
13
|
|
|
7
|
|
|
|
|
76
|
|
61
|
|
|
|
|
|
|
extends 'Unicode::Emoji::Base::File'; |
62
|
|
|
|
|
|
|
has list => (is => 'ro', isa => 'ArrayRef', lazy_build => 1); |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
65
|
|
|
|
|
|
|
|
66
|
1
|
|
|
1
|
|
10
|
sub _dataxml { 'emoji4unicode.xml'; } |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub _build_list { |
69
|
1
|
|
|
1
|
|
113
|
my $self = shift; |
70
|
1
|
|
|
|
|
3
|
my $list = []; |
71
|
1
|
|
|
|
|
2
|
foreach my $category (@{$self->root->category}) { |
|
1
|
|
|
|
|
15
|
|
72
|
8
|
|
|
|
|
11
|
foreach my $subcategory (@{$category->subcategory}) { |
|
8
|
|
|
|
|
33
|
|
73
|
103
|
|
|
|
|
117
|
push( @$list, @{$subcategory->e} ); |
|
103
|
|
|
|
|
544
|
|
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
} |
76
|
1
|
|
|
|
|
16
|
$list; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
package Unicode::Emoji::Google::XML::emoji4unicode; |
80
|
7
|
|
|
7
|
|
12013
|
use Any::Moose; |
|
7
|
|
|
|
|
21
|
|
|
7
|
|
|
|
|
41
|
|
81
|
|
|
|
|
|
|
has category => (is => 'ro', isa => 'Unicode::Emoji::Google::XML::category'); |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
package Unicode::Emoji::Google::XML::category; |
84
|
7
|
|
|
7
|
|
4060
|
use Any::Moose; |
|
7
|
|
|
|
|
22
|
|
|
7
|
|
|
|
|
35
|
|
85
|
|
|
|
|
|
|
has subcategory => (is => 'ro', isa => 'Unicode::Emoji::Google::XML::subcategory'); |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
package Unicode::Emoji::Google::XML::subcategory; |
88
|
7
|
|
|
7
|
|
4443
|
use Any::Moose; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
32
|
|
89
|
|
|
|
|
|
|
has e => (is => 'ro', isa => 'Unicode::Emoji::Google::XML::e'); |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
package Unicode::Emoji::Google::XML::e; |
92
|
7
|
|
|
7
|
|
3698
|
use Any::Moose; |
|
7
|
|
|
|
|
16
|
|
|
7
|
|
|
|
|
32
|
|
93
|
|
|
|
|
|
|
has docomo => (is => 'ro', isa => 'Str'); |
94
|
|
|
|
|
|
|
has google => (is => 'ro', isa => 'Str'); |
95
|
|
|
|
|
|
|
has id => (is => 'ro', isa => 'Str'); |
96
|
|
|
|
|
|
|
has kddi => (is => 'ro', isa => 'Str'); |
97
|
|
|
|
|
|
|
has name => (is => 'ro', isa => 'Str'); |
98
|
|
|
|
|
|
|
has softbank => (is => 'ro', isa => 'Str'); |
99
|
|
|
|
|
|
|
has unicode => (is => 'ro', isa => 'Str'); |
100
|
|
|
|
|
|
|
has desc => (is => 'ro', isa => 'Str'); |
101
|
|
|
|
|
|
|
has glyphRefID => (is => 'ro', isa => 'Str'); |
102
|
|
|
|
|
|
|
has ann => (is => 'ro', isa => 'Str'); |
103
|
|
|
|
|
|
|
has img_from => (is => 'ro', isa => 'Str'); |
104
|
|
|
|
|
|
|
has text_fallback => (is => 'ro', isa => 'Str'); |
105
|
|
|
|
|
|
|
has in_proposal => (is => 'ro', isa => 'Str'); |
106
|
|
|
|
|
|
|
has text_repr => (is => 'ro', isa => 'Str'); |
107
|
|
|
|
|
|
|
has prop => (is => 'ro', isa => 'Str'); |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
has docomo_emoji => (is => 'ro', isa => 'Unicode::Emoji::Base::Emoji', lazy_build => 1); |
110
|
|
|
|
|
|
|
has kddi_emoji => (is => 'ro', isa => 'Unicode::Emoji::Base::Emoji', lazy_build => 1); |
111
|
|
|
|
|
|
|
has softbank_emoji => (is => 'ro', isa => 'Unicode::Emoji::Base::Emoji', lazy_build => 1); |
112
|
|
|
|
|
|
|
has google_emoji => (is => 'ro', isa => 'Unicode::Emoji::Base::Emoji', lazy_build => 1); |
113
|
|
|
|
|
|
|
has unicode_emoji => (is => 'ro', isa => 'Unicode::Emoji::Base::Emoji', lazy_build => 1); |
114
|
|
|
|
|
|
|
has kddiweb_emoji => (is => 'ro', isa => 'Unicode::Emoji::Base::Emoji', lazy_build => 1); |
115
|
|
|
|
|
|
|
|
116
|
1
|
50
|
|
1
|
|
46
|
sub _build_docomo_emoji { $_[0]->docomo && Unicode::Emoji::DoCoMo::Emoji->new(unicode_hex => $_[0]->docomo) }; |
117
|
1
|
50
|
|
1
|
|
170
|
sub _build_kddi_emoji { $_[0]->kddi && Unicode::Emoji::KDDI::Emoji->new(unicode_hex => $_[0]->kddi) }; |
118
|
1
|
50
|
|
1
|
|
155
|
sub _build_softbank_emoji { $_[0]->softbank && Unicode::Emoji::SoftBank::Emoji->new(unicode_hex => $_[0]->softbank) }; |
119
|
1
|
50
|
|
1
|
|
117
|
sub _build_google_emoji { $_[0]->google && Unicode::Emoji::Google::Emoji->new(unicode_hex => $_[0]->google) }; |
120
|
1
|
50
|
|
1
|
|
91
|
sub _build_unicode_emoji { $_[0]->unicode && Unicode::Emoji::Unicode::Emoji->new(unicode_hex => $_[0]->unicode) }; |
121
|
0
|
0
|
|
0
|
|
|
sub _build_kddiweb_emoji { $_[0]->kddi && Unicode::Emoji::KDDIweb::Emoji->fromKDDI($_[0]->kddi_emoji) }; |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
package Unicode::Emoji::Google::Emoji; |
124
|
7
|
|
|
7
|
|
20690
|
use Any::Moose; |
|
7
|
|
|
|
|
65
|
|
|
7
|
|
|
|
|
43
|
|
125
|
|
|
|
|
|
|
extends 'Unicode::Emoji::Base::Emoji'; |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
package Unicode::Emoji::Unicode::Emoji; |
128
|
7
|
|
|
7
|
|
3566
|
use Any::Moose; |
|
7
|
|
|
|
|
17
|
|
|
7
|
|
|
|
|
30
|
|
129
|
|
|
|
|
|
|
extends 'Unicode::Emoji::Base::Emoji'; |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |