line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#======================================================================== |
2
|
|
|
|
|
|
|
# |
3
|
|
|
|
|
|
|
# Badger::Codec::Base64 |
4
|
|
|
|
|
|
|
# |
5
|
|
|
|
|
|
|
# DESCRIPTION |
6
|
|
|
|
|
|
|
# Codec module for encoding/decoding Base64 |
7
|
|
|
|
|
|
|
# |
8
|
|
|
|
|
|
|
# AUTHOR |
9
|
|
|
|
|
|
|
# Andy Wardley |
10
|
|
|
|
|
|
|
# |
11
|
|
|
|
|
|
|
#======================================================================== |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package Badger::Codec::Base64; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
use Badger::Class |
16
|
4
|
|
|
|
|
27
|
version => 0.01, |
17
|
4
|
|
|
4
|
|
2188
|
base => 'Badger::Codec'; |
|
4
|
|
|
|
|
6
|
|
18
|
|
|
|
|
|
|
|
19
|
4
|
|
|
4
|
|
1680
|
use MIME::Base64; |
|
4
|
|
|
|
|
3132
|
|
|
4
|
|
|
|
|
496
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub encode { |
22
|
9
|
|
|
9
|
1
|
22
|
my $self = shift; |
23
|
9
|
|
|
|
|
40
|
encode_base64(shift); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub decode { |
27
|
9
|
|
|
9
|
1
|
18
|
my $self = shift; |
28
|
9
|
|
|
|
|
34
|
decode_base64(shift); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
# shortcuts straight to the real encoder/decoder subs for efficient aliasing |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub encoder { |
34
|
6
|
|
|
6
|
1
|
13
|
\&encode_base64; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub decoder { |
38
|
6
|
|
|
6
|
1
|
11
|
\&decode_base64; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
__END__ |