summaryrefslogtreecommitdiff
path: root/fml/lib/Mail/Message/Encode.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-05-30 00:05:00 +0000
committerfukachan <fukachan>2005-05-30 00:05:00 +0000
commit7001f343a349e4715d819ac9a7b9a52e04aebdf2 (patch)
tree05a0760ade1fd88dff67c12d8a052f4b16776c61 /fml/lib/Mail/Message/Encode.pm
parent0b86e7cacd7d6fc77d902a91a03fb6868cf9a19c (diff)
downloadfml8-7001f343a349e4715d819ac9a7b9a52e04aebdf2.tar.gz
fml8-7001f343a349e4715d819ac9a7b9a52e04aebdf2.tar.bz2
fml8-7001f343a349e4715d819ac9a7b9a52e04aebdf2.zip
switch to use MIME::Base64::Perl not MIME::Base64 module.
define raw_decode_{base64,qp}().
Diffstat (limited to 'fml/lib/Mail/Message/Encode.pm')
-rw-r--r--fml/lib/Mail/Message/Encode.pm42
1 files changed, 39 insertions, 3 deletions
diff --git a/fml/lib/Mail/Message/Encode.pm b/fml/lib/Mail/Message/Encode.pm
index ac7530d0..23f6ef9b 100644
--- a/fml/lib/Mail/Message/Encode.pm
+++ b/fml/lib/Mail/Message/Encode.pm
@@ -4,7 +4,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Encode.pm,v 1.19 2004/07/23 13:11:21 fukachan Exp $
+# $FML: Encode.pm,v 1.20 2005/05/27 01:22:51 fukachan Exp $
#
package Mail::Message::Encode;
@@ -539,7 +539,7 @@ sub decode_base64_string
if ($lang eq 'japanese') {
eval q{
- use MIME::Base64;
+ use MIME::Base64::Perl;
$str_out = decode_base64( $str );
};
@@ -569,7 +569,7 @@ sub decode_qp_string
if ($lang eq 'japanese') {
eval q{
- use MIME::QuotedPrint;
+ use MIME::QuotedPrint::Perl;
$str_out = decode_qp( $str );
};
return $str if $@;
@@ -586,6 +586,42 @@ sub decode_qp_string
}
+# Descriptions: decode mime encoded string.
+# Arguments: OBJ($self) STR($buf)
+# Side Effects: none
+# Return Value: STR
+sub raw_decode_base64
+{
+ my ($self, $buf) = @_;
+ my $rbuf = '';
+
+ eval q{
+ use MIME::Base64::Perl;
+ $rbuf = decode_base64($buf);
+ };
+
+ return( $rbuf || $buf );
+}
+
+
+# Descriptions: decode mime encoded string.
+# Arguments: OBJ($self) STR($buf)
+# Side Effects: none
+# Return Value: STR
+sub raw_decode_qp
+{
+ my ($self, $buf) = @_;
+ my $rbuf = '';
+
+ eval q{
+ use MIME::QuotedPrint::Perl;
+ $rbuf = decode_qp($buf);
+ };
+
+ return( $rbuf || $buf );
+}
+
+
=head1 DEBUG
=head2 str_dump($str)