| 1 | 22 | ▶ | use v5.12.0; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 2 | 22 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | package Email::Simple::Creator 2.218; | ||||||||||||
| 4 | # ABSTRACT: private helper for building Email::Simple objects | ||||||||||||
| 5 | |||||||||||||
| 6 | 22 | ▶ | use Carp (); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 64 | ▶ | sub _crlf { | ||||||||||
|
Subroutine
_crlf: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 64 | "\x0d\x0a"; | |||||||||||
| 10 | } | ||||||||||||
| 11 | |||||||||||||
| 12 | 10 | ▶ | sub _date_header { | ||||||||||
|
Subroutine
_date_header: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | 10 | require Email::Date::Format; | |||||||||||
| 14 | 10 | Email::Date::Format::email_date(); | |||||||||||
| 15 | } | ||||||||||||
| 16 | |||||||||||||
| 17 | 22 | our @CARP_NOT = qw(Email::Simple Email::MIME); | |||||||||||
| 18 | |||||||||||||
| 19 | 25 | ▶ | sub _add_to_header { | ||||||||||
|
Subroutine
_add_to_header: called CC=5 SCAR=16.1
| |||||||||||||
| 20 | 25 | my ($class, $header, $key, $value) = @_; | |||||||||||
| 21 | 25 | ▶ | $value //= ''; | ||||||||||
|
Condition100%2/2
$value //= ""
MC/DC100%1/1
$value //= ""
$value
Truth table100%2/2
A
A= $value
| |||||||||||||
| 22 | |||||||||||||
| 23 | 25 | ▶ | Carp::carp "Header name '$key' with wide characters" if $key =~ /[^\x00-\xFF]/; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 24 | 25 | ▶ | Carp::carp "Value '$value' for '$key' header with wide characters" if $value =~ /[^\x00-\xFF]/; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 25 | |||||||||||||
| 26 | 25 | ▶ | if ($value =~ s/[\x0a\x0b\x0c\x0d\x85\x{2028}\x{2029}]+/ /g) { | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 27 | 1 | Carp::carp("replaced vertical whitespace in $key header with space; this will become fatal in a future version"); | |||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | 25 | $$header .= Email::Simple::Header->__fold_objless("$key: $value", 78, q{ }, $class->_crlf); | |||||||||||
| 31 | } | ||||||||||||
| 32 | |||||||||||||
| 33 | 13 | ▶ | sub _finalize_header { | ||||||||||
|
Subroutine
_finalize_header: called CC=1 SCAR=0.0
| |||||||||||||
| 34 | 13 | my ($class, $header) = @_; | |||||||||||
| 35 | 13 | $$header .= $class->_crlf; | |||||||||||
| 36 | } | ||||||||||||
| 37 | |||||||||||||
| 38 | 22 | 1; | |||||||||||
| 39 | |||||||||||||
| 40 | __END__ | ||||||||||||