diff options
| author | fukachan <fukachan> | 2002-12-18 04:46:21 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-12-18 04:46:21 +0000 |
| commit | 1f8cef8cc30dc332a480028e497fb31168f5536a (patch) | |
| tree | 0a4efdcc579729fc4ccbd2a14068c5a0821d8ae0 | |
| parent | 4bc5864a9468da9e0874a826575c54e6114c0583 (diff) | |
| download | fml8-1f8cef8cc30dc332a480028e497fb31168f5536a.tar.gz fml8-1f8cef8cc30dc332a480028e497fb31168f5536a.tar.bz2 fml8-1f8cef8cc30dc332a480028e497fb31168f5536a.zip | |
clean up comments
| -rw-r--r-- | fml/lib/FML/Command/Auth.pm | 16 | ||||
| -rw-r--r-- | fml/lib/FML/Command/DataCheck.pm | 35 | ||||
| -rw-r--r-- | fml/lib/FML/Command/FileUtils.pm | 21 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Utils.pm | 4 |
4 files changed, 49 insertions, 27 deletions
diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm index 8ee52daf..6d575b88 100644 --- a/fml/lib/FML/Command/Auth.pm +++ b/fml/lib/FML/Command/Auth.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: Auth.pm,v 1.14 2002/09/11 23:18:04 fukachan Exp $ +# $FML: Auth.pm,v 1.15 2002/09/22 14:56:42 fukachan Exp $ # package FML::Command::Auth; @@ -32,7 +32,7 @@ FML::Command::Auth - authentication functions =head2 reject() -return 0 :-) (dummy) +dummy :-) =cut @@ -51,7 +51,7 @@ sub new # Descriptions: virtual reject handler, just return 0 :-) -# Arguments: OBJ($self) HASH_REF($args) +# Arguments: OBJ($self) OBJ($curproc) HASH_REF($args) HASH_REF($optargs) # Side Effects: none # Return Value: STR (__LAST__, a special upcall) sub reject @@ -63,7 +63,7 @@ sub reject # Descriptions: permit anyone -# Arguments: OBJ($self) HASH_REF($args) +# Arguments: OBJ($self) OBJ($curproc) HASH_REF($args) HASH_REF($optargs) # Side Effects: none # Return Value: NUM sub permit_anyone @@ -94,7 +94,7 @@ sub permit_admin_member_maps } -# Descriptions: virtual reject handler, just return 0 :-) +# Descriptions: reject if the mail address looks like system accounts. # Arguments: OBJ($self) HASH_REF($args) # Side Effects: none # Return Value: NUM or STR (__LAST__, a special upcall) @@ -116,7 +116,7 @@ sub reject_system_accounts =head2 check_admin_member_password($curproc, $args, $optargs) -check the password if it is valid or not. +check the password if it is valid or not as an administrator. =cut @@ -187,10 +187,6 @@ sub check_admin_member_password See C<http://www.fml.org/software/FNF/> on fml coding style guide. -=head1 CODING STYLE - -See C<http://www.fml.org/software/FNF/> on fml coding style guide. - =head1 AUTHOR Ken'ichi Fukamachi diff --git a/fml/lib/FML/Command/DataCheck.pm b/fml/lib/FML/Command/DataCheck.pm index bc077e17..87961e7f 100644 --- a/fml/lib/FML/Command/DataCheck.pm +++ b/fml/lib/FML/Command/DataCheck.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: DataCheck.pm,v 1.5 2002/09/11 23:18:05 fukachan Exp $ +# $FML: DataCheck.pm,v 1.6 2002/09/22 14:56:42 fukachan Exp $ # package FML::Command::DataCheck; @@ -16,7 +16,7 @@ use FML::Log qw(Log LogWarn LogError); =head1 NAME -FML::Command::DataCheck - check data as command(s) +FML::Command::DataCheck - parse, clean up et.al. for command buffer =head1 SYNOPSIS @@ -42,7 +42,7 @@ sub new } -# Descriptions: return command name ( ^\S+ in $command ). +# Descriptions: return command name ( ^\S+ in $command ) and the sub name. # remove the prepending strings such as \s, #, ... # Arguments: OBJ($self) STR($command) # Side Effects: none @@ -57,8 +57,7 @@ sub parse_command_buffer } -# Descriptions: parse command buffer to make -# argument vector after command name +# Descriptions: return arguments after command name $comname in $command. # Arguments: OBJ($self) STR($command) STR($comname) # Side Effects: none # Return Value: ARRAY_REF @@ -68,6 +67,14 @@ sub parse_command_arguments my $found = 0; my (@options) = (); + # XXX-TODO: $comname matches exactly. + # XXX-TODO: so, you need lower/uppercase before this routine. + + # pick up arguments into @options after $comname. + # Example: + # $comname = "subscribe"; + # $command = "subscribe rudo von schmit"; + # @options = [ 'rudo', 'von', 'shmit' ]; for my $buf (split(/\s+/, $command)) { push(@options, $buf) if $found; $found = 1 if $buf eq $comname; @@ -77,8 +84,8 @@ sub parse_command_arguments } -# Descriptions: check message of the current process -# whether it contais keyword e.g. "confirm". +# Descriptions: check the message of the current process to find +# whether it contais some special keyword e.g. "confirm". # Arguments: OBJ($self) OBJ($curproc) ARRAY_REF($ra_data) # Side Effects: none # Return Value: HASH_REF @@ -95,6 +102,8 @@ sub find_special_keyword $confirm_prefix = $self->clean_up($confirm_prefix); $admin_prefix = $self->clean_up($admin_prefix); + # XXX $ra_data is not whole body but already parsed and prepared buffer. + # XXX See below and FML::Process::Command module, for example. for my $buf (@$ra_data) { if ($buf =~ /$confirm_prefix\s+\w+\s+([\w\d]+)/) { $confirm_found = $1; @@ -112,9 +121,9 @@ sub find_special_keyword } -# Descriptions: check message of the current process -# whether it contais keyword e.g. "confirm". -# Arguments: OBJ($self) OBJ($curproc) ARRAY_REF($ra_data) +# Descriptions: check the message of the current process to find +# whether it contais special keyword e.g. "confirm". +# Arguments: OBJ($self) OBJ($curproc) # Side Effects: none # Return Value: NUM( 1 or ) sub find_commands_for_stranger @@ -133,6 +142,8 @@ sub find_commands_for_stranger next LINE unless defined($comname) && $comname; # $comname matches one of $commands_for_stranger ? + # XXX-TODO: we need to care for lowercase/uppercase mismtach ? + # XXX-TODO: need to define macro EQUAL_CASE_INSENSITIVE(a,b) ? COMMAND: for my $proc (@$commands) { next COMMAND unless defined($proc) && $proc; @@ -168,10 +179,6 @@ sub clean_up See C<http://www.fml.org/software/FNF/> on fml coding style guide. -=head1 CODING STYLE - -See C<http://www.fml.org/software/FNF/> on fml coding style guide. - =head1 AUTHOR Ken'ichi Fukamachi diff --git a/fml/lib/FML/Command/FileUtils.pm b/fml/lib/FML/Command/FileUtils.pm index e681135d..7683f0a7 100644 --- a/fml/lib/FML/Command/FileUtils.pm +++ b/fml/lib/FML/Command/FileUtils.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: FileUtils.pm,v 1.5 2002/09/11 23:18:05 fukachan Exp $ +# $FML: FileUtils.pm,v 1.6 2002/09/22 14:56:43 fukachan Exp $ # package FML::Command::FileUtils; @@ -24,6 +24,10 @@ FML::Command::FileUtils - utilities to handle files =head1 METHODS +=head2 new() + +standard constructor. + =cut @@ -45,6 +49,19 @@ sub new } +=head2 delete($curproc, $command_args, $du_aregs) + +same as remove() below. + +=head2 remove($curproc, $command_args, $du_aregs) + +remove files specified in $du_args->{ options } +if the file exsits and the file name matches safe file regexp defined +in FML::Restriction class. + +=cut + + # Descriptions: remove files # Arguments: OBJ($self) ... varargs ... # Side Effects: remove files @@ -71,9 +88,9 @@ sub remove # regexp my $basic_variable = $self->{ _basic_variable }; my $file_regexp = $basic_variable->{ file }; - my $ml_home_dir = $config->{ ml_home_dir }; # chdir $ml_home_dir firstly. return ASAP if failed. + my $ml_home_dir = $config->{ ml_home_dir }; chdir $ml_home_dir || croak("cannot chdir \$ml_home_dir"); for my $file (@$argv) { diff --git a/fml/lib/FML/Command/Utils.pm b/fml/lib/FML/Command/Utils.pm index 6df522cc..216d03eb 100644 --- a/fml/lib/FML/Command/Utils.pm +++ b/fml/lib/FML/Command/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.4 2002/09/11 23:18:06 fukachan Exp $ +# $FML: Utils.pm,v 1.5 2002/09/22 14:56:43 fukachan Exp $ # package FML::Command::Utils; @@ -26,6 +26,8 @@ FML::Command::Utils - command utilities =cut +# XXX-TODO: nothing implemented yet. + # Descriptions: standard constructor # Arguments: OBJ($self) |
