line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Protocol::XMLRPC::Value::Base64; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
976
|
use strict; |
|
6
|
|
|
|
|
49
|
|
|
6
|
|
|
|
|
217
|
|
4
|
6
|
|
|
6
|
|
31
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
175
|
|
5
|
|
|
|
|
|
|
|
6
|
6
|
|
|
6
|
|
31
|
use base 'Protocol::XMLRPC::Value'; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
2012
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
require MIME::Base64; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
1
|
741
|
sub type {'base64'} |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub parse { |
13
|
2
|
|
|
2
|
1
|
3
|
my $class = shift; |
14
|
2
|
|
|
|
|
3
|
my ($value) = @_; |
15
|
|
|
|
|
|
|
|
16
|
2
|
100
|
|
|
|
18
|
die "Invalid 'Base64' value" unless $value =~ m/^[A-Za-z0-9\+\/=]+$/; |
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
|
|
6
|
return $class->new(MIME::Base64::decode_base64($value)); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub to_string { |
22
|
2
|
|
|
2
|
1
|
13
|
my $self = shift; |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
|
|
6
|
my $value = $self->value; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
11
|
$value = MIME::Base64::encode_base64($value); |
27
|
|
|
|
|
|
|
|
28
|
2
|
|
|
|
|
7
|
return "$value"; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |