← Index
NYTProf Performance Profile   « line view »
For split.pl
  Run on Thu Apr 20 02:05:47 2023
Reported on Thu Apr 20 18:31:10 2023

Filename/home/hejohns/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Encode/Alias.pm
StatementsExecuted 927 statements in 2.26ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
10811544µs565µsEncode::Alias::::find_aliasEncode::Alias::find_alias (recurses: max depth 1, inclusive time 1µs)
111121µs214µsEncode::Alias::::init_aliasesEncode::Alias::init_aliases
4949282µs85µsEncode::Alias::::define_aliasEncode::Alias::define_alias
5046117µs17µsEncode::Alias::::CORE:qrEncode::Alias::CORE:qr (opcode)
1118µs10µsEncode::Alias::::BEGIN@2Encode::Alias::BEGIN@2
3217µs7µsEncode::Alias::::CORE:matchEncode::Alias::CORE:match (opcode)
1115µs30µsEncode::Alias::::BEGIN@5Encode::Alias::BEGIN@5
1114µs18µsEncode::Alias::::BEGIN@3Encode::Alias::BEGIN@3
1114µs7µsEncode::Alias::::BEGIN@7Encode::Alias::BEGIN@7
1113µs3µsEncode::Alias::::BEGIN@111Encode::Alias::BEGIN@111
2112µs2µsEncode::Alias::::CORE:regcompEncode::Alias::CORE:regcomp (opcode)
111700ns700nsEncode::Alias::::undef_aliasesEncode::Alias::undef_aliases
Call graph for these subroutines as a Graphviz dot language file.
Line State
ments
Time
on line
Calls Time
in subs
Code
1package Encode::Alias;
2217µs212µs
# spent 10µs (8+2) within Encode::Alias::BEGIN@2 which was called: # once (8µs+2µs) by Encode::BEGIN@53 at line 2
use strict;
# spent 10µs making 1 call to Encode::Alias::BEGIN@2 # spent 2µs making 1 call to strict::import
3256µs232µs
# spent 18µs (4+14) within Encode::Alias::BEGIN@3 which was called: # once (4µs+14µs) by Encode::BEGIN@53 at line 3
use warnings;
# spent 18µs making 1 call to Encode::Alias::BEGIN@3 # spent 14µs making 1 call to warnings::import
4314µs13µsour $VERSION = do { my @r = ( q$Revision: 2.25 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
# spent 3µs making 1 call to Encode::Alias::CORE:match
5220µs256µs
# spent 30µs (5+26) within Encode::Alias::BEGIN@5 which was called: # once (5µs+26µs) by Encode::BEGIN@53 at line 5
use constant DEBUG => !!$ENV{PERL_ENCODE_DEBUG};
# spent 30µs making 1 call to Encode::Alias::BEGIN@5 # spent 26µs making 1 call to constant::import
6
72364µs210µs
# spent 7µs (4+4) within Encode::Alias::BEGIN@7 which was called: # once (4µs+4µs) by Encode::BEGIN@53 at line 7
use Exporter 'import';
# spent 7µs making 1 call to Encode::Alias::BEGIN@7 # spent 4µs making 1 call to Exporter::import
8
9# Public, encouraged API is exported by default
10
111400nsour @EXPORT =
12 qw (
13 define_alias
14 find_alias
15);
16
17our @Alias; # ordered matching list
18our %Alias; # cached known aliases
19
20
# spent 565µs (544+21) within Encode::Alias::find_alias which was called 108 times, avg 5µs/call: # 108 times (544µs+21µs) by Encode::getEncoding at line 145 of Encode.pm, avg 5µs/call
sub find_alias {
2110832µs my $class = shift;
2210886µs my $find = shift;
2310875µs unless ( exists $Alias{$find} ) {
2421µs $Alias{$find} = undef; # Recursion guard
2522µs for ( my $i = 0 ; $i < @Alias ; $i += 2 ) {
2631µs my $alias = $Alias[$i];
2731µs my $val = $Alias[ $i + 1 ];
283100ns my $new;
29313µs45µs if ( ref($alias) eq 'Regexp' && $find =~ $alias ) {
# spent 4µs making 2 calls to Encode::Alias::CORE:match, avg 2µs/call # spent 2µs making 2 calls to Encode::Alias::CORE:regcomp, avg 850ns/call
30 DEBUG and warn "eval $val";
31117µs $new = eval $val;
# spent 2µs executing statements in string eval
321100ns DEBUG and $@ and warn "$val, $@";
33 }
34 elsif ( ref($alias) eq 'CODE' ) {
35 DEBUG and warn "$alias", "->", "($find)";
361600ns11µs $new = $alias->($find);
37 }
38 elsif ( lc($find) eq lc($alias) ) {
39 $new = $val;
40 }
413800ns if ( defined($new) ) {
422300ns next if $new eq $find; # avoid (direct) recursion on bugs
43 DEBUG and warn "$alias, $new";
4422µs20s my $enc =
# spent 16µs making 2 calls to Encode::find_encoding, avg 8µs/call, recursion: max depth 1, sum of overlapping time 16µs
45 ( ref($new) ) ? $new : Encode::find_encoding($new);
4623µs if ($enc) {
472500ns $Alias{$find} = $enc;
4821µs last;
49 }
50 }
51 }
52
53 # case insensitive search when canonical is not in all lowercase
54 # RT ticket #7835
552700ns unless ( $Alias{$find} ) {
56 my $lcfind = lc($find);
57 for my $name ( keys %Encode::Encoding, keys %Encode::ExtModule )
58 {
59 $lcfind eq lc($name) or next;
60 $Alias{$find} = Encode::find_encoding($name);
61 DEBUG and warn "$find => $name";
62 }
63 }
64 }
65 if (DEBUG) {
66 my $name;
67 if ( my $e = $Alias{$find} ) {
68 $name = $e->name;
69 }
70 else {
71 $name = "";
72 }
73 warn "find_alias($class, $find)->name = $name";
74 }
75108617µs return $Alias{$find};
76}
77
78
# spent 85µs (82+2) within Encode::Alias::define_alias which was called 49 times, avg 2µs/call: # once (7µs+2µs) by IPC::Cmd::can_run at line 144 of ExtUtils/MakeMaker/Locale.pm # once (8µs+0s) by Encode::Alias::init_aliases at line 196 # once (4µs+0s) by Encode::Alias::init_aliases at line 250 # once (3µs+0s) by Encode::Alias::init_aliases at line 141 # once (3µs+0s) by Encode::Alias::init_aliases at line 146 # once (3µs+0s) by Encode::Alias::init_aliases at line 151 # once (2µs+0s) by Encode::Alias::init_aliases at line 159 # once (2µs+0s) by Encode::Alias::init_aliases at line 144 # once (2µs+0s) by Encode::Alias::init_aliases at line 266 # once (2µs+0s) by Encode::Alias::init_aliases at line 145 # once (1µs+0s) by Encode::Alias::init_aliases at line 160 # once (1µs+0s) by Encode::Alias::init_aliases at line 163 # once (1µs+0s) by Encode::Alias::init_aliases at line 205 # once (1µs+0s) by Encode::Alias::init_aliases at line 219 # once (1µs+0s) by Encode::Alias::init_aliases at line 234 # once (1µs+0s) by Encode::Alias::init_aliases at line 262 # once (1µs+0s) by Encode::Alias::init_aliases at line 158 # once (1µs+0s) by Encode::Alias::init_aliases at line 246 # once (1µs+0s) by Encode::Alias::init_aliases at line 233 # once (1µs+0s) by Encode::Alias::init_aliases at line 253 # once (1µs+0s) by Encode::Alias::init_aliases at line 270 # once (1µs+0s) by Encode::Alias::init_aliases at line 274 # once (1µs+0s) by Encode::Alias::init_aliases at line 221 # once (1µs+0s) by Encode::Alias::init_aliases at line 254 # once (1µs+0s) by Encode::Alias::init_aliases at line 173 # once (1µs+0s) by Encode::Alias::init_aliases at line 265 # once (1µs+0s) by Encode::Alias::init_aliases at line 277 # once (1µs+0s) by Encode::Alias::init_aliases at line 223 # once (1µs+0s) by Encode::Alias::init_aliases at line 178 # once (1µs+0s) by Encode::Alias::init_aliases at line 228 # once (1µs+0s) by Encode::Alias::init_aliases at line 247 # once (1µs+0s) by Encode::Alias::init_aliases at line 248 # once (1µs+0s) by Encode::Alias::init_aliases at line 257 # once (1µs+0s) by Encode::Alias::init_aliases at line 238 # once (1µs+0s) by Encode::Alias::init_aliases at line 244 # once (1µs+0s) by Encode::Alias::init_aliases at line 249 # once (1µs+0s) by Encode::Alias::init_aliases at line 183 # once (1µs+0s) by Encode::Alias::init_aliases at line 245 # once (1µs+0s) by Encode::Alias::init_aliases at line 264 # once (1µs+0s) by Encode::Alias::init_aliases at line 263 # once (1µs+0s) by Encode::Alias::init_aliases at line 185 # once (1µs+0s) by Encode::Alias::init_aliases at line 258 # once (1µs+0s) by Encode::Alias::init_aliases at line 167 # once (1µs+0s) by Encode::Alias::init_aliases at line 170 # once (1µs+0s) by Encode::Alias::init_aliases at line 271 # once (1µs+0s) by Encode::Alias::init_aliases at line 189 # once (1µs+0s) by Encode::Alias::init_aliases at line 210 # once (1µs+0s) by Encode::Alias::init_aliases at line 241 # once (1µs+0s) by Encode::Alias::init_aliases at line 259
sub define_alias {
794955µs while (@_) {
80587µs my $alias = shift;
81585µs my $name = shift;
825819µs unshift( @Alias, $alias => $name ) # newer one has precedence
83 if defined $alias;
845817µs if ( ref($alias) ) {
85
86 # clear %Alias cache to allow overrides
87517µs my @a = keys %Alias;
885110µs for my $k (@a) {
8912µs12µs if ( ref($alias) eq 'Regexp' && $k =~ $alias ) {
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 elsif (defined $alias) {
100 DEBUG and warn "delete \$Alias\{$alias\}";
1017800ns delete $Alias{$alias};
102 }
103 elsif (DEBUG) {
104 require Carp;
105 Carp::croak("undef \$alias");
106 }
107 }
108}
109
110# HACK: Encode must be used after define_alias is declarated as Encode calls define_alias
1112700µs13µs
# spent 3µs within Encode::Alias::BEGIN@111 which was called: # once (3µs+0s) by Encode::BEGIN@53 at line 111
use Encode ();
# spent 3µs making 1 call to Encode::Alias::BEGIN@111
112
113# Allow latin-1 style names as well
114# 0 1 2 3 4 5 6 7 8 9 10
1151500nsour @Latin2iso = ( 0, 1, 2, 3, 4, 9, 10, 13, 14, 15, 16 );
116
117# Allow winlatin1 style names as well
11813µsour %Winlatin2cp = (
119 'latin1' => 1252,
120 'latin2' => 1250,
121 'cyrillic' => 1251,
122 'greek' => 1253,
123 'turkish' => 1254,
124 'hebrew' => 1255,
125 'arabic' => 1256,
126 'baltic' => 1257,
127 'vietnamese' => 1258,
128);
129
13011µs1214µsinit_aliases();
# spent 214µs making 1 call to Encode::Alias::init_aliases
131
132
# spent 700ns within Encode::Alias::undef_aliases which was called: # once (700ns+0s) by Encode::Alias::init_aliases at line 138
sub undef_aliases {
1331300ns @Alias = ();
13412µs %Alias = ();
135}
136
137
# spent 214µs (121+93) within Encode::Alias::init_aliases which was called: # once (121µs+93µs) by Encode::BEGIN@53 at line 130
sub init_aliases {
1381300ns1700ns undef_aliases();
# spent 700ns making 1 call to Encode::Alias::undef_aliases
139
140 # Try all-lower-case version should all else fails
14114µs25µs define_alias( qr/^(.*)$/ => '"\L$1"' );
# spent 3µs making 1 call to Encode::Alias::define_alias # spent 1µs making 1 call to Encode::Alias::CORE:qr
142
143 # UTF/UCS stuff
14412µs22µs define_alias( qr/^(unicode-1-1-)?UTF-?7$/i => '"UTF-7"' );
# spent 2µs making 1 call to Encode::Alias::define_alias # spent 400ns making 1 call to Encode::Alias::CORE:qr
14511µs22µs define_alias( qr/^UCS-?2-?LE$/i => '"UCS-2LE"' );
# spent 2µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
14613µs44µs define_alias(
# spent 3µs making 1 call to Encode::Alias::define_alias # spent 900ns making 3 calls to Encode::Alias::CORE:qr, avg 300ns/call
147 qr/^UCS-?2-?(BE)?$/i => '"UCS-2BE"',
148 qr/^UCS-?4-?(BE|LE|)?$/i => 'uc("UTF-32$1")',
149 qr/^iso-10646-1$/i => '"UCS-2BE"'
150 );
15113µs44µs define_alias(
# spent 3µs making 1 call to Encode::Alias::define_alias # spent 700ns making 3 calls to Encode::Alias::CORE:qr, avg 233ns/call
152 qr/^UTF-?(16|32)-?BE$/i => '"UTF-$1BE"',
153 qr/^UTF-?(16|32)-?LE$/i => '"UTF-$1LE"',
154 qr/^UTF-?(16|32)$/i => '"UTF-$1"',
155 );
156
157 # ASCII
15812µs22µs define_alias( qr/^(?:US-?)ascii$/i => '"ascii"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
1591200ns12µs define_alias( 'C' => 'ascii' );
# spent 2µs making 1 call to Encode::Alias::define_alias
16012µs22µs define_alias( qr/\b(?:ISO[-_]?)?646(?:[-_]?US)?$/i => '"ascii"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
161
162 # Allow variants of iso-8859-1 etc.
16311µs22µs define_alias( qr/\biso[-_]?(\d+)[-_](\d+)$/i => '"iso-$1-$2"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
164
165 # ISO-8859-8-I => ISO-8859-8
166 # https://en.wikipedia.org/wiki/ISO-8859-8-I
16712µs21µs define_alias( qr/\biso[-_]8859[-_]8[-_]I$/i => '"iso-8859-8"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
168
169 # At least HP-UX has these.
17011µs21µs define_alias( qr/\biso8859(\d+)$/i => '"iso-8859-$1"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
171
172 # More HP stuff.
17311µs22µs define_alias(
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
174 qr/\b(?:hp-)?(arabic|greek|hebrew|kana|roman|thai|turkish)8$/i =>
175 '"${1}8"' );
176
177 # The Official name of ASCII.
17812µs21µs define_alias( qr/\bANSI[-_]?X3\.4[-_]?1968$/i => '"ascii"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
179
180 # This is a font issue, not an encoding issue.
181 # (The currency symbol of the Latin 1 upper half
182 # has been redefined as the euro symbol.)
18311µs21µs define_alias( qr/^(.+)\@euro$/i => '"$1"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
184
18511µs21µs define_alias( qr/\b(?:iso[-_]?)?latin[-_]?(\d+)$/i =>
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
186'defined $Encode::Alias::Latin2iso[$1] ? "iso-8859-$Encode::Alias::Latin2iso[$1]" : undef'
187 );
188
18914µs21µs define_alias(
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
190 qr/\bwin(latin[12]|cyrillic|baltic|greek|turkish|
191 hebrew|arabic|baltic|vietnamese)$/ix =>
192 '"cp" . $Encode::Alias::Winlatin2cp{lc($1)}'
193 );
194
195 # Common names for non-latin preferred MIME names
1961500ns18µs define_alias(
# spent 8µs making 1 call to Encode::Alias::define_alias
197 'ascii' => 'US-ascii',
198 'cyrillic' => 'iso-8859-5',
199 'arabic' => 'iso-8859-6',
200 'greek' => 'iso-8859-7',
201 'hebrew' => 'iso-8859-8',
202 'thai' => 'iso-8859-11',
203 );
204 # RT #20781
20512µs22µs define_alias(qr/\btis-?620\b/i => '"iso-8859-11"');
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
206
207 # At least AIX has IBM-NNN (surprisingly...) instead of cpNNN.
208 # And Microsoft has their own naming (again, surprisingly).
209 # And windows-* is registered in IANA!
21011µs21µs define_alias(
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
211 qr/\b(?:cp|ibm|ms|windows)[-_ ]?(\d{2,4})$/i => '"cp$1"' );
212
213 # Sometimes seen with a leading zero.
214 # define_alias( qr/\bcp037\b/i => '"cp37"');
215
216 # Mac Mappings
217 # predefined in *.ucm; unneeded
218 # define_alias( qr/\bmacIcelandic$/i => '"macIceland"');
21913µs23µs define_alias( qr/^(?:x[_-])?mac[_-](.*)$/i => '"mac$1"' );
# spent 2µs making 1 call to Encode::Alias::CORE:qr # spent 1µs making 1 call to Encode::Alias::define_alias
220 # http://rt.cpan.org/Ticket/Display.html?id=36326
22112µs22µs define_alias( qr/^macintosh$/i => '"MacRoman"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
222 # https://rt.cpan.org/Ticket/Display.html?id=78125
22312µs21µs define_alias( qr/^macce$/i => '"MacCentralEurRoman"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
224 # Ououououou. gone. They are different!
225 # define_alias( qr/\bmacRomanian$/i => '"macRumanian"');
226
227 # Standardize on the dashed versions.
22812µs22µs define_alias( qr/\bkoi8[\s\-_]*([ru])$/i => '"koi8-$1"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
229
2301300ns unless ($Encode::ON_EBCDIC) {
231
232 # for Encode::CN
23311µs22µs define_alias( qr/\beuc.*cn$/i => '"euc-cn"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
23414µs22µs define_alias( qr/\bcn.*euc$/i => '"euc-cn"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
235
236 # define_alias( qr/\bGB[- ]?(\d+)$/i => '"euc-cn"' )
237 # CP936 doesn't have vendor-addon for GBK, so they're identical.
23813µs21µs define_alias( qr/^gbk$/i => '"cp936"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
239
240 # This fixes gb2312 vs. euc-cn confusion, practically
24111µs21µs define_alias( qr/\bGB[-_ ]?2312(?!-?raw)/i => '"euc-cn"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
242
243 # for Encode::JP
24411µs22µs define_alias( qr/\bjis$/i => '"7bit-jis"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
24511µs21µs define_alias( qr/\beuc.*jp$/i => '"euc-jp"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
24611µs22µs define_alias( qr/\bjp.*euc$/i => '"euc-jp"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
24711µs21µs define_alias( qr/\bujis$/i => '"euc-jp"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
24811µs21µs define_alias( qr/\bshift.*jis$/i => '"shiftjis"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
24911µs21µs define_alias( qr/\bsjis$/i => '"shiftjis"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
25012µs24µs define_alias( qr/\bwindows-31j$/i => '"cp932"' );
# spent 4µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
251
252 # for Encode::KR
25311µs22µs define_alias( qr/\beuc.*kr$/i => '"euc-kr"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
25411µs22µs define_alias( qr/\bkr.*euc$/i => '"euc-kr"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
255
256 # This fixes ksc5601 vs. euc-kr confusion, practically
25711µs21µs define_alias( qr/(?:x-)?uhc$/i => '"cp949"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
25811µs21µs define_alias( qr/(?:x-)?windows-949$/i => '"cp949"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
25911µs21µs define_alias( qr/\bks_c_5601-1987$/i => '"cp949"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
260
261 # for Encode::TW
26211µs22µs define_alias( qr/\bbig-?5$/i => '"big5-eten"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
26313µs23µs define_alias( qr/\bbig5-?et(?:en)?$/i => '"big5-eten"' );
# spent 2µs making 1 call to Encode::Alias::CORE:qr # spent 1µs making 1 call to Encode::Alias::define_alias
26412µs21µs define_alias( qr/\btca[-_]?big5$/i => '"big5-eten"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
26511µs22µs define_alias( qr/\bbig5-?hk(?:scs)?$/i => '"big5-hkscs"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
266114µs22µs define_alias( qr/\bhk(?:scs)?[-_]?big5$/i => '"big5-hkscs"' );
# spent 2µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
267 }
268
269 # https://github.com/dankogai/p5-encode/issues/37
27012µs22µs define_alias(qr/cp65000/i => '"UTF-7"');
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
27112µs21µs define_alias(qr/cp65001/i => '"utf-8-strict"');
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
272
273 # utf8 is blessed :)
27411µs22µs define_alias( qr/\bUTF-8$/i => '"utf-8-strict"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 300ns making 1 call to Encode::Alias::CORE:qr
275
276 # At last, Map white space and _ to '-'
27714µs22µs define_alias( qr/^([^\s_]+)[\s_]+([^\s_]*)$/i => '"$1-$2"' );
# spent 1µs making 1 call to Encode::Alias::define_alias # spent 200ns making 1 call to Encode::Alias::CORE:qr
278}
279
28019µs1;
281__END__
 
# spent 7µs within Encode::Alias::CORE:match which was called 3 times, avg 2µs/call: # 2 times (4µs+0s) by Encode::Alias::find_alias at line 29, avg 2µs/call # once (3µs+0s) by Encode::BEGIN@53 at line 4
sub Encode::Alias::CORE:match; # opcode
# spent 17µs within Encode::Alias::CORE:qr which was called 50 times, avg 334ns/call: # 3 times (900ns+0s) by Encode::Alias::init_aliases at line 146, avg 300ns/call # 3 times (700ns+0s) by Encode::Alias::init_aliases at line 151, avg 233ns/call # once (2µs+0s) by Encode::Alias::init_aliases at line 263 # once (2µs+0s) by Encode::Alias::init_aliases at line 219 # once (1µs+0s) by Encode::Alias::init_aliases at line 141 # once (400ns+0s) by Encode::Alias::init_aliases at line 144 # once (300ns+0s) by Encode::Alias::init_aliases at line 244 # once (300ns+0s) by Encode::Alias::init_aliases at line 270 # once (300ns+0s) by Encode::Alias::init_aliases at line 271 # once (300ns+0s) by Encode::Alias::init_aliases at line 265 # once (300ns+0s) by Encode::Alias::init_aliases at line 185 # once (300ns+0s) by Encode::Alias::init_aliases at line 205 # once (300ns+0s) by Encode::Alias::init_aliases at line 221 # once (300ns+0s) by Encode::Alias::init_aliases at line 228 # once (300ns+0s) by Encode::Alias::init_aliases at line 274 # once (300ns+0s) by Encode::Alias::init_aliases at line 160 # once (300ns+0s) by Encode::Alias::init_aliases at line 189 # once (300ns+0s) by Encode::Alias::init_aliases at line 163 # once (200ns+0s) by Encode::Alias::init_aliases at line 178 # once (200ns+0s) by Encode::Alias::init_aliases at line 245 # once (200ns+0s) by Encode::Alias::init_aliases at line 210 # once (200ns+0s) by Encode::Alias::init_aliases at line 234 # once (200ns+0s) by Encode::Alias::init_aliases at line 254 # once (200ns+0s) by Encode::Alias::init_aliases at line 173 # once (200ns+0s) by Encode::Alias::init_aliases at line 249 # once (200ns+0s) by Encode::Alias::init_aliases at line 277 # once (200ns+0s) by Encode::Alias::init_aliases at line 145 # once (200ns+0s) by Encode::Alias::init_aliases at line 183 # once (200ns+0s) by Encode::Alias::init_aliases at line 264 # once (200ns+0s) by Encode::Alias::init_aliases at line 259 # once (200ns+0s) by Encode::Alias::init_aliases at line 170 # once (200ns+0s) by Encode::Alias::init_aliases at line 246 # once (200ns+0s) by Encode::Alias::init_aliases at line 158 # once (200ns+0s) by Encode::Alias::init_aliases at line 250 # once (200ns+0s) by Encode::Alias::init_aliases at line 223 # once (200ns+0s) by Encode::Alias::init_aliases at line 262 # once (200ns+0s) by Encode::Alias::init_aliases at line 257 # once (200ns+0s) by Encode::Alias::init_aliases at line 258 # once (200ns+0s) by Encode::Alias::init_aliases at line 167 # once (200ns+0s) by Encode::Alias::init_aliases at line 238 # once (200ns+0s) by Encode::Alias::init_aliases at line 253 # once (200ns+0s) by Encode::Alias::init_aliases at line 266 # once (200ns+0s) by Encode::Alias::init_aliases at line 247 # once (200ns+0s) by Encode::Alias::init_aliases at line 233 # once (200ns+0s) by Encode::Alias::init_aliases at line 241 # once (200ns+0s) by Encode::Alias::init_aliases at line 248
sub Encode::Alias::CORE:qr; # opcode
# spent 2µs within Encode::Alias::CORE:regcomp which was called 2 times, avg 850ns/call: # 2 times (2µs+0s) by Encode::Alias::find_alias at line 29, avg 850ns/call
sub Encode::Alias::CORE:regcomp; # opcode