diff options
| author | Ken'ichi Fukamachi <fukachan@fml.org> | 2018-09-07 19:28:24 +0900 |
|---|---|---|
| committer | Ken'ichi Fukamachi <fukachan@fml.org> | 2018-09-08 12:49:20 +0900 |
| commit | 5b2a5a99f00909a005a1677d196a3a177a6448bb (patch) | |
| tree | 40d0a6ff126ce542416bc97b20566cd64b962726 | |
| parent | da4a301897c4bbb6200cb1675a18515bc3ba8b16 (diff) | |
| download | fml8-5b2a5a99f00909a005a1677d196a3a177a6448bb.tar.gz fml8-5b2a5a99f00909a005a1677d196a3a177a6448bb.tar.bz2 fml8-5b2a5a99f00909a005a1677d196a3a177a6448bb.zip | |
define as_external_form() which return the internal data as the external form string.
| -rw-r--r-- | fml/lib/Mail/Message/String.pm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fml/lib/Mail/Message/String.pm b/fml/lib/Mail/Message/String.pm index 2c9d9fd9..df5709d8 100644 --- a/fml/lib/Mail/Message/String.pm +++ b/fml/lib/Mail/Message/String.pm @@ -118,6 +118,27 @@ sub as_str } +=head2 as_external_form() + +return the internal data as the external form string. + +=cut + +# Descriptions: return the internal data as the external form string. +# Arguments: OBJ($self) +# Side Effects: none +# Return Value: STR +sub as_external_form +{ + my ($self) = @_; + + my $str = $self->{ _string } || ''; + use Mail::Message::Encode::Perl; + my $encoder = new Mail::Message::Encode::Perl; + $encoder->convert_from_internal_to_external_form($str); +} + + =head1 MIME related utilities =head2 mime_encode($encode, $out_code, $in_code) |
