Filename | C:/tmp64ng/perl/lib/Encode/Alias.pm |
Statements | Executed 1023 statements in 0s |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 0s | 0s | BEGIN@2 | Encode::Alias::
1 | 1 | 1 | 0s | 0s | BEGIN@3 | Encode::Alias::
1 | 1 | 1 | 0s | 0s | BEGIN@4 | Encode::Alias::
1 | 1 | 1 | 0s | 0s | BEGIN@6 | Encode::Alias::
1 | 1 | 1 | 0s | 0s | BEGIN@8 | Encode::Alias::
50 | 2 | 1 | 0s | 0s | CORE:match (opcode) | Encode::Alias::
47 | 43 | 1 | 0s | 0s | CORE:qr (opcode) | Encode::Alias::
49 | 1 | 1 | 0s | 0s | CORE:regcomp (opcode) | Encode::Alias::
62 | 47 | 3 | 0s | 0s | define_alias | Encode::Alias::
6 | 1 | 1 | 0s | 0s | find_alias (recurses: max depth 1, inclusive time 0s) | Encode::Alias::
1 | 1 | 1 | 0s | 0s | init_aliases | Encode::Alias::
1 | 1 | 1 | 0s | 0s | undef_aliases | Encode::Alias::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Encode::Alias; | ||||
2 | 2 | 0s | 2 | 0s | # spent 0s within Encode::Alias::BEGIN@2 which was called:
# once (0s+0s) by Encode::BEGIN@47 at line 2 # spent 0s making 1 call to Encode::Alias::BEGIN@2
# spent 0s making 1 call to strict::import |
3 | 2 | 0s | 2 | 0s | # spent 0s within Encode::Alias::BEGIN@3 which was called:
# once (0s+0s) by Encode::BEGIN@47 at line 3 # spent 0s making 1 call to Encode::Alias::BEGIN@3
# spent 0s making 1 call to warnings::import |
4 | 2 | 0s | 2 | 0s | # spent 0s within Encode::Alias::BEGIN@4 which was called:
# once (0s+0s) by Encode::BEGIN@47 at line 4 # spent 0s making 1 call to Encode::Alias::BEGIN@4
# spent 0s making 1 call to warnings::unimport |
5 | 3 | 0s | 1 | 0s | our $VERSION = do { my @r = ( q$Revision: 2.18 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; # spent 0s making 1 call to Encode::Alias::CORE:match |
6 | 2 | 0s | 2 | 0s | # spent 0s within Encode::Alias::BEGIN@6 which was called:
# once (0s+0s) by Encode::BEGIN@47 at line 6 # spent 0s making 1 call to Encode::Alias::BEGIN@6
# spent 0s making 1 call to constant::import |
7 | |||||
8 | 2 | 0s | 2 | 0s | # spent 0s within Encode::Alias::BEGIN@8 which was called:
# once (0s+0s) by Encode::BEGIN@47 at line 8 # spent 0s making 1 call to Encode::Alias::BEGIN@8
# spent 0s making 1 call to Exporter::import |
9 | |||||
10 | # Public, encouraged API is exported by default | ||||
11 | |||||
12 | 1 | 0s | our @EXPORT = | ||
13 | qw ( | ||||
14 | define_alias | ||||
15 | find_alias | ||||
16 | ); | ||||
17 | |||||
18 | 1 | 0s | our @Alias; # ordered matching list | ||
19 | 1 | 0s | our %Alias; # cached known aliases | ||
20 | |||||
21 | # spent 0s within Encode::Alias::find_alias which was called 6 times, avg 0s/call:
# 6 times (0s+0s) by Encode::getEncoding at line 110 of Encode.pm, avg 0s/call | ||||
22 | 6 | 0s | require Encode; | ||
23 | 6 | 0s | my $class = shift; | ||
24 | 6 | 0s | my $find = shift; | ||
25 | 6 | 0s | unless ( exists $Alias{$find} ) { | ||
26 | 3 | 0s | $Alias{$find} = undef; # Recursion guard | ||
27 | 3 | 0s | for ( my $i = 0 ; $i < @Alias ; $i += 2 ) { | ||
28 | 74 | 0s | my $alias = $Alias[$i]; | ||
29 | 74 | 0s | my $val = $Alias[ $i + 1 ]; | ||
30 | 74 | 0s | my $new; | ||
31 | 74 | 0s | 98 | 0s | if ( ref($alias) eq 'Regexp' && $find =~ $alias ) { # spent 0s making 49 calls to Encode::Alias::CORE:match, avg 0s/call
# spent 0s making 49 calls to Encode::Alias::CORE:regcomp, avg 0s/call |
32 | DEBUG and warn "eval $val"; | ||||
33 | 3 | 0s | $new = eval $val; # spent 0s executing statements in string eval
# spent 0s executing statements in string eval
# spent 0s executing statements in string eval | ||
34 | 3 | 0s | DEBUG and $@ and warn "$val, $@"; | ||
35 | } | ||||
36 | elsif ( ref($alias) eq 'CODE' ) { | ||||
37 | DEBUG and warn "$alias", "->", "($find)"; | ||||
38 | 2 | 0s | 2 | 0s | $new = $alias->($find); # spent 0s making 2 calls to ExtUtils::MakeMaker::Locale::__ANON__[ExtUtils/MakeMaker/Locale.pm:107], avg 0s/call |
39 | } | ||||
40 | elsif ( lc($find) eq lc($alias) ) { | ||||
41 | $new = $val; | ||||
42 | } | ||||
43 | 74 | 0s | if ( defined($new) ) { | ||
44 | 4 | 0s | next if $new eq $find; # avoid (direct) recursion on bugs | ||
45 | DEBUG and warn "$alias, $new"; | ||||
46 | 2 | 0s | 2 | 0s | my $enc = # spent 0s making 2 calls to Encode::find_encoding, avg 0s/call, recursion: max depth 1, sum of overlapping time 0s |
47 | ( ref($new) ) ? $new : Encode::find_encoding($new); | ||||
48 | 2 | 0s | if ($enc) { | ||
49 | 2 | 0s | $Alias{$find} = $enc; | ||
50 | 2 | 0s | last; | ||
51 | } | ||||
52 | } | ||||
53 | } | ||||
54 | |||||
55 | # case insensitive search when canonical is not in all lowercase | ||||
56 | # RT ticket #7835 | ||||
57 | 3 | 0s | unless ( $Alias{$find} ) { | ||
58 | 1 | 0s | my $lcfind = lc($find); | ||
59 | 1 | 0s | for my $name ( keys %Encode::Encoding, keys %Encode::ExtModule ) | ||
60 | { | ||||
61 | 125 | 0s | $lcfind eq lc($name) or next; | ||
62 | 1 | 0s | 1 | 0s | $Alias{$find} = Encode::find_encoding($name); # spent 0s making 1 call to Encode::find_encoding, recursion: max depth 1, sum of overlapping time 0s |
63 | 1 | 0s | DEBUG and warn "$find => $name"; | ||
64 | } | ||||
65 | } | ||||
66 | } | ||||
67 | if (DEBUG) { | ||||
68 | my $name; | ||||
69 | if ( my $e = $Alias{$find} ) { | ||||
70 | $name = $e->name; | ||||
71 | } | ||||
72 | else { | ||||
73 | $name = ""; | ||||
74 | } | ||||
75 | warn "find_alias($class, $find)->name = $name"; | ||||
76 | } | ||||
77 | 6 | 0s | return $Alias{$find}; | ||
78 | } | ||||
79 | |||||
80 | # spent 0s within Encode::Alias::define_alias which was called 62 times, avg 0s/call:
# 16 times (0s+0s) by Encode::define_encoding at line 92 of Encode.pm, avg 0s/call
# once (0s+0s) by Encode::Alias::init_aliases at line 236
# once (0s+0s) by Encode::Alias::init_aliases at line 218
# once (0s+0s) by Encode::Alias::init_aliases at line 240
# once (0s+0s) by Encode::Alias::init_aliases at line 140
# once (0s+0s) by Encode::Alias::init_aliases at line 179
# once (0s+0s) by Encode::Alias::init_aliases at line 234
# once (0s+0s) by Encode::Alias::init_aliases at line 235
# once (0s+0s) by Encode::Alias::init_aliases at line 145
# once (0s+0s) by Encode::Alias::init_aliases at line 175
# once (0s+0s) by Encode::Alias::init_aliases at line 243
# once (0s+0s) by Encode::Alias::init_aliases at line 163
# once (0s+0s) by Encode::Alias::init_aliases at line 168
# once (0s+0s) by Encode::Alias::init_aliases at line 228
# once (0s+0s) by Encode::Alias::init_aliases at line 157
# once (0s+0s) by Encode::Alias::init_aliases at line 249
# once (0s+0s) by Encode::Alias::init_aliases at line 139
# once (0s+0s) by Encode::Alias::init_aliases at line 247
# once (0s+0s) by Encode::Alias::init_aliases at line 224
# once (0s+0s) by Encode::Alias::init_aliases at line 223
# once (0s+0s) by Encode::Alias::init_aliases at line 154
# once (0s+0s) by Encode::Alias::init_aliases at line 244
# once (0s+0s) by Encode::Alias::init_aliases at line 260
# once (0s+0s) by Encode::Alias::init_aliases at line 195
# once (0s+0s) by Encode::Alias::init_aliases at line 253
# once (0s+0s) by Encode::Alias::init_aliases at line 252
# once (0s+0s) by Encode::Alias::init_aliases at line 254
# once (0s+0s) by Encode::Alias::init_aliases at line 248
# once (0s+0s) by Encode::Alias::init_aliases at line 239
# once (0s+0s) by Encode::Alias::init_aliases at line 256
# once (0s+0s) by Encode::Alias::init_aliases at line 238
# once (0s+0s) by Encode::Alias::init_aliases at line 160
# once (0s+0s) by Encode::Alias::init_aliases at line 231
# once (0s+0s) by Encode::Alias::init_aliases at line 237
# once (0s+0s) by Encode::Alias::init_aliases at line 263
# once (0s+0s) by Encode::Alias::init_aliases at line 211
# once (0s+0s) by Encode::Alias::init_aliases at line 173
# once (0s+0s) by Encode::Alias::init_aliases at line 209
# once (0s+0s) by Encode::Alias::init_aliases at line 135
# once (0s+0s) by Encode::Alias::init_aliases at line 138
# once (0s+0s) by Encode::Alias::init_aliases at line 153
# once (0s+0s) by Encode::Alias::init_aliases at line 186
# once (0s+0s) by Encode::Alias::init_aliases at line 152
# once (0s+0s) by Encode::Alias::init_aliases at line 255
# once (0s+0s) by Encode::Alias::init_aliases at line 213
# once (0s+0s) by Encode::Alias::init_aliases at line 200
# once (0s+0s) by main::BEGIN@1 at line 107 of ExtUtils/MakeMaker/Locale.pm | ||||
81 | 62 | 0s | while (@_) { | ||
82 | 71 | 0s | my ( $alias, $name ) = splice( @_, 0, 2 ); | ||
83 | 71 | 0s | unshift( @Alias, $alias => $name ); # newer one has precedence | ||
84 | 71 | 0s | if ( ref($alias) ) { | ||
85 | |||||
86 | # clear %Alias cache to allow overrides | ||||
87 | 48 | 0s | my @a = keys %Alias; | ||
88 | 48 | 0s | for my $k (@a) { | ||
89 | 1 | 0s | 1 | 0s | if ( ref($alias) eq 'Regexp' && $k =~ $alias ) { # spent 0s making 1 call to ExtUtils::MakeMaker::Locale::__ANON__[ExtUtils/MakeMaker/Locale.pm:107] |
90 | DEBUG and warn "delete \$Alias\{$k\}"; | ||||
91 | delete $Alias{$k}; | ||||
92 | } | ||||
93 | elsif ( ref($alias) eq 'CODE' && $alias->($k) ) { | ||||
94 | DEBUG and warn "delete \$Alias\{$k\}"; | ||||
95 | delete $Alias{$k}; | ||||
96 | } | ||||
97 | } | ||||
98 | } | ||||
99 | else { | ||||
100 | DEBUG and warn "delete \$Alias\{$alias\}"; | ||||
101 | 23 | 0s | delete $Alias{$alias}; | ||
102 | } | ||||
103 | } | ||||
104 | } | ||||
105 | |||||
106 | # Allow latin-1 style names as well | ||||
107 | # 0 1 2 3 4 5 6 7 8 9 10 | ||||
108 | 1 | 0s | our @Latin2iso = ( 0, 1, 2, 3, 4, 9, 10, 13, 14, 15, 16 ); | ||
109 | |||||
110 | # Allow winlatin1 style names as well | ||||
111 | 1 | 0s | our %Winlatin2cp = ( | ||
112 | 'latin1' => 1252, | ||||
113 | 'latin2' => 1250, | ||||
114 | 'cyrillic' => 1251, | ||||
115 | 'greek' => 1253, | ||||
116 | 'turkish' => 1254, | ||||
117 | 'hebrew' => 1255, | ||||
118 | 'arabic' => 1256, | ||||
119 | 'baltic' => 1257, | ||||
120 | 'vietnamese' => 1258, | ||||
121 | ); | ||||
122 | |||||
123 | 1 | 0s | 1 | 0s | init_aliases(); # spent 0s making 1 call to Encode::Alias::init_aliases |
124 | |||||
125 | # spent 0s within Encode::Alias::undef_aliases which was called:
# once (0s+0s) by Encode::Alias::init_aliases at line 132 | ||||
126 | 1 | 0s | @Alias = (); | ||
127 | 1 | 0s | %Alias = (); | ||
128 | } | ||||
129 | |||||
130 | # spent 0s within Encode::Alias::init_aliases which was called:
# once (0s+0s) by Encode::BEGIN@47 at line 123 | ||||
131 | 1 | 0s | require Encode; | ||
132 | 1 | 0s | 1 | 0s | undef_aliases(); # spent 0s making 1 call to Encode::Alias::undef_aliases |
133 | |||||
134 | # Try all-lower-case version should all else fails | ||||
135 | 1 | 0s | 2 | 0s | define_alias( qr/^(.*)$/ => '"\L$1"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
136 | |||||
137 | # UTF/UCS stuff | ||||
138 | 1 | 0s | 2 | 0s | define_alias( qr/^(unicode-1-1-)?UTF-?7$/i => '"UTF-7"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
139 | 1 | 0s | 2 | 0s | define_alias( qr/^UCS-?2-?LE$/i => '"UCS-2LE"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
140 | 1 | 0s | 4 | 0s | define_alias( # spent 0s making 3 calls to Encode::Alias::CORE:qr, avg 0s/call
# spent 0s making 1 call to Encode::Alias::define_alias |
141 | qr/^UCS-?2-?(BE)?$/i => '"UCS-2BE"', | ||||
142 | qr/^UCS-?4-?(BE|LE)?$/i => 'uc("UTF-32$1")', | ||||
143 | qr/^iso-10646-1$/i => '"UCS-2BE"' | ||||
144 | ); | ||||
145 | 1 | 0s | 4 | 0s | define_alias( # spent 0s making 3 calls to Encode::Alias::CORE:qr, avg 0s/call
# spent 0s making 1 call to Encode::Alias::define_alias |
146 | qr/^UTF-?(16|32)-?BE$/i => '"UTF-$1BE"', | ||||
147 | qr/^UTF-?(16|32)-?LE$/i => '"UTF-$1LE"', | ||||
148 | qr/^UTF-?(16|32)$/i => '"UTF-$1"', | ||||
149 | ); | ||||
150 | |||||
151 | # ASCII | ||||
152 | 1 | 0s | 2 | 0s | define_alias( qr/^(?:US-?)ascii$/i => '"ascii"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
153 | 1 | 0s | 1 | 0s | define_alias( 'C' => 'ascii' ); # spent 0s making 1 call to Encode::Alias::define_alias |
154 | 1 | 0s | 2 | 0s | define_alias( qr/\b(?:ISO[-_]?)?646(?:[-_]?US)?$/i => '"ascii"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
155 | |||||
156 | # Allow variants of iso-8859-1 etc. | ||||
157 | 1 | 0s | 2 | 0s | define_alias( qr/\biso[-_]?(\d+)[-_](\d+)$/i => '"iso-$1-$2"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
158 | |||||
159 | # At least HP-UX has these. | ||||
160 | 1 | 0s | 2 | 0s | define_alias( qr/\biso8859(\d+)$/i => '"iso-8859-$1"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
161 | |||||
162 | # More HP stuff. | ||||
163 | 1 | 0s | 2 | 0s | define_alias( # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
164 | qr/\b(?:hp-)?(arabic|greek|hebrew|kana|roman|thai|turkish)8$/i => | ||||
165 | '"${1}8"' ); | ||||
166 | |||||
167 | # The Official name of ASCII. | ||||
168 | 1 | 0s | 2 | 0s | define_alias( qr/\bANSI[-_]?X3\.4[-_]?1968$/i => '"ascii"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
169 | |||||
170 | # This is a font issue, not an encoding issue. | ||||
171 | # (The currency symbol of the Latin 1 upper half | ||||
172 | # has been redefined as the euro symbol.) | ||||
173 | 1 | 0s | 2 | 0s | define_alias( qr/^(.+)\@euro$/i => '"$1"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
174 | |||||
175 | 1 | 0s | 2 | 0s | define_alias( qr/\b(?:iso[-_]?)?latin[-_]?(\d+)$/i => # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
176 | 'defined $Encode::Alias::Latin2iso[$1] ? "iso-8859-$Encode::Alias::Latin2iso[$1]" : undef' | ||||
177 | ); | ||||
178 | |||||
179 | 1 | 0s | 2 | 0s | define_alias( # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
180 | qr/\bwin(latin[12]|cyrillic|baltic|greek|turkish| | ||||
181 | hebrew|arabic|baltic|vietnamese)$/ix => | ||||
182 | '"cp" . $Encode::Alias::Winlatin2cp{lc($1)}' | ||||
183 | ); | ||||
184 | |||||
185 | # Common names for non-latin preferred MIME names | ||||
186 | 1 | 0s | 1 | 0s | define_alias( # spent 0s making 1 call to Encode::Alias::define_alias |
187 | 'ascii' => 'US-ascii', | ||||
188 | 'cyrillic' => 'iso-8859-5', | ||||
189 | 'arabic' => 'iso-8859-6', | ||||
190 | 'greek' => 'iso-8859-7', | ||||
191 | 'hebrew' => 'iso-8859-8', | ||||
192 | 'thai' => 'iso-8859-11', | ||||
193 | ); | ||||
194 | # RT #20781 | ||||
195 | 1 | 0s | 2 | 0s | define_alias(qr/\btis-?620\b/i => '"iso-8859-11"'); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
196 | |||||
197 | # At least AIX has IBM-NNN (surprisingly...) instead of cpNNN. | ||||
198 | # And Microsoft has their own naming (again, surprisingly). | ||||
199 | # And windows-* is registered in IANA! | ||||
200 | 1 | 0s | 2 | 0s | define_alias( # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
201 | qr/\b(?:cp|ibm|ms|windows)[-_ ]?(\d{2,4})$/i => '"cp$1"' ); | ||||
202 | |||||
203 | # Sometimes seen with a leading zero. | ||||
204 | # define_alias( qr/\bcp037\b/i => '"cp37"'); | ||||
205 | |||||
206 | # Mac Mappings | ||||
207 | # predefined in *.ucm; unneeded | ||||
208 | # define_alias( qr/\bmacIcelandic$/i => '"macIceland"'); | ||||
209 | 1 | 0s | 2 | 0s | define_alias( qr/^(?:x[_-])?mac[_-](.*)$/i => '"mac$1"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
210 | # http://rt.cpan.org/Ticket/Display.html?id=36326 | ||||
211 | 1 | 0s | 2 | 0s | define_alias( qr/^macintosh$/i => '"MacRoman"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
212 | # https://rt.cpan.org/Ticket/Display.html?id=78125 | ||||
213 | 1 | 0s | 2 | 0s | define_alias( qr/^macce$/i => '"MacCentralEurRoman"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
214 | # Ououououou. gone. They are different! | ||||
215 | # define_alias( qr/\bmacRomanian$/i => '"macRumanian"'); | ||||
216 | |||||
217 | # Standardize on the dashed versions. | ||||
218 | 1 | 0s | 2 | 0s | define_alias( qr/\bkoi8[\s\-_]*([ru])$/i => '"koi8-$1"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
219 | |||||
220 | 1 | 0s | unless ($Encode::ON_EBCDIC) { | ||
221 | |||||
222 | # for Encode::CN | ||||
223 | 1 | 0s | 2 | 0s | define_alias( qr/\beuc.*cn$/i => '"euc-cn"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
224 | 1 | 0s | 2 | 0s | define_alias( qr/\bcn.*euc$/i => '"euc-cn"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
225 | |||||
226 | # define_alias( qr/\bGB[- ]?(\d+)$/i => '"euc-cn"' ) | ||||
227 | # CP936 doesn't have vendor-addon for GBK, so they're identical. | ||||
228 | 1 | 0s | 2 | 0s | define_alias( qr/^gbk$/i => '"cp936"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
229 | |||||
230 | # This fixes gb2312 vs. euc-cn confusion, practically | ||||
231 | 1 | 0s | 2 | 0s | define_alias( qr/\bGB[-_ ]?2312(?!-?raw)/i => '"euc-cn"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
232 | |||||
233 | # for Encode::JP | ||||
234 | 1 | 0s | 2 | 0s | define_alias( qr/\bjis$/i => '"7bit-jis"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
235 | 1 | 0s | 2 | 0s | define_alias( qr/\beuc.*jp$/i => '"euc-jp"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
236 | 1 | 0s | 2 | 0s | define_alias( qr/\bjp.*euc$/i => '"euc-jp"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
237 | 1 | 0s | 2 | 0s | define_alias( qr/\bujis$/i => '"euc-jp"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
238 | 1 | 0s | 2 | 0s | define_alias( qr/\bshift.*jis$/i => '"shiftjis"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
239 | 1 | 0s | 2 | 0s | define_alias( qr/\bsjis$/i => '"shiftjis"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
240 | 1 | 0s | 2 | 0s | define_alias( qr/\bwindows-31j$/i => '"cp932"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
241 | |||||
242 | # for Encode::KR | ||||
243 | 1 | 0s | 2 | 0s | define_alias( qr/\beuc.*kr$/i => '"euc-kr"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
244 | 1 | 0s | 2 | 0s | define_alias( qr/\bkr.*euc$/i => '"euc-kr"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
245 | |||||
246 | # This fixes ksc5601 vs. euc-kr confusion, practically | ||||
247 | 1 | 0s | 2 | 0s | define_alias( qr/(?:x-)?uhc$/i => '"cp949"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
248 | 1 | 0s | 2 | 0s | define_alias( qr/(?:x-)?windows-949$/i => '"cp949"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
249 | 1 | 0s | 2 | 0s | define_alias( qr/\bks_c_5601-1987$/i => '"cp949"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
250 | |||||
251 | # for Encode::TW | ||||
252 | 1 | 0s | 2 | 0s | define_alias( qr/\bbig-?5$/i => '"big5-eten"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
253 | 1 | 0s | 2 | 0s | define_alias( qr/\bbig5-?et(?:en)?$/i => '"big5-eten"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
254 | 1 | 0s | 2 | 0s | define_alias( qr/\btca[-_]?big5$/i => '"big5-eten"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
255 | 1 | 0s | 2 | 0s | define_alias( qr/\bbig5-?hk(?:scs)?$/i => '"big5-hkscs"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
256 | 1 | 0s | 2 | 0s | define_alias( qr/\bhk(?:scs)?[-_]?big5$/i => '"big5-hkscs"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
257 | } | ||||
258 | |||||
259 | # utf8 is blessed :) | ||||
260 | 1 | 0s | 2 | 0s | define_alias( qr/\bUTF-8$/i => '"utf-8-strict"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
261 | |||||
262 | # At last, Map white space and _ to '-' | ||||
263 | 1 | 0s | 2 | 0s | define_alias( qr/^(\S+)[\s_]+(.*)$/i => '"$1-$2"' ); # spent 0s making 1 call to Encode::Alias::CORE:qr
# spent 0s making 1 call to Encode::Alias::define_alias |
264 | } | ||||
265 | |||||
266 | 1 | 0s | 1; | ||
267 | __END__ | ||||
sub Encode::Alias::CORE:match; # opcode | |||||
# spent 0s within Encode::Alias::CORE:qr which was called 47 times, avg 0s/call:
# 3 times (0s+0s) by Encode::Alias::init_aliases at line 140, avg 0s/call
# 3 times (0s+0s) by Encode::Alias::init_aliases at line 145, avg 0s/call
# once (0s+0s) by Encode::Alias::init_aliases at line 248
# once (0s+0s) by Encode::Alias::init_aliases at line 238
# once (0s+0s) by Encode::Alias::init_aliases at line 256
# once (0s+0s) by Encode::Alias::init_aliases at line 239
# once (0s+0s) by Encode::Alias::init_aliases at line 160
# once (0s+0s) by Encode::Alias::init_aliases at line 253
# once (0s+0s) by Encode::Alias::init_aliases at line 252
# once (0s+0s) by Encode::Alias::init_aliases at line 254
# once (0s+0s) by Encode::Alias::init_aliases at line 263
# once (0s+0s) by Encode::Alias::init_aliases at line 211
# once (0s+0s) by Encode::Alias::init_aliases at line 173
# once (0s+0s) by Encode::Alias::init_aliases at line 231
# once (0s+0s) by Encode::Alias::init_aliases at line 237
# once (0s+0s) by Encode::Alias::init_aliases at line 135
# once (0s+0s) by Encode::Alias::init_aliases at line 138
# once (0s+0s) by Encode::Alias::init_aliases at line 209
# once (0s+0s) by Encode::Alias::init_aliases at line 213
# once (0s+0s) by Encode::Alias::init_aliases at line 200
# once (0s+0s) by Encode::Alias::init_aliases at line 255
# once (0s+0s) by Encode::Alias::init_aliases at line 152
# once (0s+0s) by Encode::Alias::init_aliases at line 234
# once (0s+0s) by Encode::Alias::init_aliases at line 235
# once (0s+0s) by Encode::Alias::init_aliases at line 236
# once (0s+0s) by Encode::Alias::init_aliases at line 218
# once (0s+0s) by Encode::Alias::init_aliases at line 240
# once (0s+0s) by Encode::Alias::init_aliases at line 179
# once (0s+0s) by Encode::Alias::init_aliases at line 163
# once (0s+0s) by Encode::Alias::init_aliases at line 243
# once (0s+0s) by Encode::Alias::init_aliases at line 228
# once (0s+0s) by Encode::Alias::init_aliases at line 168
# once (0s+0s) by Encode::Alias::init_aliases at line 175
# once (0s+0s) by Encode::Alias::init_aliases at line 249
# once (0s+0s) by Encode::Alias::init_aliases at line 157
# once (0s+0s) by Encode::Alias::init_aliases at line 139
# once (0s+0s) by Encode::Alias::init_aliases at line 154
# once (0s+0s) by Encode::Alias::init_aliases at line 244
# once (0s+0s) by Encode::Alias::init_aliases at line 260
# once (0s+0s) by Encode::Alias::init_aliases at line 195
# once (0s+0s) by Encode::Alias::init_aliases at line 247
# once (0s+0s) by Encode::Alias::init_aliases at line 224
# once (0s+0s) by Encode::Alias::init_aliases at line 223 | |||||
# spent 0s within Encode::Alias::CORE:regcomp which was called 49 times, avg 0s/call:
# 49 times (0s+0s) by Encode::Alias::find_alias at line 31, avg 0s/call |