Filename | /home/hejohns/perl5/lib/perl5/x86_64-linux-gnu-thread-multi/Encode/MIME/Name.pm |
Statements | Executed 11 statements in 317µs |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
1 | 1 | 1 | 9µs | 12µs | BEGIN@2 | Encode::MIME::Name::
1 | 1 | 1 | 4µs | 22µs | BEGIN@3 | Encode::MIME::Name::
1 | 1 | 1 | 3µs | 3µs | CORE:match (opcode) | Encode::MIME::Name::
0 | 0 | 0 | 0s | 0s | get_encode_name | Encode::MIME::Name::
0 | 0 | 0 | 0s | 0s | get_mime_name | Encode::MIME::Name::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | package Encode::MIME::Name; | ||||
2 | 2 | 19µs | 2 | 14µs | # spent 12µs (9+3) within Encode::MIME::Name::BEGIN@2 which was called:
# once (9µs+3µs) by Encode::BEGIN@54 at line 2 # spent 12µs making 1 call to Encode::MIME::Name::BEGIN@2
# spent 3µs making 1 call to strict::import |
3 | 2 | 213µs | 2 | 40µs | # spent 22µs (4+18) within Encode::MIME::Name::BEGIN@3 which was called:
# once (4µs+18µs) by Encode::BEGIN@54 at line 3 # spent 22µs making 1 call to Encode::MIME::Name::BEGIN@3
# spent 18µs making 1 call to warnings::import |
4 | 3 | 10µs | 1 | 3µs | our $VERSION = do { my @r = ( q$Revision: 1.3 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r }; # spent 3µs making 1 call to Encode::MIME::Name::CORE:match |
5 | |||||
6 | # NOTE: This table must be 1:1 mapping | ||||
7 | 1 | 19µs | our %MIME_NAME_OF = ( | ||
8 | 'AdobeStandardEncoding' => 'Adobe-Standard-Encoding', | ||||
9 | 'AdobeSymbol' => 'Adobe-Symbol-Encoding', | ||||
10 | 'ascii' => 'US-ASCII', | ||||
11 | 'big5-hkscs' => 'Big5-HKSCS', | ||||
12 | 'cp1026' => 'IBM1026', | ||||
13 | 'cp1047' => 'IBM1047', | ||||
14 | 'cp1250' => 'windows-1250', | ||||
15 | 'cp1251' => 'windows-1251', | ||||
16 | 'cp1252' => 'windows-1252', | ||||
17 | 'cp1253' => 'windows-1253', | ||||
18 | 'cp1254' => 'windows-1254', | ||||
19 | 'cp1255' => 'windows-1255', | ||||
20 | 'cp1256' => 'windows-1256', | ||||
21 | 'cp1257' => 'windows-1257', | ||||
22 | 'cp1258' => 'windows-1258', | ||||
23 | 'cp37' => 'IBM037', | ||||
24 | 'cp424' => 'IBM424', | ||||
25 | 'cp437' => 'IBM437', | ||||
26 | 'cp500' => 'IBM500', | ||||
27 | 'cp775' => 'IBM775', | ||||
28 | 'cp850' => 'IBM850', | ||||
29 | 'cp852' => 'IBM852', | ||||
30 | 'cp855' => 'IBM855', | ||||
31 | 'cp857' => 'IBM857', | ||||
32 | 'cp860' => 'IBM860', | ||||
33 | 'cp861' => 'IBM861', | ||||
34 | 'cp862' => 'IBM862', | ||||
35 | 'cp863' => 'IBM863', | ||||
36 | 'cp864' => 'IBM864', | ||||
37 | 'cp865' => 'IBM865', | ||||
38 | 'cp866' => 'IBM866', | ||||
39 | 'cp869' => 'IBM869', | ||||
40 | 'cp936' => 'GBK', | ||||
41 | 'euc-cn' => 'EUC-CN', | ||||
42 | 'euc-jp' => 'EUC-JP', | ||||
43 | 'euc-kr' => 'EUC-KR', | ||||
44 | #'gb2312-raw' => 'GB2312', # no, you're wrong, I18N::Charset | ||||
45 | 'hp-roman8' => 'hp-roman8', | ||||
46 | 'hz' => 'HZ-GB-2312', | ||||
47 | 'iso-2022-jp' => 'ISO-2022-JP', | ||||
48 | 'iso-2022-jp-1' => 'ISO-2022-JP-1', | ||||
49 | 'iso-2022-kr' => 'ISO-2022-KR', | ||||
50 | 'iso-8859-1' => 'ISO-8859-1', | ||||
51 | 'iso-8859-10' => 'ISO-8859-10', | ||||
52 | 'iso-8859-13' => 'ISO-8859-13', | ||||
53 | 'iso-8859-14' => 'ISO-8859-14', | ||||
54 | 'iso-8859-15' => 'ISO-8859-15', | ||||
55 | 'iso-8859-16' => 'ISO-8859-16', | ||||
56 | 'iso-8859-2' => 'ISO-8859-2', | ||||
57 | 'iso-8859-3' => 'ISO-8859-3', | ||||
58 | 'iso-8859-4' => 'ISO-8859-4', | ||||
59 | 'iso-8859-5' => 'ISO-8859-5', | ||||
60 | 'iso-8859-6' => 'ISO-8859-6', | ||||
61 | 'iso-8859-7' => 'ISO-8859-7', | ||||
62 | 'iso-8859-8' => 'ISO-8859-8', | ||||
63 | 'iso-8859-9' => 'ISO-8859-9', | ||||
64 | #'jis0201-raw' => 'JIS_X0201', | ||||
65 | #'jis0208-raw' => 'JIS_C6226-1983', | ||||
66 | #'jis0212-raw' => 'JIS_X0212-1990', | ||||
67 | 'koi8-r' => 'KOI8-R', | ||||
68 | 'koi8-u' => 'KOI8-U', | ||||
69 | #'ksc5601-raw' => 'KS_C_5601-1987', | ||||
70 | 'shiftjis' => 'Shift_JIS', | ||||
71 | 'UTF-16' => 'UTF-16', | ||||
72 | 'UTF-16BE' => 'UTF-16BE', | ||||
73 | 'UTF-16LE' => 'UTF-16LE', | ||||
74 | 'UTF-32' => 'UTF-32', | ||||
75 | 'UTF-32BE' => 'UTF-32BE', | ||||
76 | 'UTF-32LE' => 'UTF-32LE', | ||||
77 | 'UTF-7' => 'UTF-7', | ||||
78 | 'utf-8-strict' => 'UTF-8', | ||||
79 | 'viscii' => 'VISCII', | ||||
80 | ); | ||||
81 | |||||
82 | # NOTE: %MIME_NAME_OF is still 1:1 mapping | ||||
83 | 1 | 43µs | our %ENCODE_NAME_OF = map { uc $MIME_NAME_OF{$_} => $_ } keys %MIME_NAME_OF; | ||
84 | |||||
85 | # Add additional 1:N mapping | ||||
86 | 1 | 400ns | $MIME_NAME_OF{'utf8'} = 'UTF-8'; | ||
87 | |||||
88 | sub get_mime_name($) { $MIME_NAME_OF{$_[0]} }; | ||||
89 | |||||
90 | sub get_encode_name($) { $ENCODE_NAME_OF{uc $_[0]} }; | ||||
91 | |||||
92 | 1 | 12µs | 1; | ||
93 | __END__ | ||||
# spent 3µs within Encode::MIME::Name::CORE:match which was called:
# once (3µs+0s) by Encode::BEGIN@54 at line 4 |