| 1 | # Copyrights 2001-2023 by [Mark Overmeer <markov@cpan.org>]. | ||||||||||
| 2 | # For other contributors see ChangeLog. | ||||||||||
| 3 | # See the manual pages for details on the licensing terms. | ||||||||||
| 4 | # Pod stripped from pm file by OODoc 2.03. | ||||||||||
| 5 | # This code is part of distribution Mail-Message. Meta-POD processed with | ||||||||||
| 6 | # OODoc into POD and HTML manual-pages. See README.md | ||||||||||
| 7 | # Copyright Mark Overmeer. Licensed under the same terms as Perl itself. | ||||||||||
| 8 | |||||||||||
| 9 | package Mail::Message::TransferEnc; | ||||||||||
| 10 | 13 | ▶ | use vars '$VERSION'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 13 | $VERSION = '3.013'; | |||||||||
| 12 | |||||||||||
| 13 | 13 | ▶ | use base 'Mail::Reporter'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | |||||||||||
| 15 | 13 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 16 | 13 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 17 | |||||||||||
| 18 | |||||||||||
| 19 | 13 | my %encoder = | |||||||||
| 20 | ( base64 => 'Mail::Message::TransferEnc::Base64' | ||||||||||
| 21 | , '7bit' => 'Mail::Message::TransferEnc::SevenBit' | ||||||||||
| 22 | , '8bit' => 'Mail::Message::TransferEnc::EightBit' | ||||||||||
| 23 | , 'quoted-printable' => 'Mail::Message::TransferEnc::QuotedPrint' | ||||||||||
| 24 | ); | ||||||||||
| 25 | |||||||||||
| 26 | #------------------------------------------ | ||||||||||
| 27 | |||||||||||
| 28 | |||||||||||
| 29 | sub create($@) | ||||||||||
| 30 | 0 | ▶ | { my ($class, $type) = (shift, shift); | ||||||||
|
Subroutine
create: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||
| 31 | |||||||||||
| 32 | 0 | my $encoder = $encoder{lc $type}; | |||||||||
| 33 | 0 | ▶ | unless($encoder) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 34 | 0 | { $class->new(@_)->log(WARNING => "No decoder for transfer encoding $type."); | |||||||||
| 35 | 0 | return; | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | 0 | eval "require $encoder"; | |||||||||
| 39 | 0 | ▶ | if($@) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 40 | 0 | { $class->new(@_)->log(ERROR => | |||||||||
| 41 | "Decoder for transfer encoding $type does not work:\n$@"); | ||||||||||
| 42 | 0 | return; | |||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | 0 | $encoder->new(@_); | |||||||||
| 46 | } | ||||||||||
| 47 | |||||||||||
| 48 | |||||||||||
| 49 | sub addTransferEncoder($$) | ||||||||||
| 50 | 0 | ▶ | { my ($class, $type, $encoderclass) = @_; | ||||||||
|
Subroutine
addTransferEncoder: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 51 | 0 | $encoder{lc $type} = $encoderclass; | |||||||||
| 52 | 0 | $class; | |||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | |||||||||||
| 56 | 0 | ▶ | sub name {shift->notImplemented} | ||||||||
|
Subroutine
name: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 57 | |||||||||||
| 58 | #------------------------------------------ | ||||||||||
| 59 | |||||||||||
| 60 | 0 | ▶ | sub check($@) {shift->notImplemented} | ||||||||
|
Subroutine
check: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 61 | |||||||||||
| 62 | |||||||||||
| 63 | 0 | ▶ | sub decode($@) {shift->notImplemented} | ||||||||
|
Subroutine
decode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 64 | |||||||||||
| 65 | |||||||||||
| 66 | 0 | ▶ | sub encode($) {shift->notImplemented} | ||||||||
|
Subroutine
encode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 67 | |||||||||||
| 68 | #------------------------------------------ | ||||||||||
| 69 | |||||||||||
| 70 | 13 | 1; | |||||||||