| 1 | # This code is part of Perl distribution Mail-Message version 4.05. | ||||||||||||||||||||
| 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::Binary;{ | ||||||||||||||||||||
| 13 | 1 | our $VERSION = '4.05'; | |||||||||||||||||||
| 14 | } | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 1 | ▶ | use parent 'Mail::Message::TransferEnc'; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | |||||||||||||||||||||
| 18 | 1 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 19 | 1 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 1 | ▶ | use Log::Report 'mail-message', import => [ qw// ]; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 22 | |||||||||||||||||||||
| 23 | #-------------------- | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | sub name() { 'binary' } | ||||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | sub check($@) | ||||||||||||||||||||
| 28 | 0 | ▶ | { my ($self, $body, %args) = @_; | ||||||||||||||||||
|
Subroutine
check: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 29 | 0 | $body; | |||||||||||||||||||
| 30 | } | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | sub decode($@) | ||||||||||||||||||||
| 33 | 0 | ▶ | { my ($self, $body, %args) = @_; | ||||||||||||||||||
|
Subroutine
decode: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 34 | 0 | $body->transferEncoding('none'); | |||||||||||||||||||
| 35 | 0 | $body; | |||||||||||||||||||
| 36 | } | ||||||||||||||||||||
| 37 | |||||||||||||||||||||
| 38 | sub encode($@) | ||||||||||||||||||||
| 39 | 0 | ▶ | { my ($self, $body, %args) = @_; | ||||||||||||||||||
|
Subroutine
encode: not called CC=5 SCAR=34.0
Pod
documented
| |||||||||||||||||||||
| 40 | 0 | my @lines; | |||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 0 | my $changes = 0; | |||||||||||||||||||
| 43 | 0 | foreach ($body->lines) | |||||||||||||||||||
| 44 | 0 | ▶ | { $changes++ if s/[\000\013]//g; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 45 | 0 | push @lines, $_; | |||||||||||||||||||
| 46 | } | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | 0 | ▶ | unless($changes) | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 49 | 0 | { $body->transferEncoding('none'); | |||||||||||||||||||
| 50 | 0 | return $body; | |||||||||||||||||||
| 51 | } | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | 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
| |||||||||||||||||||||
| 54 | 0 | $bodytype->new(based_on => $body, transfer_encoding => 'none', data => \@lines); | |||||||||||||||||||
| 55 | } | ||||||||||||||||||||
| 56 | |||||||||||||||||||||
| 57 | 1 | 1; | |||||||||||||||||||