| 1 | 3 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 2 | package Email::Abstract::MailMessage; | ||
| 3 | # ABSTRACT: Email::Abstract wrapper for Mail::Message | ||
| 4 | 3 | $Email::Abstract::MailMessage::VERSION = '3.010'; | |
| 5 | 3 | ▶ | use Email::Abstract::Plugin; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 3 | ▶ | BEGIN { @Email::Abstract::MailMessage::ISA = 'Email::Abstract::Plugin' }; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 3 | ▶ | sub target { "Mail::Message" } |
|
Subroutine
target: called CC=1 SCAR=0.0
Pod
undocumented
| |||
| 9 | |||
| 10 | 0 | ▶ | sub construct { |
|
Subroutine
construct: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 11 | 0 | require Mail::Message; | |
| 12 | 0 | my ($class, $rfc822) = @_; | |
| 13 | 0 | Mail::Message->read($rfc822); | |
| 14 | } | ||
| 15 | |||
| 16 | 0 | ▶ | sub get_header { |
|
Subroutine
get_header: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 17 | 0 | my ($class, $obj, $header) = @_; | |
| 18 | 0 | $obj->head->get($header); | |
| 19 | } | ||
| 20 | |||
| 21 | 0 | ▶ | sub get_body { |
|
Subroutine
get_body: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 22 | 0 | my ($class, $obj) = @_; | |
| 23 | 0 | $obj->decoded->string; | |
| 24 | } | ||
| 25 | |||
| 26 | 0 | ▶ | sub set_header { |
|
Subroutine
set_header: not called CC=2 SCAR=17.9
Pod
undocumented
| |||
| 27 | 0 | my ($class, $obj, $header, @data) = @_; | |
| 28 | 0 | $obj->head->delete($header); | |
| 29 | 0 | $obj->head->add($header, $_) for @data; | |
| 30 | } | ||
| 31 | |||
| 32 | 0 | ▶ | sub set_body { |
|
Subroutine
set_body: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 33 | 0 | my ($class, $obj, $body) = @_; | |
| 34 | 0 | $obj->body(Mail::Message::Body->new(data => $body)); | |
| 35 | } | ||
| 36 | |||
| 37 | 0 | ▶ | sub as_string { |
|
Subroutine
as_string: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 38 | 0 | my ($class, $obj) = @_; | |
| 39 | 0 | $obj->string; | |
| 40 | } | ||
| 41 | |||
| 42 | 3 | 1; | |
| 43 | |||
| 44 | #pod =head1 DESCRIPTION | ||
| 45 | #pod | ||
| 46 | #pod This module wraps the Mail::Message mail handling library with an | ||
| 47 | #pod abstract interface, to be used with L<Email::Abstract> | ||
| 48 | #pod | ||
| 49 | #pod =head1 SEE ALSO | ||
| 50 | #pod | ||
| 51 | #pod L<Email::Abstract>, L<Mail::Message>. | ||
| 52 | #pod | ||
| 53 | #pod =cut | ||
| 54 | |||
| 55 | __END__ | ||