diff options
| author | fukachan <fukachan> | 2004-06-30 03:05:13 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-06-30 03:05:13 +0000 |
| commit | b82e1fde5ecb5a7cf008ebcedc5268ac1a7aac72 (patch) | |
| tree | 91962526ea9859c847ceeee3890b0c1389c1b1d8 | |
| parent | 8bd1d2a1110bb0a6e55daf3b397e34ae3f47ea72 (diff) | |
| download | fml8-b82e1fde5ecb5a7cf008ebcedc5268ac1a7aac72.tar.gz fml8-b82e1fde5ecb5a7cf008ebcedc5268ac1a7aac72.tar.bz2 fml8-b82e1fde5ecb5a7cf008ebcedc5268ac1a7aac72.zip | |
overhaul: fix comments and messages. validate initial value.
| -rw-r--r-- | fml/lib/FML/Command/Admin/digest.pm | 12 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Admin/digestoff.pm | 10 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Admin/digeston.pm | 14 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Admin/on.pm | 18 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Admin/spool.pm | 8 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter.pm | 48 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/Array.pm | 16 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/ErrorStatus.pm | 4 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/NIS.pm | 5 | ||||
| -rw-r--r-- | fml/lib/IO/Adapter/UnixGroup.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce.pm | 6 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/DSN.pm | 8 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/Exim.pm | 6 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/FixBrokenAddress.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/Freeserve.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/GOO.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/Language/Japanese.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/Postfix19991231.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/Qmail.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/SimpleMatch.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Mail/Bounce/Smtpfeed.pm | 4 | ||||
| -rw-r--r-- | fml/lib/Tie/JournaledDir.pm | 23 | ||||
| -rw-r--r-- | fml/lib/Tie/JournaledFile.pm | 4 |
23 files changed, 117 insertions, 101 deletions
diff --git a/fml/lib/FML/Command/Admin/digest.pm b/fml/lib/FML/Command/Admin/digest.pm index 159aece4..676fc708 100644 --- a/fml/lib/FML/Command/Admin/digest.pm +++ b/fml/lib/FML/Command/Admin/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.19 2004/04/28 04:10:36 fukachan Exp $ +# $FML: digest.pm,v 1.20 2004/04/30 13:38:05 fukachan Exp $ # package FML::Command::Admin::digest; @@ -50,14 +50,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 @@ -94,7 +94,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 }; my $recipient_maps = $config->get_as_array_ref('recipient_maps'); my $digest_recipient_map = $config->{ primary_digest_recipient_map }; @@ -202,6 +202,8 @@ sub _digest_on else { $self->_useradd($curproc, $command_args, $uc_digest_args); } + + # XXX-TODO: need transaction ? } @@ -260,6 +262,8 @@ sub _digest_off else { $self->_useradd($curproc, $command_args, $uc_normal_args); } + + # XXX-TODO: need transaction ? } diff --git a/fml/lib/FML/Command/Admin/digestoff.pm b/fml/lib/FML/Command/Admin/digestoff.pm index 981a4530..134bda09 100644 --- a/fml/lib/FML/Command/Admin/digestoff.pm +++ b/fml/lib/FML/Command/Admin/digestoff.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: digestoff.pm,v 1.10 2004/02/15 04:38:29 fukachan Exp $ +# $FML: digestoff.pm,v 1.11 2004/04/28 04:10:36 fukachan Exp $ # package FML::Command::Admin::digestoff; @@ -15,7 +15,7 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); =head1 NAME -FML::Command::Admin::digest - digest mode off +FML::Command::Admin::digest - digest mode off (from digest to real time). =head1 SYNOPSIS @@ -33,7 +33,7 @@ It means delivery to this address from digest to real delivery mode. =cut -# Descriptions: standard constructor +# Descriptions: constructor. # Arguments: OBJ($self) # Side Effects: none # Return Value: OBJ @@ -46,14 +46,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 diff --git a/fml/lib/FML/Command/Admin/digeston.pm b/fml/lib/FML/Command/Admin/digeston.pm index e2185d66..ba503805 100644 --- a/fml/lib/FML/Command/Admin/digeston.pm +++ b/fml/lib/FML/Command/Admin/digeston.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: digeston.pm,v 1.10 2004/02/15 04:38:29 fukachan Exp $ +# $FML: digeston.pm,v 1.11 2004/04/28 04:10:36 fukachan Exp $ # package FML::Command::Admin::digeston; @@ -15,7 +15,7 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); =head1 NAME -FML::Command::Admin::digest - digest mode on +FML::Command::Admin::digest - digest mode on (from real time to digest). =head1 SYNOPSIS @@ -33,7 +33,7 @@ change delivery mode to this address from real to digest one. =cut -# Descriptions: standard constructor +# Descriptions: constructor. # Arguments: OBJ($self) # Side Effects: none # Return Value: OBJ @@ -46,14 +46,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 @@ -74,7 +74,7 @@ sub verify_syntax } -# Descriptions: digest mode off/on for the specified user. +# Descriptions: digest mode on for the specified user. # change delivery mode to this address from real to digest one. # Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) # Side Effects: update $recipient_map,$digest_recipient_maps @@ -94,7 +94,7 @@ sub process } -# Descriptions: show cgi menu for digeston +# Descriptions: show cgi menu for digest on. # Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) # Side Effects: update $recipient_map # Return Value: none diff --git a/fml/lib/FML/Command/Admin/on.pm b/fml/lib/FML/Command/Admin/on.pm index d9e551ca..9ad65ae9 100644 --- a/fml/lib/FML/Command/Admin/on.pm +++ b/fml/lib/FML/Command/Admin/on.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: on.pm,v 1.18 2004/04/28 04:10:37 fukachan Exp $ +# $FML: on.pm,v 1.19 2004/04/30 13:38:05 fukachan Exp $ # package FML::Command::Admin::on; @@ -15,7 +15,7 @@ use Carp; =head1 NAME -FML::Command::Admin::on - change delivery mode from digest to real time +FML::Command::Admin::on - change delivery mode from digest to real time. =head1 SYNOPSIS @@ -32,7 +32,7 @@ change delivery mode from digest to real time. =cut -# Descriptions: 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 @@ -82,8 +82,8 @@ sub process my ($self, $curproc, $command_args) = @_; my $config = $curproc->config(); my $cred = $curproc->{ credential }; - my $options = $command_args->{ options }; - my $address = $command_args->{ command_data } || $options->[ 0 ]; + my $options = $command_args->{ options } || []; + my $address = $command_args->{ command_data } || $options->[ 0 ] || ''; # XXX We should always add/rewrite only $primary_*_map maps via # XXX command mail, CUI and GUI. @@ -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 check @@ -144,7 +144,7 @@ sub process } -# Descriptions: show cgi menu for on +# Descriptions: show cgi menu for on. # Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args) # Side Effects: update $recipient_map # Return Value: none diff --git a/fml/lib/FML/Command/Admin/spool.pm b/fml/lib/FML/Command/Admin/spool.pm index f01afa07..ccaa67c8 100644 --- a/fml/lib/FML/Command/Admin/spool.pm +++ b/fml/lib/FML/Command/Admin/spool.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: spool.pm,v 1.5 2004/03/23 04:20:46 fukachan Exp $ +# $FML: spool.pm,v 1.6 2004/03/24 00:14:09 fukachan Exp $ # package FML::Command::Admin::spool; @@ -15,7 +15,7 @@ use Carp; =head1 NAME -FML::Command::Admin::spool - small maintenance jobs on the spool directory +FML::Command::Admin::spool - small maintenance jobs on the spool directory. =head1 SYNOPSIS @@ -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 diff --git a/fml/lib/IO/Adapter.pm b/fml/lib/IO/Adapter.pm index 2613a06c..d44151ba 100644 --- a/fml/lib/IO/Adapter.pm +++ b/fml/lib/IO/Adapter.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: Adapter.pm,v 1.32 2004/04/11 12:58:38 fukachan Exp $ +# $FML: Adapter.pm,v 1.33 2004/04/27 13:31:54 fukachan Exp $ # package IO::Adapter; @@ -23,7 +23,7 @@ END {} =head1 NAME -IO::Adapter - adapter for several IO interfaces +IO::Adapter - adapter for several IO interfaces. =head1 SYNOPSIS @@ -110,7 +110,7 @@ This wrapper provides IO like a usual file for the specified C<$map>. map name descriptions or examples --------------------------------------------------- - file file:$file_name + file file:$file_name (prefix file: is optional). For example, file:/var/spool/ml/elena/recipients unix.group unix.group:$group_name @@ -138,7 +138,7 @@ the constructor. The first argument is a map decribed above. # Descriptions: a constructor, which prepare IO operations for the -# given $map. +# specified $map. # Arguments: OBJ($self) STR($map) HASH_REF($args) # Side Effects: @ISA is modified # load and import sub-class @@ -266,9 +266,8 @@ sub open =head2 touch() -create a file if not exists. -This method is avaialble for file: type. -It is dummy for maps other than file: type. +create a file if not exists. This method is avaialble for all types +but dummy for maps other than file: type. =cut @@ -299,7 +298,7 @@ unlock. currently, only supported for file map. =cut -# Descriptions: create a file if not exists. +# Descriptions: lock. currently, only supported for file map. # Arguments: OBJ($self) # Side Effects: create $map if needed or possible # Return Value: none @@ -314,7 +313,7 @@ sub lock } -# Descriptions: create a file if not exists. +# Descriptions: unlock. currently, only supported for file map. # Arguments: OBJ($self) # Side Effects: create $map if needed or possible # Return Value: none @@ -352,7 +351,7 @@ or =head2 delete( $address ) -delete lines which matches $regexp from this map. +delete lines which match $regexp from this map. =cut @@ -417,14 +416,14 @@ You can change the search behaviour by C<$args> (HASH REFERENCE). The result returned by find() is primary key of data or key and value e.g the whole line in the file format. find() returns the whole one -line by default. If want options is specified in $args, return value +line by default. If want option is specified in $args, return value changes. 'want' options is 'key' or 'key,value', 'key,value' by default. find() returns the result as STRING or ARRAY REFERENCE. You get only the first entry as string by default. If you specify C<all>, you get the result(s) as ARRAY REFERENCE. -For example, to search mail addresses in recipient list, +For example, to search mail addresses matching $regexp in recipient list, my $a = $self->find($regexp, { want => 'key', all => 1}); for my $addr (@$a) { @@ -451,7 +450,8 @@ sub find return $self->md_find($regexp, $args); } - # XXX NO, quotemeta $regexp before call find() method. + # XXX NO, NOT USE quotemeta $regexp before call find() method HERE. + # XXX PLEASE CARE REGEXP BEFORE CALL IO::Adapter. # we may need quote for special address e.g. a+b@domain. # $regexp = quotemeta($regexp); @@ -506,16 +506,20 @@ methods suitable for sequence id operation. increment map content by one and return the result (incrmented vlaue). +CAUTION: now implemented only for file map. + =head2 sequence_replace($seq) set the sequence value to $seq. that is, overwrite sequence value by number $seq. +CAUTION: now implemented only for file map. + =cut # Descriptions: increment map content by one and return the result -# (incrmented vlaue). +# (incremented vlaue). # Arguments: OBJ($self) # Side Effects: create $map if needed or possible # Return Value: NUM(> 1, 0 is failure) @@ -556,6 +560,15 @@ sub sequence_replace } +=head1 UTILITY + +=head2 + +=item C<error()> + +return the most recent error message if exists. + + =head1 DESTRUCTOR =head2 DESTROY @@ -575,13 +588,6 @@ sub DESTROY } - -=head2 - -=item C<error()> - -return the most recent error message if exists. - =head1 CODING STYLE See C<http://www.fml.org/software/FNF/> on fml coding style guide. diff --git a/fml/lib/IO/Adapter/Array.pm b/fml/lib/IO/Adapter/Array.pm index 7b8b3779..014439d1 100644 --- a/fml/lib/IO/Adapter/Array.pm +++ b/fml/lib/IO/Adapter/Array.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: Array.pm,v 1.34 2003/11/29 06:31:48 fukachan Exp $ +# $FML: Array.pm,v 1.35 2004/01/24 09:03:55 fukachan Exp $ # package IO::Adapter::Array; @@ -84,7 +84,7 @@ $flag is "r" only (read only) now. # flag => $flag # _array_reference => ARRAY_REFERENCE # } -# Side Effects: malloc @elements array +# Side Effects: malloc @elements array. # Return Value: ARRAY_REF sub open { @@ -102,7 +102,7 @@ sub open $self->{_elements} = $r_array; $self->{_num_elements} = $#elements; $self->{_counter} = 0; - return( @elements ? \@elements : undef ); + return( @elements ? \@elements : [] ); } @@ -119,7 +119,7 @@ return the next element of the array. =cut -# Descriptions: forwarded to get_next_key() +# Descriptions: forwarded to get_next_key(). # XXX getline() == get_next_key() is valid in this case. # XXX since this map has only key and no value. # Arguments: OBJ($self) HASH_REF($args) @@ -128,7 +128,8 @@ return the next element of the array. sub getline { get_next_key(@_);} -# Descriptions: return (key, values, ... ) as ARRAY_REF +# Descriptions: return (key, values, ... ) as ARRAY_REF. +# XXX no value in the case of this map. # Arguments: OBJ($self) HASH_REF($args) # Side Effects: none # Return Value: ARRAY_REF @@ -139,7 +140,7 @@ sub get_key_values_as_array_ref return [ $x ]; } -# Descriptions: return the next element of the array +# Descriptions: return the next element of the array. # Arguments: OBJ($self) HASH_REF($args) # Side Effects: increment the counter in the object # Return Value: STR(the next element) @@ -198,6 +199,7 @@ end of IO operation. It is a dummy. =cut + # Descriptions: echeck whether end of the array is not now. # Arguments: OJB($self) # Side Effects: none @@ -206,6 +208,8 @@ end of IO operation. It is a dummy. sub eof { my ($self) = @_; + + # XXX-TODO: > ? >= ? OK? $self->{_counter} > $self->{_num_elements} ? 1 : 0; } diff --git a/fml/lib/IO/Adapter/ErrorStatus.pm b/fml/lib/IO/Adapter/ErrorStatus.pm index d294e777..0a11f5f1 100644 --- a/fml/lib/IO/Adapter/ErrorStatus.pm +++ b/fml/lib/IO/Adapter/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:16 fukachan Exp $ +# $FML: ErrorStatus.pm,v 1.8 2004/01/24 09:03:56 fukachan Exp $ # package IO::Adapter::ErrorStatus; @@ -19,7 +19,7 @@ require Exporter; =head1 NAME -IO::Adapter::ErrorStatus - error handling component +IO::Adapter::ErrorStatus - error handling component. =head1 SYNOPSIS diff --git a/fml/lib/IO/Adapter/NIS.pm b/fml/lib/IO/Adapter/NIS.pm index 95ce1bf7..6d904cd2 100644 --- a/fml/lib/IO/Adapter/NIS.pm +++ b/fml/lib/IO/Adapter/NIS.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: NIS.pm,v 1.22 2003/08/23 15:33:16 fukachan Exp $ +# $FML: NIS.pm,v 1.23 2004/01/24 09:00:53 fukachan Exp $ # package IO::Adapter::NIS; @@ -19,7 +19,7 @@ use IO::Adapter::Array; =head1 NAME -IO::Adapter::NIS - NIS map operations +IO::Adapter::NIS - NIS map operations. =head1 SYNOPSIS @@ -62,6 +62,7 @@ sub configure # XXX-TODO: UNIX only. # XXX-TODO: we call "ypmatch" but should use full-path if could. + # XXX-TODO: who validate $key value ? # emulate an array on memory my $key = $me->{_name}; my (@x) = split(/:/, `ypmatch $key group.byname`); diff --git a/fml/lib/IO/Adapter/UnixGroup.pm b/fml/lib/IO/Adapter/UnixGroup.pm index e5100833..bbddcf7e 100644 --- a/fml/lib/IO/Adapter/UnixGroup.pm +++ b/fml/lib/IO/Adapter/UnixGroup.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: UnixGroup.pm,v 1.20 2003/08/23 15:33:16 fukachan Exp $ +# $FML: UnixGroup.pm,v 1.21 2004/01/24 09:00:53 fukachan Exp $ # package IO::Adapter::UnixGroup; @@ -19,7 +19,7 @@ use IO::Adapter::Array; =head1 NAME -IO::Adapter::UnixGroup - IO wrapper to read /etc/group +IO::Adapter::UnixGroup - IO wrapper to read /etc/group. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Bounce.pm b/fml/lib/Mail/Bounce.pm index 25420f9d..3fba398f 100644 --- a/fml/lib/Mail/Bounce.pm +++ b/fml/lib/Mail/Bounce.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: Bounce.pm,v 1.26 2003/08/23 04:35:44 fukachan Exp $ +# $FML: Bounce.pm,v 1.27 2004/01/24 09:03:56 fukachan Exp $ # package Mail::Bounce; @@ -16,7 +16,7 @@ my $debug = 0; =head1 NAME -Mail::Bounce - analyze error messages +Mail::Bounce - analyze error message. =head1 SYNOPSIS @@ -86,7 +86,7 @@ returned C<$result> provides the following information: =head2 new() -standard new() method. +constructor. =cut diff --git a/fml/lib/Mail/Bounce/DSN.pm b/fml/lib/Mail/Bounce/DSN.pm index 6773f0d3..474444d7 100644 --- a/fml/lib/Mail/Bounce/DSN.pm +++ b/fml/lib/Mail/Bounce/DSN.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: DSN.pm,v 1.22 2003/01/26 03:23:09 fukachan Exp $ +# $FML: DSN.pm,v 1.23 2004/01/24 09:00:54 fukachan Exp $ # @@ -21,7 +21,7 @@ my $debug = 0; =head1 NAME -Mail::Bounce::DSN - DSN error message format parser +Mail::Bounce::DSN - DSN error message format parser. =head1 SYNOPSIS @@ -113,7 +113,7 @@ sub analyze } -# Descriptions: DSN parser +# Descriptions: DSN parser. # [DSN Example] # Final-Recipient: rfc822; rudo@nuinui.net # Action: failed @@ -121,7 +121,7 @@ sub analyze # Diagnostic-Code: X-Postfix; connect to mx.nuinui.net[10.1.1.1]: # Connection refused # Arguments: OBJ($self) STR($buf) HASH_REF($result) -# Side Effects: update $result +# Side Effects: update $result. # Return Value: none sub _parse_dsn_format { diff --git a/fml/lib/Mail/Bounce/Exim.pm b/fml/lib/Mail/Bounce/Exim.pm index 813a6cf6..d7a35b55 100644 --- a/fml/lib/Mail/Bounce/Exim.pm +++ b/fml/lib/Mail/Bounce/Exim.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: Exim.pm,v 1.11 2004/01/02 14:42:47 fukachan Exp $ +# $FML: Exim.pm,v 1.12 2004/01/24 09:03:57 fukachan Exp $ # @@ -16,7 +16,7 @@ use Carp; =head1 NAME -Mail::Bounce::Exim - Exim error message format parser +Mail::Bounce::Exim - Exim error message format parser. =head1 SYNOPSIS @@ -58,7 +58,7 @@ sub analyze { my ($self, $msg, $result) = @_; my $m = $msg->whole_message_header(); - my $addr = $m->get('X-Failed-Recipients'); + my $addr = $m->get('X-Failed-Recipients') || ''; # set up return buffer if $addr is found. # XXX-TODO: we should use $self->address_clean_up() ? diff --git a/fml/lib/Mail/Bounce/FixBrokenAddress.pm b/fml/lib/Mail/Bounce/FixBrokenAddress.pm index feecca21..82b977a1 100644 --- a/fml/lib/Mail/Bounce/FixBrokenAddress.pm +++ b/fml/lib/Mail/Bounce/FixBrokenAddress.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: FixBrokenAddress.pm,v 1.10 2004/01/02 14:42:47 fukachan Exp $ +# $FML: FixBrokenAddress.pm,v 1.11 2004/01/24 09:00:54 fukachan Exp $ # @@ -21,7 +21,7 @@ my $debug = 0; =head1 NAME -Mail::Bounce::FixBrokenAddress - handle irregular error message +Mail::Bounce::FixBrokenAddress - handle irregular error message. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Bounce/Freeserve.pm b/fml/lib/Mail/Bounce/Freeserve.pm index cc2e19fd..6d74be61 100644 --- a/fml/lib/Mail/Bounce/Freeserve.pm +++ b/fml/lib/Mail/Bounce/Freeserve.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: Freeserve.pm,v 1.3 2003/08/06 14:13:41 tmu Exp $ +# $FML: Freeserve.pm,v 1.4 2003/10/15 01:03:39 fukachan Exp $ # # @@ -19,7 +19,7 @@ use Carp; =head1 NAME -Mail::Bounce::Freeserve - Freeserve error message format parser +Mail::Bounce::Freeserve - Freeserve error message format parser. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Bounce/GOO.pm b/fml/lib/Mail/Bounce/GOO.pm index c2c846d9..66ca51b1 100644 --- a/fml/lib/Mail/Bounce/GOO.pm +++ b/fml/lib/Mail/Bounce/GOO.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: GOO.pm,v 1.10 2004/01/02 14:42:47 fukachan Exp $ +# $FML: GOO.pm,v 1.11 2004/01/24 09:03:57 fukachan Exp $ # @@ -16,7 +16,7 @@ use Carp; =head1 NAME -Mail::Bounce::GOO - GOO error message format parser +Mail::Bounce::GOO - GOO error message format parser. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Bounce/Language/Japanese.pm b/fml/lib/Mail/Bounce/Language/Japanese.pm index c0839a63..03730ac3 100644 --- a/fml/lib/Mail/Bounce/Language/Japanese.pm +++ b/fml/lib/Mail/Bounce/Language/Japanese.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: Japanese.pm,v 1.9 2003/08/13 13:43:46 fukachan Exp $ +# $FML: Japanese.pm,v 1.10 2004/01/24 09:00:55 fukachan Exp $ # # @@ -24,7 +24,7 @@ my $debug = 0; =head1 NAME -Mail::Bounce::Language::Japanese - Japanese dependent error message parser +Mail::Bounce::Language::Japanese - Japanese dependent error message parser. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Bounce/Postfix19991231.pm b/fml/lib/Mail/Bounce/Postfix19991231.pm index 28c6e4e3..e7d7620a 100644 --- a/fml/lib/Mail/Bounce/Postfix19991231.pm +++ b/fml/lib/Mail/Bounce/Postfix19991231.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: Postfix19991231.pm,v 1.22 2003/01/11 15:14:24 fukachan Exp $ +# $FML: Postfix19991231.pm,v 1.23 2004/01/24 09:03:57 fukachan Exp $ # @@ -20,7 +20,7 @@ my $debug = 0; =head1 NAME -Mail::Bounce::Postfix19991231 - Postfix-19991231 error message format parser +Mail::Bounce::Postfix19991231 - Postfix-19991231 error message format parser. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Bounce/Qmail.pm b/fml/lib/Mail/Bounce/Qmail.pm index afb0de22..8058ebcd 100644 --- a/fml/lib/Mail/Bounce/Qmail.pm +++ b/fml/lib/Mail/Bounce/Qmail.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: Qmail.pm,v 1.9 2003/01/07 08:38:35 fukachan Exp $ +# $FML: Qmail.pm,v 1.10 2004/01/24 09:03:57 fukachan Exp $ # @@ -16,7 +16,7 @@ use Carp; =head1 NAME -Mail::Bounce::Qmail - Qmail error message format parser +Mail::Bounce::Qmail - Qmail error message format parser. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Bounce/SimpleMatch.pm b/fml/lib/Mail/Bounce/SimpleMatch.pm index 012647ae..13278130 100644 --- a/fml/lib/Mail/Bounce/SimpleMatch.pm +++ b/fml/lib/Mail/Bounce/SimpleMatch.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: SimpleMatch.pm,v 1.40 2004/01/24 09:00:54 fukachan Exp $ +# $FML: SimpleMatch.pm,v 1.41 2004/06/02 12:00:00 tmu Exp $ # @@ -22,7 +22,7 @@ use Mail::Bounce::Language::Japanese; =head1 NAME -Mail::Bounce::SimpleMatch - simple state machine to parse error messages +Mail::Bounce::SimpleMatch - simple state machine to parse error messages. =head1 SYNOPSIS diff --git a/fml/lib/Mail/Bounce/Smtpfeed.pm b/fml/lib/Mail/Bounce/Smtpfeed.pm index 740c9d96..bdf20097 100644 --- a/fml/lib/Mail/Bounce/Smtpfeed.pm +++ b/fml/lib/Mail/Bounce/Smtpfeed.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: Smtpfeed.pm,v 1.8 2004/01/02 14:42:47 fukachan Exp $ +# $FML: Smtpfeed.pm,v 1.9 2004/01/24 09:03:57 fukachan Exp $ # @@ -16,7 +16,7 @@ use Carp; =head1 NAME -Mail::Bounce::Smtpfeed - Smtpfeed error message format parser +Mail::Bounce::Smtpfeed - Smtpfeed error message format parser. =head1 SYNOPSIS diff --git a/fml/lib/Tie/JournaledDir.pm b/fml/lib/Tie/JournaledDir.pm index beb6f7ff..3b68a4f9 100644 --- a/fml/lib/Tie/JournaledDir.pm +++ b/fml/lib/Tie/JournaledDir.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: JournaledDir.pm,v 1.22 2004/01/24 09:04:00 fukachan Exp $ +# $FML: JournaledDir.pm,v 1.23 2004/02/26 04:27:48 fukachan Exp $ # package Tie::JournaledDir; @@ -18,7 +18,7 @@ $debug = 0; =head1 NAME -Tie::JournaledDir - tie hash to journaled style directory cache +Tie::JournaledDir - tie hash to journaled style directory cache. =head1 SYNOPSIS @@ -38,7 +38,8 @@ names. /some/where/998520340 /some/where/998520342 -C<Tie::JournaledFile> manipulates each file. +C<Tie::JournaledFile> called from C<Tie::JournaledDir> manipulates +each file. C<Tie::JournaledDir> has cache files in a directory. C<Tie::JournaledDir> wraps C<Tie::JournaledFile> over several files. @@ -55,12 +56,12 @@ It enables easy automatic expiration. limit => number (days), # optional }; -you need specify C<dir> as cache dir at least. +At least you need to specify C<dir> as the cache dir. C<unit> is optional, "day" by default. C<unit> is number (seconds) or keyword "day". -C<limit> is number. It is the range of unit to search. +C<limit> is number. It is the range of units to search. For example, @@ -122,18 +123,19 @@ sub new unless ($dir) { croak("dir unspecified");} # reverse order file list to search + # since we need to find latest value. my @filelist = (); for (my $i = 0; $i < $limit; $i++) { $filelist[ $i ] = _file_name($unit, $dir, $i); } - # set up object + # set up object. $me->{ '_dir' } = $dir; $me->{ '_files' } = \@filelist; $me->{ '_limit' } = $limit; $me->{ '_expire' } = $expire; - # expire old cache files, firstly. + # Firstly, expire old cache files. expire($me); return bless $me, $type; @@ -388,7 +390,7 @@ not KEY => VALUE -which is by default. +This behaviour is by default. =cut @@ -403,8 +405,7 @@ sub get_all_values_as_hash_ref my $files = $self->{ '_files' } || []; my $result = {}; - # read files in reverse order to overwrite values by the latest one - # from old to new. + # read files in reverse order to collect all values from old to new. use FileHandle; for my $f (reverse @$files) { my $obj = new Tie::JournaledFile { @@ -428,7 +429,7 @@ sub get_all_values_as_hash_ref } } - # return all values assigned to the key. + # return all values assigned to the key as HASH_REF. # { key => [ value1, value2, ... ] }. return $result; } diff --git a/fml/lib/Tie/JournaledFile.pm b/fml/lib/Tie/JournaledFile.pm index 57bf5896..0fea549f 100644 --- a/fml/lib/Tie/JournaledFile.pm +++ b/fml/lib/Tie/JournaledFile.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: JournaledFile.pm,v 1.30 2003/10/15 01:03:41 fukachan Exp $ +# $FML: JournaledFile.pm,v 1.31 2004/01/24 09:04:01 fukachan Exp $ # package Tie::JournaledFile; @@ -15,7 +15,7 @@ use Carp; =head1 NAME -Tie::JournaledFile - hash operation for a jurnaled style log file +Tie::JournaledFile - hash operation for a jurnaled style log file. =head1 SYNOPSIS |
