diff options
| -rw-r--r-- | fml/lib/FML/Command/Admin/chaddr.pm | 12 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Admin/off.pm | 10 | ||||
| -rw-r--r-- | fml/lib/FML/Command/User/admin.pm | 6 | ||||
| -rw-r--r-- | fml/lib/FML/Command/User/digest.pm | 23 | ||||
| -rw-r--r-- | fml/lib/FML/Command/User/unsubscribe.pm | 16 | ||||
| -rw-r--r-- | fml/lib/Mail/Delivery.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Delivery/ESMTP.pm | 8 | ||||
| -rw-r--r-- | fml/lib/Mail/Delivery/ErrorStatus.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Delivery/Net/INET4.pm | 16 | ||||
| -rw-r--r-- | fml/lib/Mail/Delivery/Net/INET6.pm | 23 | ||||
| -rw-r--r-- | fml/lib/Mail/Delivery/Queue.pm | 38 | ||||
| -rw-r--r-- | fml/lib/Mail/Delivery/Utils.pm | 36 | ||||
| -rw-r--r-- | fml/lib/Mail/Message/Address.pm | 28 |
13 files changed, 119 insertions, 105 deletions
diff --git a/fml/lib/FML/Command/Admin/chaddr.pm b/fml/lib/FML/Command/Admin/chaddr.pm index e56ba3f5..218ac087 100644 --- a/fml/lib/FML/Command/Admin/chaddr.pm +++ b/fml/lib/FML/Command/Admin/chaddr.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: chaddr.pm,v 1.25 2004/04/23 04:10:28 fukachan Exp $ +# $FML: chaddr.pm,v 1.26 2004/04/28 04:10:36 fukachan Exp $ # package FML::Command::Admin::chaddr; @@ -15,7 +15,7 @@ use Carp; =head1 NAME -FML::Command::Admin::chaddr - change the subscribed address +FML::Command::Admin::chaddr - change the subscribed address. =head1 SYNOPSIS @@ -47,14 +47,14 @@ sub new } -# Descriptions: need lock or not +# Descriptions: need lock or not. # Arguments: none # Side Effects: none # Return Value: NUM( 1 or 0) sub need_lock { 1;} -# Descriptions: lock channel +# Descriptions: lock channel. # Arguments: none # Side Effects: none # Return Value: STR @@ -115,7 +115,7 @@ sub process { my ($self, $curproc, $command_args) = @_; my $config = $curproc->config(); - my $options = $command_args->{ options }; + my $options = $command_args->{ options } || []; # XXX We should always add/rewrite only $primary_*_map maps via # XXX command mail, CUI and GUI. @@ -123,7 +123,7 @@ sub process # XXX 1) may be not writable. # XXX 2) ambigous and dangerous # XXX since the map is under controlled by other module. - # XXX for example, one of member_maps is under admin_member_maps. + # XXX for example, $member_maps contains different classes. my $member_map = $config->{ 'primary_member_map' }; my $recipient_map = $config->{ 'primary_recipient_map' }; diff --git a/fml/lib/FML/Command/Admin/off.pm b/fml/lib/FML/Command/Admin/off.pm index 703f8133..a6894fd5 100644 --- a/fml/lib/FML/Command/Admin/off.pm +++ b/fml/lib/FML/Command/Admin/off.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: off.pm,v 1.18 2004/04/28 04:10:36 fukachan Exp $ +# $FML: off.pm,v 1.19 2004/04/30 13:38:05 fukachan Exp $ # package FML::Command::Admin::off; @@ -45,14 +45,14 @@ sub new } -# Descriptions: need lock or not +# Descriptions: need lock or not. # Arguments: none # Side Effects: none # Return Value: NUM( 1 or 0) sub need_lock { 1;} -# Descriptions: lock channel +# Descriptions: lock channel. # Arguments: none # Side Effects: none # Return Value: STR @@ -82,7 +82,7 @@ sub process my ($self, $curproc, $command_args) = @_; my $config = $curproc->config(); my $cred = $curproc->{ credential }; - my $options = $command_args->{ options }; + my $options = $command_args->{ options } || []; my $address = $command_args->{ command_data } || $options->[ 0 ]; # XXX We should always add/rewrite only $primary_*_map maps via @@ -91,7 +91,7 @@ sub process # XXX 1) may be not writable. # XXX 2) ambigous and dangerous # XXX since the map is under controlled by other module. - # XXX for example, one of member_maps is under admin_member_maps. + # XXX for example, $member_maps contains different classes. my $recipient_map = $config->{ 'primary_recipient_map' }; # fundamental sanity check diff --git a/fml/lib/FML/Command/User/admin.pm b/fml/lib/FML/Command/User/admin.pm index 978543df..c662261e 100644 --- a/fml/lib/FML/Command/User/admin.pm +++ b/fml/lib/FML/Command/User/admin.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: admin.pm,v 1.7 2004/03/14 09:05:05 fukachan Exp $ +# $FML: admin.pm,v 1.8 2004/04/30 13:39:15 fukachan Exp $ # package FML::Command::User::admin; @@ -65,7 +65,7 @@ sub rewrite_prompt } -# Descriptions: need lock or not +# Descriptions: need lock or not. # Arguments: none # Side Effects: none # Return Value: NUM( 1 or 0) @@ -265,7 +265,7 @@ sub _apply_new_admin_command_mail_restrictions return 0; } else { - $curproc->log("unknown result"); + $curproc->log("unknown result: $result"); return 0; } } diff --git a/fml/lib/FML/Command/User/digest.pm b/fml/lib/FML/Command/User/digest.pm index 3d4dfe36..64c1bd2a 100644 --- a/fml/lib/FML/Command/User/digest.pm +++ b/fml/lib/FML/Command/User/digest.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: digest.pm,v 1.12 2004/02/24 14:36:52 fukachan Exp $ +# $FML: digest.pm,v 1.13 2004/04/23 04:10:32 fukachan Exp $ # package FML::Command::User::digest; @@ -15,7 +15,7 @@ use Carp; =head1 NAME -FML::Command::User::digest - change delivery mode between digest and real time +FML::Command::User::digest - change delivery mode between digest and real time. =head1 SYNOPSIS @@ -32,7 +32,7 @@ change delivery mode among real time and digest. =cut -# Descriptions: standard constructor +# Descriptions: constructor. # Arguments: OBJ($self) # Side Effects: none # Return Value: OBJ @@ -45,14 +45,14 @@ sub new } -# Descriptions: need lock or not +# Descriptions: need lock or not. # Arguments: none # Side Effects: none # Return Value: NUM( 1 or 0) sub need_lock { 1;} -# Descriptions: lock channel +# Descriptions: lock channel. # Arguments: none # Side Effects: none # Return Value: STR @@ -76,7 +76,7 @@ sub process # XXX 1) may be not writable. # XXX 2) ambigous and dangerous # XXX since the map is under controlled by other module. - # XXX for example, one of member_maps is under admin_member_maps. + # XXX for example, $member_maps contains different classes. my $member_map = $config->{ primary_member_map }; my $recipient_map = $config->{ primary_recipient_map }; my $cache_dir = $config->{ db_dir }; @@ -99,7 +99,7 @@ sub process return; } - if ($command =~ /digest\s+(\w+)/) { + if ($command =~ /digest\s+(\w+)/o) { $mode = $1; } @@ -119,13 +119,14 @@ sub process $obj->process($curproc, $command_args); } else { - $curproc->logerror("unknown digest mode: $mode"); - croak("no such digest mode: off or on"); + my $r = "digest: unknown mode: $mode"; + $curproc->logerror($r); + croak($r); } } else { - $curproc->logerror("digest: mode not specified"); - croak("digest: mode not specified"); + $curproc->logerror("digest: mode unspecified"); + croak("digest: mode unspecified"); } } diff --git a/fml/lib/FML/Command/User/unsubscribe.pm b/fml/lib/FML/Command/User/unsubscribe.pm index a1a22c58..5b9309d0 100644 --- a/fml/lib/FML/Command/User/unsubscribe.pm +++ b/fml/lib/FML/Command/User/unsubscribe.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: unsubscribe.pm,v 1.28 2004/03/13 11:46:33 fukachan Exp $ +# $FML: unsubscribe.pm,v 1.29 2004/04/23 04:10:32 fukachan Exp $ # package FML::Command::User::unsubscribe; @@ -15,7 +15,7 @@ use Carp; =head1 NAME -FML::Command::User::unsubscribe - unsubscribe request handling +FML::Command::User::unsubscribe - unsubscribe request handling. =head1 SYNOPSIS @@ -33,7 +33,7 @@ After confirmation succeeds, unsubcribe process proceeds. =cut -# Descriptions: standard constructor +# Descriptions: constructor. # Arguments: OBJ($self) # Side Effects: none # Return Value: OBJ @@ -46,21 +46,21 @@ sub new } -# Descriptions: need lock or not +# Descriptions: need lock or not. # Arguments: none # Side Effects: none # Return Value: NUM( 1 or 0) sub need_lock { 1;} -# Descriptions: lock channel +# Descriptions: lock channel. # Arguments: none # Side Effects: none # Return Value: STR sub lock_channel { return 'command_serialize';} -# Descriptions: unsubscribe adapter: confirm before unsubscribe +# Descriptions: unsubscribe adapter: confirm before unsubscribe. # Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) # Side Effects: update database for confirmation. # prepare reply message. @@ -77,7 +77,7 @@ sub process # XXX 1) may be not writable. # XXX 2) ambigous and dangerous # XXX since the map is under controlled by other module. - # XXX for example, one of member_maps is under admin_member_maps. + # XXX for example, $member_maps contains different classes. my $member_map = $config->{ primary_member_map }; my $recipient_map = $config->{ primary_recipient_map }; my $cache_dir = $config->{ db_dir }; @@ -99,7 +99,7 @@ sub process } } - # exatct match as could as possible. + # exact match as could as possible. my $compare_level = $cred->get_compare_level(); $cred->set_compare_level( 100 ); diff --git a/fml/lib/Mail/Delivery.pm b/fml/lib/Mail/Delivery.pm index 3458c3a9..b60722bb 100644 --- a/fml/lib/Mail/Delivery.pm +++ b/fml/lib/Mail/Delivery.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: Delivery.pm,v 1.10 2003/02/11 09:48:18 fukachan Exp $ +# $FML: Delivery.pm,v 1.11 2004/01/24 09:00:54 fukachan Exp $ # package Mail::Delivery; @@ -17,7 +17,7 @@ use IO::Socket; =head1 NAME -Mail::Delivery - mail delivery system interface +Mail::Delivery - mail delivery system interface. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Delivery/ESMTP.pm b/fml/lib/Mail/Delivery/ESMTP.pm index f8897927..02b5d092 100644 --- a/fml/lib/Mail/Delivery/ESMTP.pm +++ b/fml/lib/Mail/Delivery/ESMTP.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: ESMTP.pm,v 1.9 2003/01/11 15:14:24 fukachan Exp $ +# $FML: ESMTP.pm,v 1.10 2003/01/11 15:16:34 fukachan Exp $ # package Mail::Delivery::ESMTP; @@ -29,7 +29,7 @@ sub new =head1 NAME -Mail::Delivery::ESMTP - Extended SMTP class +Mail::Delivery::ESMTP - Extended SMTP class. =head1 SYNOPSIS @@ -37,8 +37,8 @@ Mail::Delivery::ESMTP - Extended SMTP class ... make Mail::Message object ... - use Mail::Delivery::ESMTP; - $service = new Mail::Delivery::ESMTP; + use Mail::Delivery; + $service = new Mail::Delivery { protocol => 'ESMTP' }; $service->deliver( ... ); See L<Mail::Delivery::SMTP> for more details since this ESMTP class diff --git a/fml/lib/Mail/Delivery/ErrorStatus.pm b/fml/lib/Mail/Delivery/ErrorStatus.pm index 669d2d42..9226c6e2 100644 --- a/fml/lib/Mail/Delivery/ErrorStatus.pm +++ b/fml/lib/Mail/Delivery/ErrorStatus.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: ErrorStatus.pm,v 1.7 2003/08/23 15:33:17 fukachan Exp $ +# $FML: ErrorStatus.pm,v 1.8 2004/01/24 09:00:55 fukachan Exp $ # package Mail::Delivery::ErrorStatus; @@ -19,7 +19,7 @@ require Exporter; =head1 NAME -Mail::Delivery::ErrorStatus - error handling component +Mail::Delivery::ErrorStatus - error handling component. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Delivery/Net/INET4.pm b/fml/lib/Mail/Delivery/Net/INET4.pm index 10345432..4542f299 100644 --- a/fml/lib/Mail/Delivery/Net/INET4.pm +++ b/fml/lib/Mail/Delivery/Net/INET4.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: INET4.pm,v 1.8 2004/01/02 14:42:47 fukachan Exp $ +# $FML: INET4.pm,v 1.9 2004/01/24 09:03:58 fukachan Exp $ # package Mail::Delivery::Net::INET4; @@ -37,7 +37,7 @@ sub connect4 }; if ($@) { Log("Error: cannot create socket for $mta"); - $self->error_set("Error: cannot create socket: $@"); + $self->error_set("cannot create socket: $@"); return undef; } @@ -49,7 +49,7 @@ sub connect4 } else { Log("(debug) error. fail to connect $mta"); - $self->error_set("Error: cannot open socket: $!"); + $self->error_set("cannot open socket: $!"); return undef; } } @@ -57,7 +57,7 @@ sub connect4 =head1 NAME -Mail::Delivery::Net::INET4 - establish tcp connection over IPv4 +Mail::Delivery::Net::INET4 - establish tcp connection over IPv4. =head1 SYNOPSIS @@ -76,14 +76,12 @@ IPv4. This is a typical socket program. =item C<connect4()> try L<connect(2)>. -If it succeeds, returned -$self->{ _socket } has true value. -If not, -$self->{ _socket } is undef. +If it succeeds, returned file handle and set the value at $self->{ _socket }. +If failed, $self->{ _socket } is undef. Avaialble arguments follows: - connect4( { _mta => $mta }); + connect4( { _mta => $mta } ); $mta is a hostname or [raw_ipv4_addr]:port form, for example, 127.0.0.1:25. diff --git a/fml/lib/Mail/Delivery/Net/INET6.pm b/fml/lib/Mail/Delivery/Net/INET6.pm index 61c16817..c1dc1694 100644 --- a/fml/lib/Mail/Delivery/Net/INET6.pm +++ b/fml/lib/Mail/Delivery/Net/INET6.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: INET6.pm,v 1.13 2003/12/31 04:08:45 fukachan Exp $ +# $FML: INET6.pm,v 1.14 2004/01/24 09:03:58 fukachan Exp $ # package Mail::Delivery::Net::INET6; @@ -99,7 +99,7 @@ sub connect6 } } - # hmm, invalid MTA + # Error: hmm, invalid MTA unless ($host && $port) { Log("connect6: cannot find mta=$mta"); $self->{_socket} = undef; @@ -118,7 +118,7 @@ sub connect6 my @res = getaddrinfo($host, $port, AF_UNSPEC, SOCK_STREAM); $family = -1; - # clean up + # reset. delete $self->{_socket} if defined $self->{_socket}; ADDR_ENTRY: @@ -133,8 +133,9 @@ sub connect6 $fh = new IO::Socket; socket($fh, $family, $type, $proto) || do { + # XXX-TODO: need error_clear() some where ??? Log("Error: cannot create IPv6 socket"); - $self->error_set("Error: cannot create IPv6 socket"); + $self->error_set("cannot create IPv6 socket"); next ADDR_ENTRY; }; if (connect($fh, $saddr)) { @@ -143,7 +144,7 @@ sub connect6 } else { Log("Error: cannot connect [$host]:$port via IPv6"); - $self->error_set("Error: cannot [$host]:$port via IPv6"); + $self->error_set("cannot [$host]:$port via IPv6"); } $family = -1; @@ -164,7 +165,7 @@ sub connect6 } else { delete $self->{_socket}; Log("(debug6) fail to connect [$host]:$port by IPv6"); - $self->error_set("Error: cannot [$host]:$port via IPv6"); + $self->error_set("cannot [$host]:$port via IPv6"); } }; @@ -174,7 +175,7 @@ sub connect6 =head1 NAME -Mail::Delivery::Net::INET6 - establish tcp connection over IPv6 +Mail::Delivery::Net::INET6 - establish tcp connection over IPv6. =head1 SYNOPSIS @@ -197,14 +198,12 @@ If Socket6 module exists, we assume your operating system is IPv6 ready! =item C<connect6()> try L<connect(2)>. -If it succeeds, returned -$self->{ _socket } has true value. -If not, -$self->{ _socket } is undef. +If it succeeds, returned socket and set the value at $self->{ _socket }. +If failed, $self->{ _socket } is undef. Avaialble arguments follows: - connect6( { _mta => $mta }); + connect6( { _mta => $mta } ); $mta is a hostname or [raw_ipv6_addr]:port form, for example, [::1]:25. diff --git a/fml/lib/Mail/Delivery/Queue.pm b/fml/lib/Mail/Delivery/Queue.pm index baa42450..4bb934cb 100644 --- a/fml/lib/Mail/Delivery/Queue.pm +++ b/fml/lib/Mail/Delivery/Queue.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: Queue.pm,v 1.38 2004/06/27 02:39:31 fukachan Exp $ +# $FML: Queue.pm,v 1.39 2004/06/27 06:02:59 fukachan Exp $ # package Mail::Delivery::Queue; @@ -17,7 +17,7 @@ use Mail::Delivery::ErrorStatus qw(error_set error error_clear); =head1 NAME -Mail::Delivery::Queue - hashed directory holding queue files +Mail::Delivery::Queue - handle queue directory. =head1 SYNOPSIS @@ -50,21 +50,21 @@ C<in()> method creates a new queue file C<$qf>. So, C<$qf> follows: $qf = "$queue_dir/new/$qid" -When C<$qid> is prepared to be deliverd, you must move the queue file -from new/ to active/ by C<rename(2)>. You can do it by C<setrunnable()> -method. +When C<$qid> queue is ready to be delivered, you must move the queue +file from new/ to active/ by C<rename(2)>. To make this queue +deliverable, use C<setrunnable()> method. $queue_dir/new/$qid ---> $queue_dir/active/$qid The actual delivery is done by other modules such as C<Mail::Delivery>. -C<Mail::Delivery::Queue> manipulats only queue around things. +C<Mail::Delivery::Queue> manipulates only queue around things. =head1 METHODS =head2 new($args) -constructor. You must specify C<queue directory> as +constructor. You must specify at least C<queue directory> as $args->{ dirctory } . @@ -208,7 +208,7 @@ where C<$qid> is like this: 990157187.20792.1 =cut -# Descriptions: return queue file list. +# Descriptions: return queue file list as ARRAY_REF. # Arguments: OBJ($self) # Side Effects: none # Return Value: ARRAY_REF @@ -289,8 +289,8 @@ sub getidinfo return { id => $id, path => $self->active_file_path($id), - sender => $sender, - recipients => \@recipients, + sender => $sender || '', + recipients => \@recipients || [], }; } @@ -311,7 +311,7 @@ use Fcntl qw(:DEFAULT :flock); # Descriptions: lock queue. # Arguments: OBJ($self) HASH_REF($args) # Side Effects: flock queue -# Return Value: 1 or 0 +# Return Value: NUM(1 or 0) sub lock { my ($self, $args) = @_; @@ -335,7 +335,7 @@ sub lock # Descriptions: unlock queue. # Arguments: OBJ($self) # Side Effects: unlock queue by flock(2) -# Return Value: 1 or 0 +# Return Value: NUM(1 or 0) sub unlock { my ($self) = @_; @@ -353,7 +353,7 @@ C<$msg> is C<Mail::Message> object by default. If C<$msg> object has print() method, arbitrary C<$msg> is acceptable. -REMEMBER YOU MUST DO C<setrunnable()> for the queue to deliver. +REMEMBER YOU MUST DO C<setrunnable()> for the queue to be delivered. If you not C<setrunnable()> it, the queue file is removed by C<DESTRUCTOR>. @@ -430,7 +430,7 @@ C<info/recipients/> directories. =cut -# Descriptions: set value for key +# Descriptions: set value for key. # Arguments: OBJ($self) STR($key) STR($value) # Side Effects: none # Return Value: same as close() @@ -520,10 +520,10 @@ directory to C<active/> directory like C<postfix> queue strategy. =cut -# Descriptions: enable this object queue to be delivery ready. +# Descriptions: enable this object queue to be deliverable. # Arguments: OBJ($self) # Side Effects: move $queue_id file from new/ to active/ -# Return Value: 1 (success) or 0 (fail) +# Return Value: NUM( 1 (success) or 0 (fail) ) sub setrunnable { my ($self) = @_; @@ -562,13 +562,13 @@ remove all queue assigned to this object C<$self>. =head2 valid() -It checks the queue file is broken or not. -return 1 (valid) or 0. +check if the queue file is broken or not. +return 1 (valid) or 0 (broken). =cut -# Descriptions: remove queue files for this object (queue) +# Descriptions: remove queue files for this object (queue). # Arguments: OBJ($self) # Side Effects: remove queue file(s) # Return Value: none diff --git a/fml/lib/Mail/Delivery/Utils.pm b/fml/lib/Mail/Delivery/Utils.pm index 72598772..d7722986 100644 --- a/fml/lib/Mail/Delivery/Utils.pm +++ b/fml/lib/Mail/Delivery/Utils.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: Utils.pm,v 1.19 2004/05/17 11:55:44 fukachan Exp $ +# $FML: Utils.pm,v 1.20 2004/05/17 12:33:31 fukachan Exp $ # package Mail::Delivery::Utils; @@ -48,7 +48,7 @@ require Exporter; =head1 NAME -Mail::Delivery::Utils - utility functions for mail delivery class +Mail::Delivery::Utils - utility functions for mail delivery class. =head1 SYNOPSIS @@ -87,7 +87,7 @@ the logging message is forwarded to STDERR channel. # XXX-TODO: NO, we should NOT USE Log(). -# Descriptions: log by specified function pointer or into STDERR +# Descriptions: log by specified function pointer or into STDERR. # Arguments: STR($buf) # Side Effects: none # Return Value: none @@ -125,7 +125,7 @@ C<$buf> is sent to C<STDERR>. =cut -# Descriptions: log by specified function pointer or into STDERR +# Descriptions: smtp sessoin log by specified function pointer or into STDERR. # Arguments: OBJ($self) STR($buf) # Side Effects: none # Return Value: none @@ -145,7 +145,7 @@ sub smtplog } -# Descriptions: log by specified function pointer or into STDERR +# Descriptions: smtp sessoin log by specified function pointer or into STDERR. # Arguments: STR($buf) # Side Effects: none # Return Value: none @@ -173,7 +173,7 @@ sub _smtplog =head2 error_set($mesg) -save C<$mesg>. +set C<$mesg> as error (latest error message). =head2 error() @@ -288,13 +288,10 @@ For example, C<$status> is 'not done'. save the C<$position> for C<$map> IO. -=head2 get_map_status($map) -get the current C<$status> for C<$map> IO. +=head2 set_mta_status($mta, $status) -=head2 get_map_position($map) - -get the current C<$position> for C<$map> IO. +save C<$status> for C<$mta>. =cut @@ -338,6 +335,21 @@ sub set_mta_status } +=head2 get_map_status($map) + +get the current C<$status> for C<$map> IO. + +=head2 get_map_position($map) + +get the current C<$position> for C<$map> IO. + +=head2 get_mta_status($mta) + +get the current C<$status> for C<$mta>. + +=cut + + # Descriptions: get map status. # Arguments: OBJ($self) STR($map) # Side Effects: update object @@ -393,7 +405,7 @@ clear information around the latest map operation. =cut -# Descriptions: rollback IO for current map. +# Descriptions: rollback IO for current map back to the starting position. # Arguments: OBJ($self) # Side Effects: none # Return Value: none diff --git a/fml/lib/Mail/Message/Address.pm b/fml/lib/Mail/Message/Address.pm index 714ecd96..a6585952 100644 --- a/fml/lib/Mail/Message/Address.pm +++ b/fml/lib/Mail/Message/Address.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: Address.pm,v 1.2 2004/02/04 15:13:12 fukachan Exp $ +# $FML: Address.pm,v 1.3 2004/02/15 04:38:37 fukachan Exp $ # package Mail::Message::Address; @@ -22,10 +22,14 @@ Mail::Message::Address - manipulate address type string. =head1 DESCRIPTION +This class is an adapter for Mail::Address for convenience. + =head1 METHODS =head2 C<new()> +constructor. + =cut @@ -39,17 +43,18 @@ sub new my ($type) = ref($self) || $self; # parse it by Mail::Address. - my (@addrs) = Mail::Address->parse($str); - my $addr = $addrs[0]->address; + my (@addrs) = Mail::Address->parse($str) || (); + my $addr = $addrs[0]->address || ''; # XXX in-core data area. - # XXX this aread may break Mail::Address object, so - # XXX we not use @ISA to Mail::Address class but use it via AUTOLOAD(). + # XXX if we manipulate Mail::Address object, it is dangerous. So + # XXX not use @ISA to Mail::Address class but use it via AUTOLOAD() + # XXX as object composition. my $me = { _addrs => \@addrs, - _addr_head => $addrs[0], - _string => $addr, - _orig_string => $str, + _addr_head => $addrs[0] || '', + _string => $addr || '', + _orig_string => $str || '', }; return bless $me, $type; @@ -72,7 +77,7 @@ sub as_str =head2 clean_up() -clean up address and return it. +clean up address. no return value. =cut @@ -119,9 +124,8 @@ sub substr =head1 Mail::Address FORWARDING. -=head2 address() - -return address by string. +forward request to Mail::Address class. Forwarded requests follow: +phrase, address, comment, format, name, host, user, path, canon. =cut |
