| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# This code is part of Perl distribution Mail-Message version 4.04. |
|
2
|
|
|
|
|
|
|
# The POD got stripped from this file by OODoc version 3.06. |
|
3
|
|
|
|
|
|
|
# For contributors see file ChangeLog. |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
# This software is copyright (c) 2001-2026 by Mark Overmeer. |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# This is free software; you can redistribute it and/or modify it under |
|
8
|
|
|
|
|
|
|
# the same terms as the Perl 5 programming language system itself. |
|
9
|
|
|
|
|
|
|
# SPDX-License-Identifier: Artistic-1.0-Perl OR GPL-1.0-or-later |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package Mail::Message::TransferEnc;{ |
|
13
|
|
|
|
|
|
|
our $VERSION = '4.04'; |
|
14
|
|
|
|
|
|
|
} |
|
15
|
|
|
|
|
|
|
|
|
16
|
13
|
|
|
13
|
|
8620
|
use parent 'Mail::Reporter'; |
|
|
13
|
|
|
|
|
38
|
|
|
|
13
|
|
|
|
|
93
|
|
|
17
|
|
|
|
|
|
|
|
|
18
|
13
|
|
|
13
|
|
4492
|
use strict; |
|
|
13
|
|
|
|
|
61
|
|
|
|
13
|
|
|
|
|
455
|
|
|
19
|
13
|
|
|
13
|
|
66
|
use warnings; |
|
|
13
|
|
|
|
|
43
|
|
|
|
13
|
|
|
|
|
1071
|
|
|
20
|
|
|
|
|
|
|
|
|
21
|
13
|
|
|
13
|
|
106
|
use Log::Report 'mail-message', import => [ qw/__x error/ ]; |
|
|
13
|
|
|
|
|
31
|
|
|
|
13
|
|
|
|
|
141
|
|
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
#-------------------- |
|
24
|
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
my %encoder = ( |
|
26
|
|
|
|
|
|
|
'base64' => 'Mail::Message::TransferEnc::Base64', |
|
27
|
|
|
|
|
|
|
'7bit' => 'Mail::Message::TransferEnc::SevenBit', |
|
28
|
|
|
|
|
|
|
'8bit' => 'Mail::Message::TransferEnc::EightBit', |
|
29
|
|
|
|
|
|
|
'quoted-printable' => 'Mail::Message::TransferEnc::QuotedPrint', |
|
30
|
|
|
|
|
|
|
); |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
#-------------------- |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub create($@) |
|
35
|
0
|
|
|
0
|
1
|
|
{ my ($class, $type) = (shift, shift); |
|
36
|
|
|
|
|
|
|
|
|
37
|
0
|
0
|
|
|
|
|
my $encoder = $encoder{lc $type} |
|
38
|
|
|
|
|
|
|
or error __x"no decoder for transfer encoding {type}.", type => $type; |
|
39
|
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
eval "require $encoder"; |
|
41
|
0
|
0
|
|
|
|
|
$@ and error __x"decoder for transfer encoding {type} does not work:\n{error}", type => $type, error => $@; |
|
42
|
|
|
|
|
|
|
|
|
43
|
0
|
|
|
|
|
|
$encoder->new(@_); |
|
44
|
|
|
|
|
|
|
} |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub addTransferEncoder($$) |
|
48
|
0
|
|
|
0
|
1
|
|
{ my ($class, $type, $encoderclass) = @_; |
|
49
|
0
|
|
|
|
|
|
$encoder{lc $type} = $encoderclass; |
|
50
|
0
|
|
|
|
|
|
$class; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
|
|
54
|
0
|
|
|
0
|
1
|
|
sub name { $_[0]->notImplemented } |
|
55
|
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
#-------------------- |
|
57
|
|
|
|
|
|
|
|
|
58
|
0
|
|
|
0
|
1
|
|
sub check($@) { $_[0]->notImplemented } |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
|
61
|
0
|
|
|
0
|
1
|
|
sub decode($@) { $_[0]->notImplemented } |
|
62
|
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
|
|
64
|
0
|
|
|
0
|
1
|
|
sub encode($) { $_[0]->notImplemented } |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
#-------------------- |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |