summaryrefslogtreecommitdiff
path: root/fml/lib/Mail/Message/Encode.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-07-02 12:54:14 +0000
committerfukachan <fukachan>2002-07-02 12:54:14 +0000
commite91cef35933c68f8121b2d645b58baddd634e7de (patch)
treebae3f4d8611726532e96b93f5ac89bae0eea28ee /fml/lib/Mail/Message/Encode.pm
parent349d0b0b5187a54d5ec9f9d7dda0e6c3f52ef759 (diff)
downloadfml8-e91cef35933c68f8121b2d645b58baddd634e7de.tar.gz
fml8-e91cef35933c68f8121b2d645b58baddd634e7de.tar.bz2
fml8-e91cef35933c68f8121b2d645b58baddd634e7de.zip
fix comments
defined()
Diffstat (limited to 'fml/lib/Mail/Message/Encode.pm')
-rw-r--r--fml/lib/Mail/Message/Encode.pm14
1 files changed, 9 insertions, 5 deletions
diff --git a/fml/lib/Mail/Message/Encode.pm b/fml/lib/Mail/Message/Encode.pm
index 52610f63..8544c9b1 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.1 2001/12/23 02:59:48 fukachan Exp $
+# $FML: Encode.pm,v 1.2 2002/05/23 12:47:51 fukachan Exp $
#
package Mail::Message::Encode;
@@ -15,7 +15,7 @@ use Carp;
=head1 NAME
-Mail::Message::Encode - handle a MIME encoded string
+Mail::Message::Encode - MIME encoding engine
=head1 SYNOPSIS
@@ -50,14 +50,18 @@ by $options->{ charset }.
# Descriptions: encode string
-# Arguments: STR($str) HASH_REF)$option)
+# Arguments: STR($str) HASH_REF($option)
# Side Effects: none
# Return Value: STR
sub encode_mime_string
{
my ($str, $options) = @_;
- my $charset = $options->{ 'charset' } || 'iso-2022-jp';
- my $encode = $options->{ 'encode' } || 'base64';
+ my $charset = (defined $options->{ 'charset' } ?
+ $options->{ 'charset' } :
+ 'iso-2022-jp');
+ my $encode = (defined $options->{ 'encode' } ?
+ $options->{ 'encode' } :
+ 'base64');
my $header = '=?'. $charset;
my $trailor = '?=';