line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Deep::Encode; |
2
|
|
|
|
|
|
|
# vim: ts=8 sts=4 sw=4 et |
3
|
10
|
|
|
10
|
|
4453926
|
use strict; |
|
10
|
|
|
|
|
18
|
|
|
10
|
|
|
|
|
278
|
|
4
|
10
|
|
|
10
|
|
37
|
use warnings; |
|
10
|
|
|
|
|
12
|
|
|
10
|
|
|
|
|
3798
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
require Exporter; |
7
|
|
|
|
|
|
|
require Encode; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# Items to export into callers namespace by default. Note: do not export |
12
|
|
|
|
|
|
|
# names by default without a very good reason. Use EXPORT_OK instead. |
13
|
|
|
|
|
|
|
# Do not simply export all your public functions/methods/constants. |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# This allows declaration use Deep::Encode ':all'; |
16
|
|
|
|
|
|
|
# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK |
17
|
|
|
|
|
|
|
# will save memory. |
18
|
|
|
|
|
|
|
our %EXPORT_TAGS = ( |
19
|
|
|
|
|
|
|
all => [ |
20
|
|
|
|
|
|
|
qw( |
21
|
|
|
|
|
|
|
deep_utf8_check |
22
|
|
|
|
|
|
|
deep_utf8_off |
23
|
|
|
|
|
|
|
deep_utf8_on |
24
|
|
|
|
|
|
|
deep_utf8_upgrade |
25
|
|
|
|
|
|
|
deep_utf8_downgrade |
26
|
|
|
|
|
|
|
deep_utf8_decode |
27
|
|
|
|
|
|
|
deep_utf8_encode |
28
|
|
|
|
|
|
|
deep_from_to |
29
|
|
|
|
|
|
|
deep_encode |
30
|
|
|
|
|
|
|
deep_decode |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
deep_str_clone |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
deepc_utf8_upgrade |
35
|
|
|
|
|
|
|
deepc_utf8_downgrade |
36
|
|
|
|
|
|
|
deepc_utf8_decode |
37
|
|
|
|
|
|
|
deepc_utf8_encode |
38
|
|
|
|
|
|
|
deepc_from_to |
39
|
|
|
|
|
|
|
deepc_encode |
40
|
|
|
|
|
|
|
deepc_decode |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
) |
43
|
|
|
|
|
|
|
], |
44
|
|
|
|
|
|
|
); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
our @EXPORT_OK = ( map @$_, map $EXPORT_TAGS{$_} , 'all' ); |
47
|
|
|
|
|
|
|
our @EXPORT = ( map @$_, map $EXPORT_TAGS{$_} , 'all'); |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
our $VERSION = '0.19'; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
require XSLoader; |
52
|
|
|
|
|
|
|
XSLoader::load('Deep::Encode', $VERSION); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
sub deepc_utf8_upgrade{ |
55
|
0
|
|
|
0
|
0
|
0
|
deep_utf8_upgrade( my $val = deep_str_clone( $_[0] )); |
56
|
0
|
|
|
|
|
0
|
return $val; |
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
sub deepc_utf8_downgrade{ |
60
|
0
|
|
|
0
|
0
|
0
|
deep_utf8_downgrade( my $val = deep_str_clone( $_[0] )); |
61
|
0
|
|
|
|
|
0
|
return $val; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
sub deepc_utf8_decode{ |
64
|
0
|
|
|
0
|
0
|
0
|
deep_utf8_decode( my $val = deep_str_clone( $_[0] )); |
65
|
0
|
|
|
|
|
0
|
return $val; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub deepc_utf8_encode{ |
69
|
8
|
|
|
8
|
0
|
2389
|
deep_utf8_encode( my $val = deep_str_clone( $_[0] )); |
70
|
8
|
|
|
|
|
37
|
return $val; |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
sub deepc_decode{ |
73
|
0
|
|
|
0
|
0
|
0
|
deep_decode( my $val = deep_str_clone( $_[0] ), $_[1]); |
74
|
0
|
|
|
|
|
0
|
return $val; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
sub deepc_encode{ |
77
|
0
|
|
|
0
|
0
|
0
|
deep_encode( my $val = deep_str_clone( $_[0] ), $_[1]); |
78
|
0
|
|
|
|
|
0
|
return $val; |
79
|
|
|
|
|
|
|
} |
80
|
|
|
|
|
|
|
sub deepc_from_to{ |
81
|
4
|
|
|
4
|
0
|
4318
|
deep_from_to( my $val = deep_str_clone( $_[0] ), $_[1], $_[2]); |
82
|
4
|
|
|
|
|
3206
|
return $val; |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
1; |