| 1 | 19 | ▶ | use v5.12.0; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 2 | 19 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | package Email::MIME::Creator 1.954; | ||||||||||
| 4 | # ABSTRACT: obsolete do-nothing library | ||||||||||
| 5 | |||||||||||
| 6 | 19 | ▶ | use parent q[Email::Simple::Creator]; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 19 | ▶ | use Email::MIME; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 19 | ▶ | use Encode (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 14 | ▶ | sub _construct_part { | ||||||||
|
Subroutine
_construct_part: called CC=3 SCAR=11.0
| |||||||||||
| 11 | 14 | my ($class, $body) = @_; | |||||||||
| 12 | |||||||||||
| 13 | 14 | my $is_binary = $body =~ /[\x00\x80-\xFF]/; | |||||||||
| 14 | |||||||||||
| 15 | 14 | ▶ | my $content_type = $is_binary ? 'application/x-binary' : 'text/plain'; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | |||||||||||
| 17 | 14 | ▶ | Email::MIME->create( | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | attributes => { | ||||||||||
| 19 | content_type => $content_type, | ||||||||||
| 20 | encoding => ($is_binary ? 'base64' : ''), # be safe | ||||||||||
| 21 | }, | ||||||||||
| 22 | body => $body, | ||||||||||
| 23 | ); | ||||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 19 | 1; | |||||||||
| 27 | |||||||||||
| 28 | #pod =head1 SYNOPSIS | ||||||||||
| 29 | #pod | ||||||||||
| 30 | #pod You don't need to use this module for anything. | ||||||||||
| 31 | #pod | ||||||||||
| 32 | #pod =cut | ||||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||