blib/lib/ShiftJIS/Collate.pm

filter: Statementstmt 96.0% 144 / 150 Branchbran 80.3% 98 / 122 Conditioncond 73.9% 51 / 69 MC/DCmcdc 36.5% 15 / 41 Subroutinesub 91.6% 22 / 24 Podpod 75.0% 12 / 16 totaltotal 81.0% 342 / 422 CC 91 SCAR 26.6
CC
91
Cov
86%
index
32.7
_replaced
15.4
getWt
15.1
CRAP 14.3
↑ Summary
1 package ShiftJIS::Collate;
2  
3 5 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use vars qw($VERSION $PACKAGE @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 5 $VERSION = '1.10';
8  
9 5 $PACKAGE = 'ShiftJIS::Collate'; # __PACKAGE__
10  
11 5 my $Level = 4;
12 5 my $Kanji = 2;
13  
14 105 ▶sub new {
Subroutine new: called CC=7 SCAR=20.1
Pod undocumented
15 105 my $class = shift;
16 105 my $self = bless { @_ }, $class;
17  
18 105 ▶ $self->{level} ||= $Level;
Condition66%2/3
$self->{"level"} ||= $Level
l!l&&r!l&&!r
92130
MC/DC0%0/2
$self->{"level"} ||= $Level
$self->{"level"} $Level
Truth table66%2/3
A ||= B
A= $self->{"level"}B= $Level
ABresult
1X1
011
000
19 105 ▶ $self->{kanji} ||= $Kanji;
Condition66%2/3
$self->{"kanji"} ||= $Kanji
l!l&&r!l&&!r
20850
MC/DC0%0/2
$self->{"kanji"} ||= $Kanji
$self->{"kanji"} $Kanji
Truth table66%2/3
A ||= B
A= $self->{"kanji"}B= $Kanji
ABresult
1X1
011
000
20  
21 105 ▶ if ($self->{kanji} == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{"kanji"} == 3) 4 101 105
22 croak qq|$PACKAGE "tounicode" coderef is not defined|
23 4 ▶ unless $self->{tounicode} && ref($self->{tounicode}) eq 'CODE';
Branch: 1 branch
BranchTrueFalseTotal
unless $self->{"tounicode"} and ref $self->{"tounicode"} eq "CODE" 0 4 4
Condition33%1/3
$self->{"tounicode"} and ref $self->{"tounicode"} eq "CODE"
!ll&&!rl&&r
004
MC/DC0%0/2
$self->{"tounicode"} and ref $self->{"tounicode"} eq "CODE"
$self->{"tounicode"} ref $self->{"tounicode"} eq "CODE"
Truth table33%1/3
A and B
A= $self->{"tounicode"}B= ref $self->{"tounicode"} eq "CODE"
ABresult
0X0
100
111
24 }
25 105 ▶ if (exists $self->{overrideCJK}) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->{"overrideCJK"}) 1 104 105
26 1 croak qq|$PACKAGE : Sorry, "overrideCJK" is obsolete.|;
27 }
28 104 return $self;
29 }
30  
31  
32 5 my $Char = '[\xB3\xB6-\xC4]\xDE|[\xCA-\xCE][\xDE\xDF]|'
33 . '[\x00-\x7F\xA1-\xDF]|[\x81-\x9F\xE0-\xFC][\x40-\x7E\x80-\xFC]';
34  
35 5 my $CJK = '\x88[\x9F-\xFC]|\x98[\x40-\x72\x9F-\xFC]|'
36 . '[\x89-\x97\x99-\x9F\xE0-\xE9][\x40-\x7E\x80-\xFC]|'
37 . '\xEA[\x40-\x7E\x80-\xA4]';
38  
39  
40 #
41 # 1st weights
42 #
43 # /[\x41-\xFF]{2}/
44 #
45 # 2nd weights
46 # "\x32" : unaffected
47 # "\x33" : normal latin
48 # "\x34" : voiceless kana
49 # "\x35" : voiced kana
50 # "\x36" : semivoiced kana
51 #
52 # 3rd weights
53 # "\x14" : unaffected
54 # "\x15" : lower latin
55 # "\x16" : upper latin
56 # "\x1a" : prolonged kana
57 # "\x1b" : small kana
58 # "\x1c" : iteration kana
59 # "\x1d" : normal kana
60 #
61 # 4th weights
62 # "\x0a" : unaffected
63 # "\x10" : hiragana
64 # "\x11" : katakana
65 #
66 # 5th weights
67 # "\x01" : unaffected
68 # "\x02" : normal ascii
69 # "\x03" : normal kana
70 # "\x04" : compat kana
71 # "\x05" : compat ascii
72 #
73 5 my %Order = (
74  
75 ' ' => "\x70\x41\x32\x14\x0a\x01",
76 '@' => "\x70\x42\x32\x14\x0a\x01",
77 'A' => "\x71\x41\x32\x14\x0a\x03",
78 '¤' => "\x71\x41\x32\x14\x0a\x04",
79 'B' => "\x71\x42\x32\x14\x0a\x03",
80 '¡' => "\x71\x42\x32\x14\x0a\x04",
81 ',' => "\x71\x43\x32\x14\x0a\x02",
82 'C' => "\x71\x43\x32\x14\x0a\x05",
83 '.' => "\x71\x44\x32\x14\x0a\x02",
84 'D' => "\x71\x44\x32\x14\x0a\x05",
85 'E' => "\x71\x45\x32\x14\x0a\x03",
86 '¥' => "\x71\x45\x32\x14\x0a\x04",
87 ':' => "\x71\x46\x32\x14\x0a\x02",
88 'F' => "\x71\x46\x32\x14\x0a\x05",
89 ';' => "\x71\x47\x32\x14\x0a\x02",
90 'G' => "\x71\x47\x32\x14\x0a\x05",
91 '?' => "\x71\x48\x32\x14\x0a\x02",
92 'H' => "\x71\x48\x32\x14\x0a\x05",
93 '!' => "\x71\x49\x32\x14\x0a\x02",
94 'I' => "\x71\x49\x32\x14\x0a\x05",
95 'L' => "\x71\x4a\x32\x14\x0a\x01",#added
96 '`' => "\x71\x4b\x32\x14\x0a\x02",#added
97 'M' => "\x71\x4b\x32\x14\x0a\x05",#added
98 'N' => "\x71\x4c\x32\x14\x0a\x01",#added
99 '^' => "\x71\x4d\x32\x14\x0a\x02",#added
100 'O' => "\x71\x4d\x32\x14\x0a\x05",#added
101 '~' => "\x71\x4e\x32\x14\x0a\x02",
102 'P' => "\x71\x4e\x32\x14\x0a\x05",
103 '_' => "\x71\x4f\x32\x14\x0a\x02",
104 'Q' => "\x71\x4f\x32\x14\x0a\x05",
105 (qw/\ /)[0]
106 => "\x71\x50\x32\x14\x0a\x01",
107 ']' => "\x71\x51\x32\x14\x0a\x01",
108 '/' => "\x71\x52\x32\x14\x0a\x02",
109 '^' => "\x71\x52\x32\x14\x0a\x05",
110 '_' => "\x71\x53\x32\x14\x0a\x01",
111 '`' => "\x71\x54\x32\x14\x0a\x01",
112 'a' => "\x71\x55\x32\x14\x0a\x01",
113 '|' => "\x71\x56\x32\x14\x0a\x02",
114 'b' => "\x71\x56\x32\x14\x0a\x05",
115 'c' => "\x71\x57\x32\x14\x0a\x01",
116 'd' => "\x71\x58\x32\x14\x0a\x01",
117 q|e|=> "\x72\x41\x32\x14\x0a\x01",
118 q|f|=> "\x72\x42\x32\x14\x0a\x01",
119 q|'| => "\x72\x43\x32\x14\x0a\x01",#added
120 q|g|=> "\x72\x44\x32\x14\x0a\x01",
121 q|h|=> "\x72\x45\x32\x14\x0a\x01",
122 q|"| => "\x72\x46\x32\x14\x0a\x01",#added
123 '(' => "\x72\x47\x32\x14\x0a\x02",
124 'i' => "\x72\x47\x32\x14\x0a\x05",
125 ')' => "\x72\x48\x32\x14\x0a\x02",
126 'j' => "\x72\x48\x32\x14\x0a\x05",
127 'k' => "\x72\x49\x32\x14\x0a\x01",
128 'l' => "\x72\x4a\x32\x14\x0a\x01",
129 '[' => "\x72\x4b\x32\x14\x0a\x02",
130 'm' => "\x72\x4b\x32\x14\x0a\x05",
131 ']' => "\x72\x4c\x32\x14\x0a\x02",
132 'n' => "\x72\x4c\x32\x14\x0a\x05",
133 '{' => "\x72\x4d\x32\x14\x0a\x02",
134 'o' => "\x72\x4d\x32\x14\x0a\x05",
135 '}' => "\x72\x4e\x32\x14\x0a\x02",
136 'p' => "\x72\x4e\x32\x14\x0a\x05",
137 'q' => "\x72\x4f\x32\x14\x0a\x01",
138 'r' => "\x72\x50\x32\x14\x0a\x01",
139 's' => "\x72\x51\x32\x14\x0a\x01",
140 't' => "\x72\x52\x32\x14\x0a\x01",
141 'u' => "\x72\x53\x32\x14\x0a\x03",
142 '¢' => "\x72\x53\x32\x14\x0a\x04",
143 'v' => "\x72\x54\x32\x14\x0a\x03",
144 '£' => "\x72\x54\x32\x14\x0a\x04",
145 'w' => "\x72\x55\x32\x14\x0a\x01",
146 'x' => "\x72\x56\x32\x14\x0a\x01",
147 'y' => "\x72\x57\x32\x14\x0a\x01",
148 'z' => "\x72\x58\x32\x14\x0a\x01",
149 '+' => "\x73\x41\x32\x14\x0a\x02",
150 '{' => "\x73\x41\x32\x14\x0a\x05",
151 '-' => "\x73\x42\x32\x14\x0a\x01",#added
152 '|' => "\x73\x43\x32\x14\x0a\x01",
153 '}' => "\x73\x44\x32\x14\x0a\x01",
154 '~' => "\x73\x45\x32\x14\x0a\x01",
155 '€' => "\x73\x46\x32\x14\x0a\x01",
156 '=' => "\x73\x47\x32\x14\x0a\x02",
157 '' => "\x73\x47\x32\x14\x0a\x05",
158 '‚' => "\x73\x48\x32\x14\x0a\x01",
159 '<' => "\x73\x49\x32\x14\x0a\x02",
160 'ƒ' => "\x73\x49\x32\x14\x0a\x05",
161 '>' => "\x73\x4a\x32\x14\x0a\x02",
162 '„' => "\x73\x4a\x32\x14\x0a\x05",
163 '…' => "\x73\x4b\x32\x14\x0a\x01",
164 '†' => "\x73\x4c\x32\x14\x0a\x01",
165 'à' => "\x73\x4d\x32\x14\x0a\x01",
166 'á' => "\x73\x4e\x32\x14\x0a\x01",
167 'â' => "\x73\x4f\x32\x14\x0a\x01",
168 'å' => "\x73\x50\x32\x14\x0a\x01",
169 '‡' => "\x73\x51\x32\x14\x0a\x01",
170 'Ý' => "\x73\x52\x32\x14\x0a\x01",
171 'Þ' => "\x73\x53\x32\x14\x0a\x01",
172 'ã' => "\x73\x54\x32\x14\x0a\x01",
173 'ç' => "\x73\x55\x32\x14\x0a\x01",
174 'è' => "\x73\x56\x32\x14\x0a\x01",
175 'Ú' => "\x73\x57\x32\x14\x0a\x01",
176 'Û' => "\x73\x58\x32\x14\x0a\x01",
177 'Ü' => "\x73\x59\x32\x14\x0a\x01",
178 'ß' => "\x73\x5a\x32\x14\x0a\x01",
179 'ä' => "\x73\x5b\x32\x14\x0a\x01",
180 '¸' => "\x73\x5c\x32\x14\x0a\x01",
181 '¹' => "\x73\x5d\x32\x14\x0a\x01",
182 'º' => "\x73\x5e\x32\x14\x0a\x01",
183 '»' => "\x73\x5f\x32\x14\x0a\x01",
184 '¼' => "\x73\x60\x32\x14\x0a\x01",
185 '½' => "\x73\x61\x32\x14\x0a\x01",
186 '¾' => "\x73\x62\x32\x14\x0a\x01",
187 '¿' => "\x73\x63\x32\x14\x0a\x01",
188 'È' => "\x73\x64\x32\x14\x0a\x01",
189 'É' => "\x73\x65\x32\x14\x0a\x01",
190 'Ê' => "\x73\x66\x32\x14\x0a\x01",
191 'Ë' => "\x73\x67\x32\x14\x0a\x01",
192 'Ì' => "\x73\x68\x32\x14\x0a\x01",
193 'Í' => "\x73\x69\x32\x14\x0a\x01",
194 'Î' => "\x73\x6a\x32\x14\x0a\x01",
195 'ˆ' => "\x73\x6b\x32\x14\x0a\x01",
196 'æ' => "\x73\x6c\x32\x14\x0a\x01",
197 '‰' => "\x73\x6d\x32\x14\x0a\x01",
198 'Š' => "\x73\x6e\x32\x14\x0a\x01",
199 '#' => "\x74\x41\x32\x14\x0a\x02",
200 '”' => "\x74\x41\x32\x14\x0a\x05",
201 '&' => "\x74\x42\x32\x14\x0a\x02",
202 '•' => "\x74\x42\x32\x14\x0a\x05",
203 '*' => "\x74\x43\x32\x14\x0a\x02",
204 '–' => "\x74\x43\x32\x14\x0a\x05",
205 '@' => "\x74\x44\x32\x14\x0a\x02",
206 '—' => "\x74\x44\x32\x14\x0a\x05",
207 '˜' => "\x74\x45\x32\x14\x0a\x01",
208 '÷' => "\x74\x46\x32\x14\x0a\x01",
209 '¦' => "\x74\x47\x32\x14\x0a\x01",
210 'õ' => "\x74\x48\x32\x14\x0a\x01",
211 'ö' => "\x74\x49\x32\x14\x0a\x01",
212 '™' => "\x74\x4a\x32\x14\x0a\x01",
213 'š' => "\x74\x4b\x32\x14\x0a\x01",
214 '›' => "\x74\x4c\x32\x14\x0a\x01",
215 'œ' => "\x74\x4d\x32\x14\x0a\x01",
216 '' => "\x74\x4e\x32\x14\x0a\x01",
217 'ž' => "\x74\x4f\x32\x14\x0a\x01",
218 'Ÿ' => "\x74\x50\x32\x14\x0a\x01",
219 ' ' => "\x74\x51\x32\x14\x0a\x01",
220 '¡' => "\x74\x52\x32\x14\x0a\x01",
221 '¢' => "\x74\x53\x32\x14\x0a\x01",
222 '£' => "\x74\x54\x32\x14\x0a\x01",
223 '¤' => "\x74\x55\x32\x14\x0a\x01",
224 '¥' => "\x74\x56\x32\x14\x0a\x01",
225 '§' => "\x74\x57\x32\x14\x0a\x01",
226 '¨' => "\x74\x58\x32\x14\x0a\x01",
227 '©' => "\x74\x59\x32\x14\x0a\x01",
228 'ª' => "\x74\x5a\x32\x14\x0a\x01",
229 '«' => "\x74\x5b\x32\x14\x0a\x01",
230 'ò' => "\x74\x5c\x32\x14\x0a\x01",
231 'ó' => "\x74\x5d\x32\x14\x0a\x01",
232 'ô' => "\x74\x5e\x32\x14\x0a\x01",
233 '‹' => "\x75\x41\x32\x14\x0a\x01",
234 'Œ' => "\x75\x42\x32\x14\x0a\x01",
235 '' => "\x75\x43\x32\x14\x0a\x01",
236 'Ž' => "\x75\x44\x32\x14\x0a\x01",
237 '\\' => "\x75\x45\x32\x14\x0a\x02",
238 '' => "\x75\x45\x32\x14\x0a\x05",
239 '$' => "\x75\x46\x32\x14\x0a\x02",
240 '' => "\x75\x46\x32\x14\x0a\x05",
241 '‘' => "\x75\x47\x32\x14\x0a\x01",
242 '’' => "\x75\x48\x32\x14\x0a\x01",
243 '%' => "\x75\x49\x32\x14\x0a\x02",
244 '“' => "\x75\x49\x32\x14\x0a\x05",
245 'ñ' => "\x75\x4a\x32\x14\x0a\x01",
246 'ð' => "\x75\x4b\x32\x14\x0a\x01",
247 '0' => "\x76\x41\x32\x14\x0a\x02",
248 '‚O' => "\x76\x41\x32\x14\x0a\x05",
249 '1' => "\x76\x42\x32\x14\x0a\x02",
250 '‚P' => "\x76\x42\x32\x14\x0a\x05",
251 '2' => "\x76\x43\x32\x14\x0a\x02",
252 '‚Q' => "\x76\x43\x32\x14\x0a\x05",
253 '3' => "\x76\x44\x32\x14\x0a\x02",
254 '‚R' => "\x76\x44\x32\x14\x0a\x05",
255 '4' => "\x76\x45\x32\x14\x0a\x02",
256 '‚S' => "\x76\x45\x32\x14\x0a\x05",
257 '5' => "\x76\x46\x32\x14\x0a\x02",
258 '‚T' => "\x76\x46\x32\x14\x0a\x05",
259 '6' => "\x76\x47\x32\x14\x0a\x02",
260 '‚U' => "\x76\x47\x32\x14\x0a\x05",
261 '7' => "\x76\x48\x32\x14\x0a\x02",
262 '‚V' => "\x76\x48\x32\x14\x0a\x05",
263 '8' => "\x76\x49\x32\x14\x0a\x02",
264 '‚W' => "\x76\x49\x32\x14\x0a\x05",
265 '9' => "\x76\x4a\x32\x14\x0a\x02",
266 '‚X' => "\x76\x4a\x32\x14\x0a\x05",
267 'ƒ¿' => "\x77\x41\x32\x14\x0a\x01",
268 'ƒÀ' => "\x77\x42\x32\x14\x0a\x01",
269 'ƒÁ' => "\x77\x43\x32\x14\x0a\x01",
270 'ƒÂ' => "\x77\x44\x32\x14\x0a\x01",
271 'ƒÃ' => "\x77\x45\x32\x14\x0a\x01",
272 'Ā' => "\x77\x46\x32\x14\x0a\x01",
273 'ā' => "\x77\x47\x32\x14\x0a\x01",
274 'Į' => "\x77\x48\x32\x14\x0a\x01",
275 'Ă' => "\x77\x49\x32\x14\x0a\x01",
276 'ƒÈ' => "\x77\x4a\x32\x14\x0a\x01",
277 'ă' => "\x77\x4b\x32\x14\x0a\x01",
278 'ƒÊ' => "\x77\x4c\x32\x14\x0a\x01",
279 'ƒË' => "\x77\x4d\x32\x14\x0a\x01",
280 'ƒÌ' => "\x77\x4e\x32\x14\x0a\x01",
281 'ƒÍ' => "\x77\x4f\x32\x14\x0a\x01",
282 'ƒÎ' => "\x77\x50\x32\x14\x0a\x01",
283 'ƒÏ' => "\x77\x51\x32\x14\x0a\x01",
284 'ƒÐ' => "\x77\x52\x32\x14\x0a\x01",
285 'Ą' => "\x77\x53\x32\x14\x0a\x01",
286 'ƒÒ' => "\x77\x54\x32\x14\x0a\x01",
287 'ƒÓ' => "\x77\x55\x32\x14\x0a\x01",
288 'ƒÔ' => "\x77\x56\x32\x14\x0a\x01",
289 'ƒÕ' => "\x77\x57\x32\x14\x0a\x01",
290 'ƒÖ' => "\x77\x58\x32\x14\x0a\x01",
291 'ƒŸ' => "\x77\x61\x32\x14\x0a\x01",
292 'ƒ ' => "\x77\x62\x32\x14\x0a\x01",
293 'ƒ¡' => "\x77\x63\x32\x14\x0a\x01",
294 'Ģ' => "\x77\x64\x32\x14\x0a\x01",
295 'ģ' => "\x77\x65\x32\x14\x0a\x01",
296 'ƒ¤' => "\x77\x66\x32\x14\x0a\x01",
297 'Ĵ' => "\x77\x67\x32\x14\x0a\x01",
298 'ƒ¦' => "\x77\x68\x32\x14\x0a\x01",
299 'Ĥ' => "\x77\x69\x32\x14\x0a\x01",
300 'Ĭ' => "\x77\x6a\x32\x14\x0a\x01",
301 'ĩ' => "\x77\x6b\x32\x14\x0a\x01",
302 'Ļ' => "\x77\x6c\x32\x14\x0a\x01",
303 'ƒ«' => "\x77\x6d\x32\x14\x0a\x01",
304 'ƒ¬' => "\x77\x6e\x32\x14\x0a\x01",
305 'ƒ­' => "\x77\x6f\x32\x14\x0a\x01",
306 'Ĩ' => "\x77\x70\x32\x14\x0a\x01",
307 'ƒ¯' => "\x77\x71\x32\x14\x0a\x01",
308 'ƒ°' => "\x77\x72\x32\x14\x0a\x01",
309 'ı' => "\x77\x73\x32\x14\x0a\x01",
310 'ƒ²' => "\x77\x74\x32\x14\x0a\x01",
311 'ƒ³' => "\x77\x75\x32\x14\x0a\x01",
312 'ƒ´' => "\x77\x76\x32\x14\x0a\x01",
313 'ĵ' => "\x77\x77\x32\x14\x0a\x01",
314 'Ħ' => "\x77\x78\x32\x14\x0a\x01",
315 '„p' => "\x77\x81\x32\x14\x0a\x01",
316 '„q' => "\x77\x82\x32\x14\x0a\x01",
317 '„r' => "\x77\x83\x32\x14\x0a\x01",
318 '„s' => "\x77\x84\x32\x14\x0a\x01",
319 '„t' => "\x77\x85\x32\x14\x0a\x01",
320 '„u' => "\x77\x86\x32\x14\x0a\x01",
321 '„v' => "\x77\x87\x32\x14\x0a\x01",
322 '„w' => "\x77\x88\x32\x14\x0a\x01",
323 '„x' => "\x77\x89\x32\x14\x0a\x01",
324 '„y' => "\x77\x8a\x32\x14\x0a\x01",
325 '„z' => "\x77\x8b\x32\x14\x0a\x01",
326 '„{' => "\x77\x8c\x32\x14\x0a\x01",
327 '„|' => "\x77\x8d\x32\x14\x0a\x01",
328 '„}' => "\x77\x8e\x32\x14\x0a\x01",
329 '„~' => "\x77\x8f\x32\x14\x0a\x01",
330 '„€' => "\x77\x90\x32\x14\x0a\x01",
331 '„' => "\x77\x91\x32\x14\x0a\x01",
332 '„‚' => "\x77\x92\x32\x14\x0a\x01",
333 '„ƒ' => "\x77\x93\x32\x14\x0a\x01",
334 '„„' => "\x77\x94\x32\x14\x0a\x01",
335 '„…' => "\x77\x95\x32\x14\x0a\x01",
336 '„†' => "\x77\x96\x32\x14\x0a\x01",
337 '„‡' => "\x77\x97\x32\x14\x0a\x01",
338 '„ˆ' => "\x77\x98\x32\x14\x0a\x01",
339 '„‰' => "\x77\x99\x32\x14\x0a\x01",
340 '„Š' => "\x77\x9a\x32\x14\x0a\x01",
341 '„‹' => "\x77\x9b\x32\x14\x0a\x01",
342 '„Œ' => "\x77\x9c\x32\x14\x0a\x01",
343 '„' => "\x77\x9d\x32\x14\x0a\x01",
344 '„Ž' => "\x77\x9e\x32\x14\x0a\x01",
345 '„' => "\x77\x9f\x32\x14\x0a\x01",
346 '„' => "\x77\xa0\x32\x14\x0a\x01",
347 '„‘' => "\x77\xa1\x32\x14\x0a\x01",
348 '„@' => "\x77\xb1\x32\x14\x0a\x01",
349 '„A' => "\x77\xb2\x32\x14\x0a\x01",
350 '„B' => "\x77\xb3\x32\x14\x0a\x01",
351 '„C' => "\x77\xb4\x32\x14\x0a\x01",
352 '„D' => "\x77\xb5\x32\x14\x0a\x01",
353 '„E' => "\x77\xb6\x32\x14\x0a\x01",
354 '„F' => "\x77\xb7\x32\x14\x0a\x01",
355 '„G' => "\x77\xb8\x32\x14\x0a\x01",
356 '„H' => "\x77\xb9\x32\x14\x0a\x01",
357 '„I' => "\x77\xba\x32\x14\x0a\x01",
358 '„J' => "\x77\xbb\x32\x14\x0a\x01",
359 '„K' => "\x77\xbc\x32\x14\x0a\x01",
360 '„L' => "\x77\xbd\x32\x14\x0a\x01",
361 '„M' => "\x77\xbe\x32\x14\x0a\x01",
362 '„N' => "\x77\xbf\x32\x14\x0a\x01",
363 '„O' => "\x77\xc0\x32\x14\x0a\x01",
364 '„P' => "\x77\xc1\x32\x14\x0a\x01",
365 '„Q' => "\x77\xc2\x32\x14\x0a\x01",
366 '„R' => "\x77\xc3\x32\x14\x0a\x01",
367 '„S' => "\x77\xc4\x32\x14\x0a\x01",
368 '„T' => "\x77\xc5\x32\x14\x0a\x01",
369 '„U' => "\x77\xc6\x32\x14\x0a\x01",
370 '„V' => "\x77\xc7\x32\x14\x0a\x01",
371 '„W' => "\x77\xc8\x32\x14\x0a\x01",
372 '„X' => "\x77\xc9\x32\x14\x0a\x01",
373 '„Y' => "\x77\xca\x32\x14\x0a\x01",
374 '„Z' => "\x77\xcb\x32\x14\x0a\x01",
375 '„[' => "\x77\xcc\x32\x14\x0a\x01",
376 (qw/„\ /)[0]
377 => "\x77\xcd\x32\x14\x0a\x01",
378 '„]' => "\x77\xce\x32\x14\x0a\x01",
379 '„^' => "\x77\xcf\x32\x14\x0a\x01",
380 '„_' => "\x77\xd0\x32\x14\x0a\x01",
381 '„`' => "\x77\xd1\x32\x14\x0a\x01",
382 'a' => "\x78\x41\x33\x15\x0a\x02",
383 '‚' => "\x78\x41\x33\x15\x0a\x05",
384 'A' => "\x78\x41\x33\x16\x0a\x02",
385 '‚`' => "\x78\x41\x33\x16\x0a\x05",
386 'b' => "\x78\x42\x33\x15\x0a\x02",
387 '‚‚' => "\x78\x42\x33\x15\x0a\x05",
388 'B' => "\x78\x42\x33\x16\x0a\x02",
389 '‚a' => "\x78\x42\x33\x16\x0a\x05",
390 'c' => "\x78\x43\x33\x15\x0a\x02",
391 '‚ƒ' => "\x78\x43\x33\x15\x0a\x05",
392 'C' => "\x78\x43\x33\x16\x0a\x02",
393 '‚b' => "\x78\x43\x33\x16\x0a\x05",
394 'd' => "\x78\x44\x33\x15\x0a\x02",
395 '‚„' => "\x78\x44\x33\x15\x0a\x05",
396 'D' => "\x78\x44\x33\x16\x0a\x02",
397 '‚c' => "\x78\x44\x33\x16\x0a\x05",
398 'e' => "\x78\x45\x33\x15\x0a\x02",
399 '‚…' => "\x78\x45\x33\x15\x0a\x05",
400 'E' => "\x78\x45\x33\x16\x0a\x02",
401 '‚d' => "\x78\x45\x33\x16\x0a\x05",
402 'f' => "\x78\x46\x33\x15\x0a\x02",
403 '‚†' => "\x78\x46\x33\x15\x0a\x05",
404 'F' => "\x78\x46\x33\x16\x0a\x02",
405 '‚e' => "\x78\x46\x33\x16\x0a\x05",
406 'g' => "\x78\x47\x33\x15\x0a\x02",
407 '‚‡' => "\x78\x47\x33\x15\x0a\x05",
408 'G' => "\x78\x47\x33\x16\x0a\x02",
409 '‚f' => "\x78\x47\x33\x16\x0a\x05",
410 'h' => "\x78\x48\x33\x15\x0a\x02",
411 '‚ˆ' => "\x78\x48\x33\x15\x0a\x05",
412 'H' => "\x78\x48\x33\x16\x0a\x02",
413 '‚g' => "\x78\x48\x33\x16\x0a\x05",
414 'i' => "\x78\x49\x33\x15\x0a\x02",
415 '‚‰' => "\x78\x49\x33\x15\x0a\x05",
416 'I' => "\x78\x49\x33\x16\x0a\x02",
417 '‚h' => "\x78\x49\x33\x16\x0a\x05",
418 'j' => "\x78\x4a\x33\x15\x0a\x02",
419 '‚Š' => "\x78\x4a\x33\x15\x0a\x05",
420 'J' => "\x78\x4a\x33\x16\x0a\x02",
421 '‚i' => "\x78\x4a\x33\x16\x0a\x05",
422 'k' => "\x78\x4b\x33\x15\x0a\x02",
423 '‚‹' => "\x78\x4b\x33\x15\x0a\x05",
424 'K' => "\x78\x4b\x33\x16\x0a\x02",
425 '‚j' => "\x78\x4b\x33\x16\x0a\x05",
426 'l' => "\x78\x4c\x33\x15\x0a\x02",
427 '‚Œ' => "\x78\x4c\x33\x15\x0a\x05",
428 'L' => "\x78\x4c\x33\x16\x0a\x02",
429 '‚k' => "\x78\x4c\x33\x16\x0a\x05",
430 'm' => "\x78\x4d\x33\x15\x0a\x02",
431 '‚' => "\x78\x4d\x33\x15\x0a\x05",
432 'M' => "\x78\x4d\x33\x16\x0a\x02",
433 '‚l' => "\x78\x4d\x33\x16\x0a\x05",
434 'n' => "\x78\x4e\x33\x15\x0a\x02",
435 '‚Ž' => "\x78\x4e\x33\x15\x0a\x05",
436 'N' => "\x78\x4e\x33\x16\x0a\x02",
437 '‚m' => "\x78\x4e\x33\x16\x0a\x05",
438 'o' => "\x78\x4f\x33\x15\x0a\x02",
439 '‚' => "\x78\x4f\x33\x15\x0a\x05",
440 'O' => "\x78\x4f\x33\x16\x0a\x02",
441 '‚n' => "\x78\x4f\x33\x16\x0a\x05",
442 'p' => "\x78\x50\x33\x15\x0a\x02",
443 '‚' => "\x78\x50\x33\x15\x0a\x05",
444 'P' => "\x78\x50\x33\x16\x0a\x02",
445 '‚o' => "\x78\x50\x33\x16\x0a\x05",
446 'q' => "\x78\x51\x33\x15\x0a\x02",
447 '‚‘' => "\x78\x51\x33\x15\x0a\x05",
448 'Q' => "\x78\x51\x33\x16\x0a\x02",
449 '‚p' => "\x78\x51\x33\x16\x0a\x05",
450 'r' => "\x78\x52\x33\x15\x0a\x02",
451 '‚’' => "\x78\x52\x33\x15\x0a\x05",
452 'R' => "\x78\x52\x33\x16\x0a\x02",
453 '‚q' => "\x78\x52\x33\x16\x0a\x05",
454 's' => "\x78\x53\x33\x15\x0a\x02",
455 '‚“' => "\x78\x53\x33\x15\x0a\x05",
456 'S' => "\x78\x53\x33\x16\x0a\x02",
457 '‚r' => "\x78\x53\x33\x16\x0a\x05",
458 't' => "\x78\x54\x33\x15\x0a\x02",
459 '‚”' => "\x78\x54\x33\x15\x0a\x05",
460 'T' => "\x78\x54\x33\x16\x0a\x02",
461 '‚s' => "\x78\x54\x33\x16\x0a\x05",
462 'u' => "\x78\x55\x33\x15\x0a\x02",
463 '‚•' => "\x78\x55\x33\x15\x0a\x05",
464 'U' => "\x78\x55\x33\x16\x0a\x02",
465 '‚t' => "\x78\x55\x33\x16\x0a\x05",
466 'v' => "\x78\x56\x33\x15\x0a\x02",
467 '‚–' => "\x78\x56\x33\x15\x0a\x05",
468 'V' => "\x78\x56\x33\x16\x0a\x02",
469 '‚u' => "\x78\x56\x33\x16\x0a\x05",
470 'w' => "\x78\x57\x33\x15\x0a\x02",
471 '‚—' => "\x78\x57\x33\x15\x0a\x05",
472 'W' => "\x78\x57\x33\x16\x0a\x02",
473 '‚v' => "\x78\x57\x33\x16\x0a\x05",
474 'x' => "\x78\x58\x33\x15\x0a\x02",
475 '‚˜' => "\x78\x58\x33\x15\x0a\x05",
476 'X' => "\x78\x58\x33\x16\x0a\x02",
477 '‚w' => "\x78\x58\x33\x16\x0a\x05",
478 'y' => "\x78\x59\x33\x15\x0a\x02",
479 '‚™' => "\x78\x59\x33\x15\x0a\x05",
480 'Y' => "\x78\x59\x33\x16\x0a\x02",
481 '‚x' => "\x78\x59\x33\x16\x0a\x05",
482 'z' => "\x78\x5a\x33\x15\x0a\x02",
483 '‚š' => "\x78\x5a\x33\x15\x0a\x05",
484 'Z' => "\x78\x5a\x33\x16\x0a\x02",
485 '‚y' => "\x78\x5a\x33\x16\x0a\x05",
486 '‚Ÿ' => "\x79\x41\x34\x1b\x10\x03",
487 'ƒ@' => "\x79\x41\x34\x1b\x11\x03",
488 '§' => "\x79\x41\x34\x1b\x11\x04",
489 '‚ ' => "\x79\x41\x34\x1d\x10\x03",
490 'ƒA' => "\x79\x41\x34\x1d\x11\x03",
491 '±' => "\x79\x41\x34\x1d\x11\x04",
492 '‚¡' => "\x79\x42\x34\x1b\x10\x03",
493 'ƒB' => "\x79\x42\x34\x1b\x11\x03",
494 '¨' => "\x79\x42\x34\x1b\x11\x04",
495 '‚¢' => "\x79\x42\x34\x1d\x10\x03",
496 'ƒC' => "\x79\x42\x34\x1d\x11\x03",
497 '²' => "\x79\x42\x34\x1d\x11\x04",
498 '‚£' => "\x79\x43\x34\x1b\x10\x03",
499 'ƒD' => "\x79\x43\x34\x1b\x11\x03",
500 '©' => "\x79\x43\x34\x1b\x11\x04",
501 '‚¤' => "\x79\x43\x34\x1d\x10\x03",
502 'ƒE' => "\x79\x43\x34\x1d\x11\x03",
503 '³' => "\x79\x43\x34\x1d\x11\x04",
504 'ƒ”' => "\x79\x43\x35\x1d\x11\x03",
505 '³Þ' => "\x79\x43\x35\x1d\x11\x04",
506 '‚¥' => "\x79\x44\x34\x1b\x10\x03",
507 'ƒF' => "\x79\x44\x34\x1b\x11\x03",
508 'ª' => "\x79\x44\x34\x1b\x11\x04",
509 '‚¦' => "\x79\x44\x34\x1d\x10\x03",
510 'ƒG' => "\x79\x44\x34\x1d\x11\x03",
511 '´' => "\x79\x44\x34\x1d\x11\x04",
512 '‚§' => "\x79\x45\x34\x1b\x10\x03",
513 'ƒH' => "\x79\x45\x34\x1b\x11\x03",
514 '«' => "\x79\x45\x34\x1b\x11\x04",
515 '‚¨' => "\x79\x45\x34\x1d\x10\x03",
516 'ƒI' => "\x79\x45\x34\x1d\x11\x03",
517 'µ' => "\x79\x45\x34\x1d\x11\x04",
518 'ĥ' => "\x79\x51\x34\x1b\x11\x03",
519 '‚©' => "\x79\x51\x34\x1d\x10\x03",
520 'ƒJ' => "\x79\x51\x34\x1d\x11\x03",
521 '¶' => "\x79\x51\x34\x1d\x11\x04",
522 '‚ª' => "\x79\x51\x35\x1d\x10\x03",
523 'ƒK' => "\x79\x51\x35\x1d\x11\x03",
524 '¶Þ' => "\x79\x51\x35\x1d\x11\x04",
525 '‚«' => "\x79\x52\x34\x1d\x10\x03",
526 'ƒL' => "\x79\x52\x34\x1d\x11\x03",
527 '·' => "\x79\x52\x34\x1d\x11\x04",
528 '‚¬' => "\x79\x52\x35\x1d\x10\x03",
529 'ƒM' => "\x79\x52\x35\x1d\x11\x03",
530 '·Þ' => "\x79\x52\x35\x1d\x11\x04",
531 '‚­' => "\x79\x53\x34\x1d\x10\x03",
532 'ƒN' => "\x79\x53\x34\x1d\x11\x03",
533 '¸' => "\x79\x53\x34\x1d\x11\x04",
534 '‚®' => "\x79\x53\x35\x1d\x10\x03",
535 'ƒO' => "\x79\x53\x35\x1d\x11\x03",
536 '¸Þ' => "\x79\x53\x35\x1d\x11\x04",
537 'ƒ–' => "\x79\x54\x34\x1b\x11\x03",
538 '‚¯' => "\x79\x54\x34\x1d\x10\x03",
539 'ƒP' => "\x79\x54\x34\x1d\x11\x03",
540 '¹' => "\x79\x54\x34\x1d\x11\x04",
541 '‚°' => "\x79\x54\x35\x1d\x10\x03",
542 'ƒQ' => "\x79\x54\x35\x1d\x11\x03",
543 '¹Þ' => "\x79\x54\x35\x1d\x11\x04",
544 '‚±' => "\x79\x55\x34\x1d\x10\x03",
545 'ƒR' => "\x79\x55\x34\x1d\x11\x03",
546 'º' => "\x79\x55\x34\x1d\x11\x04",
547 '‚²' => "\x79\x55\x35\x1d\x10\x03",
548 'ƒS' => "\x79\x55\x35\x1d\x11\x03",
549 'ºÞ' => "\x79\x55\x35\x1d\x11\x04",
550 '‚³' => "\x79\x61\x34\x1d\x10\x03",
551 'ƒT' => "\x79\x61\x34\x1d\x11\x03",
552 '»' => "\x79\x61\x34\x1d\x11\x04",
553 '‚´' => "\x79\x61\x35\x1d\x10\x03",
554 'ƒU' => "\x79\x61\x35\x1d\x11\x03",
555 '»Þ' => "\x79\x61\x35\x1d\x11\x04",
556 '‚µ' => "\x79\x62\x34\x1d\x10\x03",
557 'ƒV' => "\x79\x62\x34\x1d\x11\x03",
558 '¼' => "\x79\x62\x34\x1d\x11\x04",
559 '‚¶' => "\x79\x62\x35\x1d\x10\x03",
560 'ƒW' => "\x79\x62\x35\x1d\x11\x03",
561 '¼Þ' => "\x79\x62\x35\x1d\x11\x04",
562 '‚·' => "\x79\x63\x34\x1d\x10\x03",
563 'ƒX' => "\x79\x63\x34\x1d\x11\x03",
564 '½' => "\x79\x63\x34\x1d\x11\x04",
565 '‚¸' => "\x79\x63\x35\x1d\x10\x03",
566 'ƒY' => "\x79\x63\x35\x1d\x11\x03",
567 '½Þ' => "\x79\x63\x35\x1d\x11\x04",
568 '‚¹' => "\x79\x64\x34\x1d\x10\x03",
569 'ƒZ' => "\x79\x64\x34\x1d\x11\x03",
570 '¾' => "\x79\x64\x34\x1d\x11\x04",
571 '‚º' => "\x79\x64\x35\x1d\x10\x03",
572 'ƒ[' => "\x79\x64\x35\x1d\x11\x03",
573 '¾Þ' => "\x79\x64\x35\x1d\x11\x04",
574 '‚»' => "\x79\x65\x34\x1d\x10\x03",
575 (qw/ƒ\ /)[0]
576 => "\x79\x65\x34\x1d\x11\x03",
577 '¿' => "\x79\x65\x34\x1d\x11\x04",
578 '‚¼' => "\x79\x65\x35\x1d\x10\x03",
579 'ƒ]' => "\x79\x65\x35\x1d\x11\x03",
580 '¿Þ' => "\x79\x65\x35\x1d\x11\x04",
581 '‚½' => "\x79\x71\x34\x1d\x10\x03",
582 'ƒ^' => "\x79\x71\x34\x1d\x11\x03",
583 'À' => "\x79\x71\x34\x1d\x11\x04",
584 '‚¾' => "\x79\x71\x35\x1d\x10\x03",
585 'ƒ_' => "\x79\x71\x35\x1d\x11\x03",
586 'ÀÞ' => "\x79\x71\x35\x1d\x11\x04",
587 '‚¿' => "\x79\x72\x34\x1d\x10\x03",
588 'ƒ`' => "\x79\x72\x34\x1d\x11\x03",
589 'Á' => "\x79\x72\x34\x1d\x11\x04",
590 '‚À' => "\x79\x72\x35\x1d\x10\x03",
591 'ƒa' => "\x79\x72\x35\x1d\x11\x03",
592 'ÁÞ' => "\x79\x72\x35\x1d\x11\x04",
593 '‚Á' => "\x79\x73\x34\x1b\x10\x03",
594 'ƒb' => "\x79\x73\x34\x1b\x11\x03",
595 '¯' => "\x79\x73\x34\x1b\x11\x04",
596 '‚Â' => "\x79\x73\x34\x1d\x10\x03",
597 'ƒc' => "\x79\x73\x34\x1d\x11\x03",
598 'Â' => "\x79\x73\x34\x1d\x11\x04",
599 '‚Ã' => "\x79\x73\x35\x1d\x10\x03",
600 'ƒd' => "\x79\x73\x35\x1d\x11\x03",
601 'ÂÞ' => "\x79\x73\x35\x1d\x11\x04",
602 '‚Ä' => "\x79\x74\x34\x1d\x10\x03",
603 'ƒe' => "\x79\x74\x34\x1d\x11\x03",
604 'Ã' => "\x79\x74\x34\x1d\x11\x04",
605 '‚Å' => "\x79\x74\x35\x1d\x10\x03",
606 'ƒf' => "\x79\x74\x35\x1d\x11\x03",
607 'ÃÞ' => "\x79\x74\x35\x1d\x11\x04",
608 '‚Æ' => "\x79\x75\x34\x1d\x10\x03",
609 'ƒg' => "\x79\x75\x34\x1d\x11\x03",
610 'Ä' => "\x79\x75\x34\x1d\x11\x04",
611 '‚Ç' => "\x79\x75\x35\x1d\x10\x03",
612 'ƒh' => "\x79\x75\x35\x1d\x11\x03",
613 'ÄÞ' => "\x79\x75\x35\x1d\x11\x04",
614 '‚È' => "\x79\x81\x34\x1d\x10\x03",
615 'ƒi' => "\x79\x81\x34\x1d\x11\x03",
616 'Å' => "\x79\x81\x34\x1d\x11\x04",
617 '‚É' => "\x79\x82\x34\x1d\x10\x03",
618 'ƒj' => "\x79\x82\x34\x1d\x11\x03",
619 'Æ' => "\x79\x82\x34\x1d\x11\x04",
620 '‚Ê' => "\x79\x83\x34\x1d\x10\x03",
621 'ƒk' => "\x79\x83\x34\x1d\x11\x03",
622 'Ç' => "\x79\x83\x34\x1d\x11\x04",
623 '‚Ë' => "\x79\x84\x34\x1d\x10\x03",
624 'ƒl' => "\x79\x84\x34\x1d\x11\x03",
625 'È' => "\x79\x84\x34\x1d\x11\x04",
626 '‚Ì' => "\x79\x85\x34\x1d\x10\x03",
627 'ƒm' => "\x79\x85\x34\x1d\x11\x03",
628 'É' => "\x79\x85\x34\x1d\x11\x04",
629 '‚Í' => "\x79\x91\x34\x1d\x10\x03",
630 'ƒn' => "\x79\x91\x34\x1d\x11\x03",
631 'Ê' => "\x79\x91\x34\x1d\x11\x04",
632 '‚Î' => "\x79\x91\x35\x1d\x10\x03",
633 'ƒo' => "\x79\x91\x35\x1d\x11\x03",
634 'ÊÞ' => "\x79\x91\x35\x1d\x11\x04",
635 '‚Ï' => "\x79\x91\x36\x1d\x10\x03",
636 'ƒp' => "\x79\x91\x36\x1d\x11\x03",
637 'Êß' => "\x79\x91\x36\x1d\x11\x04",
638 '‚Ð' => "\x79\x92\x34\x1d\x10\x03",
639 'ƒq' => "\x79\x92\x34\x1d\x11\x03",
640 'Ë' => "\x79\x92\x34\x1d\x11\x04",
641 '‚Ñ' => "\x79\x92\x35\x1d\x10\x03",
642 'ƒr' => "\x79\x92\x35\x1d\x11\x03",
643 'ËÞ' => "\x79\x92\x35\x1d\x11\x04",
644 '‚Ò' => "\x79\x92\x36\x1d\x10\x03",
645 'ƒs' => "\x79\x92\x36\x1d\x11\x03",
646 'Ëß' => "\x79\x92\x36\x1d\x11\x04",
647 '‚Ó' => "\x79\x93\x34\x1d\x10\x03",
648 'ƒt' => "\x79\x93\x34\x1d\x11\x03",
649 'Ì' => "\x79\x93\x34\x1d\x11\x04",
650 '‚Ô' => "\x79\x93\x35\x1d\x10\x03",
651 'ƒu' => "\x79\x93\x35\x1d\x11\x03",
652 'ÌÞ' => "\x79\x93\x35\x1d\x11\x04",
653 '‚Õ' => "\x79\x93\x36\x1d\x10\x03",
654 'ƒv' => "\x79\x93\x36\x1d\x11\x03",
655 'Ìß' => "\x79\x93\x36\x1d\x11\x04",
656 '‚Ö' => "\x79\x94\x34\x1d\x10\x03",
657 'ƒw' => "\x79\x94\x34\x1d\x11\x03",
658 'Í' => "\x79\x94\x34\x1d\x11\x04",
659 '‚×' => "\x79\x94\x35\x1d\x10\x03",
660 'ƒx' => "\x79\x94\x35\x1d\x11\x03",
661 'ÍÞ' => "\x79\x94\x35\x1d\x11\x04",
662 '‚Ø' => "\x79\x94\x36\x1d\x10\x03",
663 'ƒy' => "\x79\x94\x36\x1d\x11\x03",
664 'Íß' => "\x79\x94\x36\x1d\x11\x04",
665 '‚Ù' => "\x79\x95\x34\x1d\x10\x03",
666 'ƒz' => "\x79\x95\x34\x1d\x11\x03",
667 'Î' => "\x79\x95\x34\x1d\x11\x04",
668 '‚Ú' => "\x79\x95\x35\x1d\x10\x03",
669 'ƒ{' => "\x79\x95\x35\x1d\x11\x03",
670 'ÎÞ' => "\x79\x95\x35\x1d\x11\x04",
671 '‚Û' => "\x79\x95\x36\x1d\x10\x03",
672 'ƒ|' => "\x79\x95\x36\x1d\x11\x03",
673 'Îß' => "\x79\x95\x36\x1d\x11\x04",
674 '‚Ü' => "\x79\xa1\x34\x1d\x10\x03",
675 'ƒ}' => "\x79\xa1\x34\x1d\x11\x03",
676 'Ï' => "\x79\xa1\x34\x1d\x11\x04",
677 '‚Ý' => "\x79\xa2\x34\x1d\x10\x03",
678 'ƒ~' => "\x79\xa2\x34\x1d\x11\x03",
679 'Ð' => "\x79\xa2\x34\x1d\x11\x04",
680 '‚Þ' => "\x79\xa3\x34\x1d\x10\x03",
681 'ƒ€' => "\x79\xa3\x34\x1d\x11\x03",
682 'Ñ' => "\x79\xa3\x34\x1d\x11\x04",
683 '‚ß' => "\x79\xa4\x34\x1d\x10\x03",
684 'ƒ' => "\x79\xa4\x34\x1d\x11\x03",
685 'Ò' => "\x79\xa4\x34\x1d\x11\x04",
686 '‚à' => "\x79\xa5\x34\x1d\x10\x03",
687 'ƒ‚' => "\x79\xa5\x34\x1d\x11\x03",
688 'Ó' => "\x79\xa5\x34\x1d\x11\x04",
689 '‚á' => "\x79\xb1\x34\x1b\x10\x03",
690 'ƒƒ' => "\x79\xb1\x34\x1b\x11\x03",
691 '¬' => "\x79\xb1\x34\x1b\x11\x04",
692 '‚â' => "\x79\xb1\x34\x1d\x10\x03",
693 'ƒ„' => "\x79\xb1\x34\x1d\x11\x03",
694 'Ô' => "\x79\xb1\x34\x1d\x11\x04",
695 '‚ã' => "\x79\xb3\x34\x1b\x10\x03",
696 'ƒ…' => "\x79\xb3\x34\x1b\x11\x03",
697 '­' => "\x79\xb3\x34\x1b\x11\x04",
698 '‚ä' => "\x79\xb3\x34\x1d\x10\x03",
699 'Ġ' => "\x79\xb3\x34\x1d\x11\x03",
700 'Õ' => "\x79\xb3\x34\x1d\x11\x04",
701 '‚å' => "\x79\xb5\x34\x1b\x10\x03",
702 'ƒ‡' => "\x79\xb5\x34\x1b\x11\x03",
703 '®' => "\x79\xb5\x34\x1b\x11\x04",
704 '‚æ' => "\x79\xb5\x34\x1d\x10\x03",
705 'ƒˆ' => "\x79\xb5\x34\x1d\x11\x03",
706 'Ö' => "\x79\xb5\x34\x1d\x11\x04",
707 '‚ç' => "\x79\xc1\x34\x1d\x10\x03",
708 'ƒ‰' => "\x79\xc1\x34\x1d\x11\x03",
709 '×' => "\x79\xc1\x34\x1d\x11\x04",
710 '‚è' => "\x79\xc2\x34\x1d\x10\x03",
711 'ƒŠ' => "\x79\xc2\x34\x1d\x11\x03",
712 'Ø' => "\x79\xc2\x34\x1d\x11\x04",
713 '‚é' => "\x79\xc3\x34\x1d\x10\x03",
714 'ƒ‹' => "\x79\xc3\x34\x1d\x11\x03",
715 'Ù' => "\x79\xc3\x34\x1d\x11\x04",
716 '‚ê' => "\x79\xc4\x34\x1d\x10\x03",
717 'ƒŒ' => "\x79\xc4\x34\x1d\x11\x03",
718 'Ú' => "\x79\xc4\x34\x1d\x11\x04",
719 '‚ë' => "\x79\xc5\x34\x1d\x10\x03",
720 'ƒ' => "\x79\xc5\x34\x1d\x11\x03",
721 'Û' => "\x79\xc5\x34\x1d\x11\x04",
722 '‚ì' => "\x79\xd1\x34\x1b\x10\x03",
723 'ƒŽ' => "\x79\xd1\x34\x1b\x11\x03",
724 '‚í' => "\x79\xd1\x34\x1d\x10\x03",
725 'ƒ' => "\x79\xd1\x34\x1d\x11\x03",
726 'Ü' => "\x79\xd1\x34\x1d\x11\x04",
727 '‚î' => "\x79\xd2\x34\x1d\x10\x03",
728 'ƒ' => "\x79\xd2\x34\x1d\x11\x03",
729 '‚ï' => "\x79\xd4\x34\x1d\x10\x03",
730 'ƒ‘' => "\x79\xd4\x34\x1d\x11\x03",
731 '‚ð' => "\x79\xd5\x34\x1d\x10\x03",
732 'ƒ’' => "\x79\xd5\x34\x1d\x11\x03",
733 '¦' => "\x79\xd5\x34\x1d\x11\x04",
734 '‚ñ' => "\x79\xd6\x34\x1d\x10\x03",
735 'ƒ“' => "\x79\xd6\x34\x1d\x11\x03",
736 'Ý' => "\x79\xd6\x34\x1d\x11\x04",
737 'T' => "\x79\xd7\x34\x1c\x10\x03",
738 'R' => "\x79\xd7\x34\x1c\x11\x03",
739 'U' => "\x79\xd7\x35\x1c\x10\x03",
740 'S' => "\x79\xd7\x35\x1c\x11\x03",
741 '[' => "\x79\xd8\x34\x1a\x11\x03",
742 '°' => "\x79\xd8\x34\x1a\x11\x04",
743 'V' => "\x7a\x41\x32\x14\x0a\x01",
744 'W' => "\x7a\x42\x32\x14\x0a\x01",
745 'X' => "\x7a\x43\x32\x14\x0a\x01",
746 'Y' => "\x7a\x44\x32\x14\x0a\x01",
747 'Z' => "\x7a\x45\x32\x14\x0a\x01",
748 '¬' => "\xfe\xfc\x32\x14\x0a\x01",
749 );
750  
751 0 ▶sub _getOrder { wantarray ? %Order : \%Order }
Subroutine _getOrder: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 0 0 0
752  
753 519 ▶sub _getClass($) {
Subroutine _getClass: called CC=13 SCAR=25.7
754 519 my $w = ord shift; # weight
755 return
756 519 ▶ $w < 0x70 ? 0 : # ignorable
Branch: 12 branches
BranchTrueFalseTotal
$w < 112 ? : 0 519 519
$w == 112 ? : 1 518 519
$w == 113 ? : 24 494 518
$w == 114 ? : 22 472 494
$w == 115 ? : 45 427 472
$w == 116 ? : 30 397 427
$w == 117 ? : 11 386 397
$w == 118 ? : 14 372 386
$w == 119 ? : 117 255 372
$w == 120 ? : 55 200 255
$w == 121 ? : 174 26 200
$w <= 252 ? : 25 1 26
757 $w == 0x70 ? 1 : # space
758 $w == 0x71 ? 2 : # kijutsu kigou : descriptive symbols
759 $w == 0x72 ? 3 : # kakko kigou : quotes and parentheses
760 $w == 0x73 ? 4 : # gakujutsu kigou : math. operators and sci. symbols
761 $w == 0x74 ? 5 : # ippan kigou : general symbols
762 $w == 0x75 ? 6 : # unit symbols
763 $w == 0x76 ? 7 : # arabic digits
764 $w == 0x77 ? 8 : # ooji kigou : Greek and Cyrillic alphabets
765 $w == 0x78 ? 9 : # Latin alphabets
766 $w == 0x79 ? 10 : # kana
767 $w <= 0xfc ? 11 : # kanji
768 12 ; # geta
769 }
770 489 ▶sub getClass { # method for testing _getClass()
Subroutine getClass: called CC=1 SCAR=0.0
Pod undocumented
771 489 my $self = shift;
772 489 my $key = $self->getSortKey(shift);
773 489 return _getClass($key);
774 }
775  
776 5 my %Replaced;
777 5 my @Replaced = qw( [ ° T R U S );
778 5 @Replaced{@Replaced} = (1) x @Replaced;
779  
780 492 ▶sub _replaced($$) {
Subroutine _replaced: called CC=13 SCAR=27.3
781 492 my $c = shift; # current element
782 492 my $p = unpack('n', shift);
783 # weight at the 1st level of the previous element
784 492 ▶ return unless 0x7941 <= $p && $p <= 0x79d6;
Branch: 1 branch
BranchTrueFalseTotal
unless 31041 <= $p and $p <= 31190 0 492 492
Condition33%1/3
31041 <= $p and $p <= 31190
!ll&&!rl&&r
00492
MC/DC0%0/2
31041 <= $p and $p <= 31190
31041 <= $p $p <= 31190
Truth table33%1/3
A and B
A= 31041 <= $pB= $p <= 31190
ABresult
0X0
100
111
785  
786 492 my $d = $p % 16; # dan : a-i-u-e-o or others
787 492 my $n = pack('n', $p);
788 return
789 492 ▶ $c eq '['
Branch: 8 branches
BranchTrueFalseTotal
$c eq "\201[" ? : 394 98 492
$d == 6 ? : 2 392 394
$c eq "\260" ? : 6 92 98
$d == 6 ? : 0 6 6
$c eq "\201T" ? : 39 53 92
$c eq "\201R" ? : 26 27 53
$c eq "\201U" && $n =~ /^\x79[\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/ ? : 24 3 27
$c eq "\201S" && $n =~ /^\x79[\x43\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/ ? : 0 3 3
Condition50%3/6
$c eq "\201U" and $n =~ /^\x79[\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
!ll&&!rl&&r
0324
$c eq "\201S" and $n =~ /^\x79[\x43\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
!ll&&!rl&&r
300
MC/DC50%1/2
$c eq "\201U" and $n =~ /^\x79[\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
$c eq "\201U" $n =~ /^\x79[\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
MC/DC0%0/2
$c eq "\201S" and $n =~ /^\x79[\x43\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
$c eq "\201S" $n =~ /^\x79[\x43\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
Truth table66%2/3
A and B
A= $c eq "\201U"B= $n =~ /^\x79[\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
ABresult
0X0
100
111
Truth table33%1/3
A and B
A= $c eq "\201S"B= $n =~ /^\x79[\x43\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
ABresult
0X0
100
111
790 ? "\x79".chr($d == 6 ? 0xd6 : 0x40 + $d)."\x34\x1a\x11\x03" :
791 $c eq '°'
792 ? "\x79".chr($d == 6 ? 0xd6 : 0x40 + $d)."\x34\x1a\x11\x04" :
793 $c eq 'T'
794 ? "$n\x34\x1c\x10\x03" :
795 $c eq 'R'
796 ? "$n\x34\x1c\x11\x03" :
797 $c eq 'U' && # has Daku Hiragana
798 $n =~ /^\x79[\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
799 ? "$n\x35\x1c\x10\x03" :
800 $c eq 'S' && # has Daku Katakana
801 $n =~ /^\x79[\x43\x51-\x55\x61-\x65\x71-\x75\x91-\x95]/
802 ? "$n\x35\x1c\x11\x03" :
803 undef;
804 }
805  
806 0 ▶sub _length {
Subroutine _length: not called CC=1 SCAR=6.9
807 0 my $str = shift;
808 0 0 + $str =~ s/[\x81-\x9F\xE0-\xFC][\x00-\xFF]|[\x00-\xFF]//g;
809 }
810  
811 25507 ▶sub getWtCJK {
Subroutine getWtCJK: called CC=4 SCAR=14.1
Pod undocumented
812 25507 my $self = shift;
813 25507 my $c = shift;
814 25507 ▶ if ($self->{kanji} == 3) {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->{'kanji'} == 3) { } 4 25503 25507
815 4 my $u = &{ $self->{tounicode} }($c);
816 4 ▶ croak "A passed codepoint of kanji is outside CJK Unified Ideographs"
Branch: 1 branch
BranchTrueFalseTotal
unless 19968 <= $u and $u <= 40959 0 4 4
Condition33%1/3
19968 <= $u and $u <= 40959
!ll&&!rl&&r
004
MC/DC0%0/2
19968 <= $u and $u <= 40959
19968 <= $u $u <= 40959
Truth table33%1/3
A and B
A= 19968 <= $uB= $u <= 40959
ABresult
0X0
100
111
817 unless 0x4E00 <= $u && $u <= 0x9FFF;
818 4 my $d = $u - 0x4E00;
819 4 chr(int($d / 192) + 0x80).chr($d % 192 + 0x40)."\x32\x14\x0a\x01";
820 } else {
821 25503 "$c\x32\x14\x0a\x01";
822 }
823 }
824  
825 31161 ▶sub getWt {
Subroutine getWt: called CC=15 SCAR=27.1
Pod undocumented
826 31161 my $self = shift;
827 31161 ▶ my $str = $self->{preprocess} ? &{ $self->{preprocess} }(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
$self->{'preprocess'} ? : 7 31154 31161
828 31161 my $kan = $self->{kanji};
829 31161 my $ign = $self->{ignoreChar};
830  
831 31161 ▶ if ($str !~ m/^(?:$Char)*$/o) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($str =~ /^(?:$Char)*$/o) 0 31161 31161
832 0 carp $PACKAGE . " Malformed Shift-JIS character";
833 }
834  
835 31161 my($c, @buf);
836 31161 foreach $c ($str =~ m/$Char/go) {
837 34385 ▶ next unless $Order{$c} || $kan > 1 && $c =~ /^$CJK$/o;
Branch: 1 branch
BranchTrueFalseTotal
unless $Order{$c} or $kan > 1 and $c =~ /^$CJK$/o 281 34104 34385
Condition100%6/6
$Order{$c} or $kan > 1 and $c =~ /^$CJK$/o
l!l&&r!l&&!r
860025504281
$kan > 1 and $c =~ /^$CJK$/o
!ll&&!rl&&r
827325504
MC/DC100%3/3
$Order{$c} or $kan > 1 and $c =~ /^$CJK$/o
$Order{$c} $kan > 1 $c =~ /^$CJK$/o
Truth table100%4/4
A or B and C
A= $Order{$c}B= $kan > 1C= $c =~ /^$CJK$/o
ABCresult
1XX1
0111
00X0
0100
838 34104 ▶ next if defined $ign && $c =~ /$ign/;
Branch: 1 branch
BranchTrueFalseTotal
if defined $ign and $c =~ /$ign/ 3 34101 34104
Condition100%3/3
defined $ign and $c =~ /$ign/
!ll&&!rl&&r
34079223
MC/DC100%2/2
defined $ign and $c =~ /$ign/
defined $ign $c =~ /$ign/
Truth table100%3/3
A and B
A= defined $ignB= $c =~ /$ign/
ABresult
0X0
100
111
839  
840 34101 my $replaced;
841 34101 ▶ $replaced = _replaced($c, $buf[-1]) if $Replaced{$c} && @buf;
Branch: 1 branch
BranchTrueFalseTotal
if $Replaced{$c} and @buf 484 33617 34101
Condition100%3/3
$Replaced{$c} and @buf
!ll&&!rl&&r
3359225484
MC/DC100%2/2
$Replaced{$c} and @buf
$Replaced{$c} @buf
Truth table100%3/3
A and B
A= $Replaced{$c}B= @buf
ABresult
0X0
100
111
842  
843 push @buf,
844 $replaced ? $replaced :
845 34101 ▶ $Order{$c} ? $Order{$c} :
Branch: 3 branches
BranchTrueFalseTotal
$replaced ? : 481 33620 34101
$Order{$c} ? : 8116 25504 33620
$kan > 1 ? : 25504 0 25504
846 $kan > 1 ? $self->getWtCJK($c) : ();
847 }
848 31161 ▶ return wantarray ? @buf : join('', @buf);
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 15 31146 31161
849 }
850  
851 31146 ▶sub getSortKey {
Subroutine getSortKey: called CC=10 SCAR=23.0
Pod documented
852 31146 my $self = shift;
853 31146 my $wt = $self->getWt(shift);
854 31146 my $lev = $self->{level};
855 31146 my @ret;
856  
857 31146 ▶ ($ret[0] = $wt) =~ tr/\x40-\xff//cd if 0 < $lev;
Branch: 1 branch
BranchTrueFalseTotal
if 0 < $lev 31146 0 31146
858 31146 ▶ ($ret[1] = $wt) =~ tr/\x32-\x36//cd if 1 < $lev;
Branch: 1 branch
BranchTrueFalseTotal
if 1 < $lev 30108 1038 31146
859 31146 ▶ ($ret[2] = $wt) =~ tr/\x14-\x1d//cd if 2 < $lev;
Branch: 1 branch
BranchTrueFalseTotal
if 2 < $lev 30018 1128 31146
860 31146 ▶ ($ret[3] = $wt) =~ tr/\x0a-\x11//cd if 3 < $lev;
Branch: 1 branch
BranchTrueFalseTotal
if 3 < $lev 29714 1432 31146
861 31146 ▶ ($ret[4] = $wt) =~ tr/\x01-\x05//cd if 4 < $lev;
Branch: 1 branch
BranchTrueFalseTotal
if 4 < $lev 8 31138 31146
862  
863 # 3rd level
864 $ret[2] =~ tr/\x15\x16/\x16\x15/
865 31146 ▶ if 2 < $lev && $self->{upper_before_lower};
Branch: 1 branch
BranchTrueFalseTotal
if 2 < $lev and $self->{"upper_before_lower"} 106 31040 31146
Condition100%3/3
2 < $lev and $self->{"upper_before_lower"}
!ll&&!rl&&r
112829912106
MC/DC100%2/2
2 < $lev and $self->{"upper_before_lower"}
2 < $lev $self->{"upper_before_lower"}
Truth table100%3/3
A and B
A= 2 < $levB= $self->{"upper_before_lower"}
ABresult
0X0
100
111
866  
867 # 4th level
868 $ret[3] =~ tr/\x10\x11/\x11\x10/
869 31146 ▶ if 3 < $lev && $self->{katakana_before_hiragana};
Branch: 1 branch
BranchTrueFalseTotal
if 3 < $lev and $self->{"katakana_before_hiragana"} 168 30978 31146
Condition100%3/3
3 < $lev and $self->{"katakana_before_hiragana"}
!ll&&!rl&&r
143229546168
MC/DC100%2/2
3 < $lev and $self->{"katakana_before_hiragana"}
3 < $lev $self->{"katakana_before_hiragana"}
Truth table100%3/3
A and B
A= 3 < $levB= $self->{"katakana_before_hiragana"}
ABresult
0X0
100
111
870  
871 31146 join "\0\0", @ret[0..$lev-1];
872 }
873  
874 55 ▶sub cmp { $_[0]->getSortKey($_[1]) cmp $_[0]->getSortKey($_[2]) }
Subroutine cmp: called CC=1 SCAR=0.0
Pod documented
875 272 ▶sub eq { $_[0]->getSortKey($_[1]) eq $_[0]->getSortKey($_[2]) }
Subroutine eq: called CC=1 SCAR=0.0
Pod documented
876 5 ▶sub ne { $_[0]->getSortKey($_[1]) ne $_[0]->getSortKey($_[2]) }
Subroutine ne: called CC=1 SCAR=0.0
Pod documented
877 13250 ▶sub gt { $_[0]->getSortKey($_[1]) gt $_[0]->getSortKey($_[2]) }
Subroutine gt: called CC=1 SCAR=0.0
Pod documented
878 141 ▶sub ge { $_[0]->getSortKey($_[1]) ge $_[0]->getSortKey($_[2]) }
Subroutine ge: called CC=1 SCAR=0.0
Pod documented
879 850 ▶sub lt { $_[0]->getSortKey($_[1]) lt $_[0]->getSortKey($_[2]) }
Subroutine lt: called CC=1 SCAR=0.0
Pod documented
880 140 ▶sub le { $_[0]->getSortKey($_[1]) le $_[0]->getSortKey($_[2]) }
Subroutine le: called CC=1 SCAR=0.0
Pod documented
881  
882 18 ▶sub sort {
Subroutine sort: called CC=2 SCAR=6.9
Pod documented
883 18 my $obj = shift;
884 18 my(%hyoki);
885 18 foreach (@_) {
886 1161 $hyoki{$_} = $obj->getSortKey($_);
887 }
888 18 return sort{ $hyoki{$a} cmp $hyoki{$b} } @_;
889 }
890  
891 1 ▶sub sortYomi {
Subroutine sortYomi: called CC=3 SCAR=11.0
Pod documented
892 1 my $obj = shift;
893 1 my (%hyoki, %yomi);
894 1 my @str = @_;
895 1 foreach (@str) {
896 5 $hyoki{ $_->[0] } = $obj->getSortKey($_->[0]);
897 5 $yomi{ $_->[1] } = $obj->getSortKey($_->[1]);
898 }
899  
900 return sort {
901 1 $yomi{ $a->[1] } cmp $yomi{ $b->[1] }
902 8 ▶ || $hyoki{ $a->[0] } cmp $hyoki{ $b->[0] }
Condition66%2/3
$yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]} || $hyoki{$ShiftJIS::Collate::a->[0]} cmp $hyoki{$ShiftJIS::Collate::b->[0]}
l!l&&r!l&&!r
710
MC/DC0%0/2
$yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]} || $hyoki{$ShiftJIS::Collate::a->[0]} cmp $hyoki{$ShiftJIS::Collate::b->[0]}
$yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]} $hyoki{$ShiftJIS::Collate::a->[0]} cmp $hyoki{$ShiftJIS::Collate::b->[0]}
Truth table66%2/3
A || B
A= $yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]}B= $hyoki{$ShiftJIS::Collate::a->[0]} cmp $hyoki{$ShiftJIS::Collate::b->[0]}
ABresult
1X1
011
000
903 } @str;
904 }
905  
906 1 ▶sub sortDaihyo {
Subroutine sortDaihyo: called CC=6 SCAR=17.9
Pod documented
907 1 my $obj = shift;
908 1 my (%class, %hyoki, %yomi, %daihyo, %kashira);
909 1 my @str = @_;
910 1 foreach (@str) {
911 30 $hyoki{ $_->[0] } = $obj->getSortKey( $_->[0] ); # string
912 30 $yomi{ $_->[1] } = $obj->getSortKey( $_->[1] ); # string
913 30 $daihyo{ $_->[1] } = unpack('n', $yomi{ $_->[1]}); # number
914 30 $kashira{ $_->[0] } = unpack('n', $hyoki{$_->[0]}); # number
915 30 $class{ $_->[0] } = _getClass( $hyoki{$_->[0]} ); # number
916 }
917  
918 1 sort{ $class{ $a->[0] } <=> $class{ $b->[0] }
919 || $daihyo{ $a->[1] } <=> $daihyo{ $b->[1] }
920 || $kashira{$a->[0] } <=> $kashira{$b->[0] }
921 || $yomi{ $a->[1] } cmp $yomi{ $b->[1] }
922 113 ▶ || $hyoki{ $a->[0] } cmp $hyoki{ $b->[0] }
Condition91%11/12
$class{$ShiftJIS::Collate::a->[0]} <=> $class{$ShiftJIS::Collate::b->[0]} || $daihyo{$ShiftJIS::Collate::a->[1]} <=> $daihyo{$ShiftJIS::Collate::b->[1]} || $kashira{$ShiftJIS::Collate::a->[0]} <=> $kashira{$ShiftJIS::Collate::b->[0]} || $yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]} || $hyoki{$ShiftJIS::Collate::a->[0]} cmp $hyoki{$ShiftJIS::Collate::b->[0]}
l!l&&r!l&&!r
10940
$class{$ShiftJIS::Collate::a->[0]} <=> $class{$ShiftJIS::Collate::b->[0]} or $daihyo{$ShiftJIS::Collate::a->[1]} <=> $daihyo{$ShiftJIS::Collate::b->[1]} or $kashira{$ShiftJIS::Collate::a->[0]} <=> $kashira{$ShiftJIS::Collate::b->[0]} or $yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]}
l!l&&r!l&&!r
96134
$class{$ShiftJIS::Collate::a->[0]} <=> $class{$ShiftJIS::Collate::b->[0]} or $daihyo{$ShiftJIS::Collate::a->[1]} <=> $daihyo{$ShiftJIS::Collate::b->[1]} or $kashira{$ShiftJIS::Collate::a->[0]} <=> $kashira{$ShiftJIS::Collate::b->[0]}
l!l&&r!l&&!r
831317
$class{$ShiftJIS::Collate::a->[0]} <=> $class{$ShiftJIS::Collate::b->[0]} or $daihyo{$ShiftJIS::Collate::a->[1]} <=> $daihyo{$ShiftJIS::Collate::b->[1]}
l!l&&r!l&&!r
354830
MC/DC0%0/5
$class{$ShiftJIS::Collate::a->[0]} <=> $class{$ShiftJIS::Collate::b->[0]} || $daihyo{$ShiftJIS::Collate::a->[1]} <=> $daihyo{$ShiftJIS::Collate::b->[1]} || $kashira{$ShiftJIS::Collate::a->[0]} <=> $kashira{$ShiftJIS::Collate::b->[0]} || $yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]} || $hyoki{$ShiftJIS::Collate::a->[0]} cmp $hyoki{$ShiftJIS::Collate::b->[0]}
$class{$ShiftJIS::Collate::a->[0]} <=> $class{$ShiftJIS::Collate::b->[0]} $daihyo{$ShiftJIS::Collate::a->[1]} <=> $daihyo{$ShiftJIS::Collate::b->[1]} $kashira{$ShiftJIS::Collate::a->[0]} <=> $kashira{$ShiftJIS::Collate::b->[0]} $yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]} $hyoki{$ShiftJIS::Collate::a->[0]} cmp $hyoki{$ShiftJIS::Collate::b->[0]}
Truth table83%5/6
A or B or C or D || E
A= $class{$ShiftJIS::Collate::a->[0]} <=> $class{$ShiftJIS::Collate::b->[0]}B= $daihyo{$ShiftJIS::Collate::a->[1]} <=> $daihyo{$ShiftJIS::Collate::b->[1]}C= $kashira{$ShiftJIS::Collate::a->[0]} <=> $kashira{$ShiftJIS::Collate::b->[0]}D= $yomi{$ShiftJIS::Collate::a->[1]} cmp $yomi{$ShiftJIS::Collate::b->[1]}E= $hyoki{$ShiftJIS::Collate::a->[0]} cmp $hyoki{$ShiftJIS::Collate::b->[0]}
ABCDEresult
1XXXX1
01XXX1
001XX1
0001X1
000011
000000
923 } @str;
924 }
925  
926 ##
927 ## int = index(string, substring)
928 ##
929 15 ▶sub index {
Subroutine index: called CC=24 SCAR=34.9
Pod documented
930 15 my $self = shift;
931 0 ▶ my $str = $self->{preprocess} ? &{ $self->{preprocess} }(shift) : shift;
Branch: 1 branch
BranchTrueFalseTotal
$self->{'preprocess'} ? : 0 15 15
932 15 my $sub = shift;
933 15 my $byte = $self->{position_in_bytes};
934 15 my $kan = $self->{kanji};
935 15 my $ign = $self->{ignoreChar};
936 15 my $lev = $self->{level};
937  
938 15 my @subWt = $self->getWt($sub);
939 15 ▶ return wantarray ? (0,0) : 0 if ! @subWt;
Branch: 2 branches
BranchTrueFalseTotal
unless @subWt 0 15 15
wantarray ? : 0 0 0
940 15 ▶ return wantarray ? () : -1 if $str eq '';
Branch: 2 branches
BranchTrueFalseTotal
if $str eq "" 0 15 15
wantarray ? : 0 0 0
941  
942 15 ▶ if ($str !~ m/^(?:$Char)*$/o) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($str =~ /^(?:$Char)*$/o) 0 15 15
943 0 carp $PACKAGE . " Malformed Shift-JIS character";
944 }
945  
946 15 my $count = 0;
947 15 my($c, $prev, @strWt, @strPt);
948 15 foreach $c ($str =~ m/$Char/go) {
949 172 my $cur;
950 172 ▶ next if defined $ign && $c =~ /$ign/;
Branch: 1 branch
BranchTrueFalseTotal
if defined $ign and $c =~ /$ign/ 0 172 172
Condition33%1/3
defined $ign and $c =~ /$ign/
!ll&&!rl&&r
17200
MC/DC0%0/2
defined $ign and $c =~ /$ign/
defined $ign $c =~ /$ign/
Truth table33%1/3
A and B
A= defined $ignB= $c =~ /$ign/
ABresult
0X0
100
111
951 172 ▶ if ($Order{$c} || $kan > 1 && $c =~ /^$CJK$/o) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Order{$c} or $kan > 1 and $c =~ /^$CJK$/o) 166 6 172
Condition83%5/6
$Order{$c} or $kan > 1 and $c =~ /^$CJK$/o
l!l&&r!l&&!r
16336
$kan > 1 and $c =~ /^$CJK$/o
!ll&&!rl&&r
063
MC/DC66%2/3
$Order{$c} or $kan > 1 and $c =~ /^$CJK$/o
$Order{$c} $kan > 1 $c =~ /^$CJK$/o
Truth table75%3/4
A or B and C
A= $Order{$c}B= $kan > 1C= $c =~ /^$CJK$/o
ABCresult
1XX1
0111
00X0
0100
952 166 ▶ $cur = _replaced($c, $strWt[-1]) if $Replaced{$c} && @strWt;
Branch: 1 branch
BranchTrueFalseTotal
if $Replaced{$c} and @strWt 8 158 166
Condition66%2/3
$Replaced{$c} and @strWt
!ll&&!rl&&r
15808
MC/DC50%1/2
$Replaced{$c} and @strWt
$Replaced{$c} @strWt
Truth table66%2/3
A and B
A= $Replaced{$c}B= @strWt
ABresult
0X0
100
111
953 166 ▶ $cur ||= $Order{$c} ? $Order{$c} :
Branch: 2 branches
BranchTrueFalseTotal
$Order{$c} ? : 155 3 158
$kan > 1 ? : 3 0 3
Condition66%2/3
$cur ||= $Order{$c} ? $Order{$c} : ($kan > 1 ? $self->getWtCJK($c) : undef)
l!l&&r!l&&!r
81580
MC/DC0%0/2
$cur ||= $Order{$c} ? $Order{$c} : ($kan > 1 ? $self->getWtCJK($c) : undef)
$cur $Order{$c} ? $Order{$c} : ($kan > 1 ? $self->getWtCJK($c) : undef)
Truth table66%2/3
A ||= B
A= $curB= $Order{$c} ? $Order{$c} : ($kan > 1 ? $self->getWtCJK($c) : undef)
ABresult
1X1
011
000
954 $kan > 1 ? $self->getWtCJK($c) : undef;
955 }
956  
957 172 ▶ if ($cur) {
Branch: 1 branch
BranchTrueFalseTotal
if ($cur) 166 6 172
958 166 push @strWt, $cur;
959 166 push @strPt, $count;
960 }
961 172 ▶ $count += $byte ? length($c) : _length($c);
Branch: 1 branch
BranchTrueFalseTotal
$byte ? : 172 0 172
962  
963 172 ▶ while (@strWt >= @subWt) {
Branch: 1 branch
BranchTrueFalseTotal
if (@strWt >= @subWt) 146 160 306
964 146 ▶ if (_eqArray(\@strWt, \@subWt, $lev)) {
Branch: 1 branch
BranchTrueFalseTotal
if (&_eqArray(\@strWt, \@subWt, $lev)) 12 134 146
965 12 my $pos = $strPt[0];
966 12 ▶ return wantarray ? ($pos, $count-$pos) : $pos;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 12 0 12
967 }
968 134 shift @strWt;
969 134 shift @strPt;
970 }
971 }
972 3 ▶ return wantarray ? () : -1;
Branch: 1 branch
BranchTrueFalseTotal
wantarray ? : 3 0 3
973 }
974  
975 ##
976 ## bool _eqArray(arrayref, arrayref, level)
977 ##
978 146 ▶sub _eqArray($$$) {
Subroutine _eqArray: called CC=3 SCAR=11.0
979 146 my $a = shift; # length $a >= length $b;
980 146 my $b = shift;
981 146 my $len = 1 + shift; # 1 + level
982  
983 146 my($c);
984 146 foreach $c (0..@$b-1) {
985 167 ▶ return if substr($a->[$c], 0, $len) ne substr($b->[$c], 0, $len);
Branch: 1 branch
BranchTrueFalseTotal
if substr($a->[$c], 0, $len) ne substr($b->[$c], 0, $len) 134 33 167
986 }
987 12 return 1;
988 }
989  
990 5 1;
991  
992 __END__
↑ Summary