| 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::Binary; | ||||||||||||||||||||
| 10 | 1 | ▶ | use vars '$VERSION'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 11 | 1 | $VERSION = '3.013'; | |||||||||||||||||||
| 12 | |||||||||||||||||||||
| 13 | 1 | ▶ | use base 'Mail::Message::TransferEnc'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 16 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | |||||||||||||||||||||
| 19 | sub name() { 'binary' } | ||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | #------------------------------------------ | ||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | sub check($@) | ||||||||||||||||||||
| 24 | 0 | ▶ | { my ($self, $body, %args) = @_; | ||||||||||||||||||
|
Subroutine
check: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 25 | 0 | $body; | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | #------------------------------------------ | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | sub decode($@) | ||||||||||||||||||||
| 31 | 0 | ▶ | { my ($self, $body, %args) = @_; | ||||||||||||||||||
|
Subroutine
decode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 32 | 0 | $body->transferEncoding('none'); | |||||||||||||||||||
| 33 | 0 | $body; | |||||||||||||||||||
| 34 | } | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | #------------------------------------------ | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | sub encode($@) | ||||||||||||||||||||
| 39 | 0 | ▶ | { my ($self, $body, %args) = @_; | ||||||||||||||||||
|
Subroutine
encode: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 0 | my @lines; | |||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | 0 | my $changes = 0; | |||||||||||||||||||
| 44 | 0 | foreach ($body->lines) | |||||||||||||||||||
| 45 | 0 | ▶ | { $changes++ if s/[\000\013]//g; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 46 | 0 | push @lines, $_; | |||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | 0 | ▶ | unless($changes) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 50 | 0 | { $body->transferEncoding('none'); | |||||||||||||||||||
| 51 | 0 | return $body; | |||||||||||||||||||
| 52 | } | ||||||||||||||||||||
| 53 | |||||||||||||||||||||
| 54 | 0 | ▶ | my $bodytype = $args{result_type} || ref($self->load); | ||||||||||||||||||
|
Condition0%0/3
$args{'result_type'} || ref $self->load
MC/DC0%0/2
$args{'result_type'} || ref $self->load
$args{'result_type'}
ref $self->load
Truth table0%0/3
A || B
A= $args{'result_type'}B= ref $self->load
| |||||||||||||||||||||
| 55 | |||||||||||||||||||||
| 56 | 0 | $bodytype->new | |||||||||||||||||||
| 57 | ( based_on => $self | ||||||||||||||||||||
| 58 | , transfer_encoding => 'none' | ||||||||||||||||||||
| 59 | , data => \@lines | ||||||||||||||||||||
| 60 | ); | ||||||||||||||||||||
| 61 | } | ||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | #------------------------------------------ | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | 1 | 1; | |||||||||||||||||||