diff options
| author | fukachan <fukachan> | 2006-10-22 14:18:05 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2006-10-22 14:18:05 +0000 |
| commit | 76dacf84693521e20d86e2ff34193ed5da561248 (patch) | |
| tree | 6f992a4607a452b2d7bab6b500f402249cf3c8df /fml/lib/FML/Command/DataCheck.pm | |
| parent | 1a69d4b654bae192ec110d56d1e8b9f8c5466038 (diff) | |
| download | fml8-76dacf84693521e20d86e2ff34193ed5da561248.tar.gz fml8-76dacf84693521e20d86e2ff34193ed5da561248.tar.bz2 fml8-76dacf84693521e20d86e2ff34193ed5da561248.zip | |
clean up. fix comments.
Diffstat (limited to 'fml/lib/FML/Command/DataCheck.pm')
| -rw-r--r-- | fml/lib/FML/Command/DataCheck.pm | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/fml/lib/FML/Command/DataCheck.pm b/fml/lib/FML/Command/DataCheck.pm index 7c8bab58..79e3abd3 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.19 2006/06/25 11:05:12 fukachan Exp $ +# $FML: DataCheck.pm,v 1.20 2006/07/03 13:58:32 fukachan Exp $ # package FML::Command::DataCheck; @@ -24,12 +24,21 @@ FML::Command::DataCheck - parse, clean up et.al. command buffer. =head1 SYNOPSIS +use FML::Command::DataCheck; +my $check = new FML::Command::DataCheck; +my ($comname, $comsubname) = $check->parse_command_buffer($clean_command); +my $options = $check->parse_command_arguments($clean_command, $comname); + =head1 DESCRIPTION +This class provides command parsing functions. + =head1 METHODS =head2 new($args) +constructor. + =cut @@ -46,6 +55,20 @@ sub new } +=head2 parse_command_buffer($command) + +return command name ( ^\S+ in $command ) and the sub name as +ARRAY (STR, STR). + +The returned values are already clean. + +=head2 parse_command_arguments($command, $comname) + +return arguments after command name $comname in $command as ARRAY_REF. + +=cut + + # Descriptions: return command name ( ^\S+ in $command ) and the sub name. # remove the prepending strings such as \s, #, ... # Arguments: OBJ($self) STR($command) @@ -61,7 +84,8 @@ sub parse_command_buffer } -# Descriptions: return arguments after command name $comname in $command. +# Descriptions: return arguments after command name $comname in $command +# as ARRAY_REF. # Arguments: OBJ($self) STR($command) STR($comname) # Side Effects: none # Return Value: ARRAY_REF @@ -88,6 +112,14 @@ sub parse_command_arguments } +=head2 find_special_keyword($curproc, $ra_data) + +check the message of the current process to find whether it contains +some special keyword e.g. "confirm". + +=cut + + # # XXX-TODO: find_special_keyword() NOT USED ? YES. REMOVE IT. # @@ -131,6 +163,14 @@ sub find_special_keyword } +=head2 find_anonymous_command_mail_allowed_commands($curproc) + +check the message of the current process to find whether it contais +special keyword e.g. "confirm". + +=cut + + # # XXX-TODO: find_anonymous_command_mail_allowed_commands() NOT USED? YES. RM! # @@ -181,6 +221,14 @@ sub find_anonymous_command_mail_allowed_commands } +=head2 cleanup($string) + +clean up the given string and return a cleaned one. +For example, "# ls uja " -> "ls uja" + +=cut + + # Descriptions: clean up the given string and return a cleaned one. # For example, "# ls uja " -> "ls uja" # Arguments: OBJ($self) STR($s) |
