summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-12-23 09:20:41 +0000
committerfukachan <fukachan>2001-12-23 09:20:41 +0000
commit04cb8de0162bf2d3acc6ce19226b5e93c8e05cc1 (patch)
treed8a6077cbae6d7d5bed20afc5579b3783a26d1ec /fml/lib/FML/Command
parent34c85054ab72e6de478260ab299b8c9f55d883d2 (diff)
downloadfml8-04cb8de0162bf2d3acc6ce19226b5e93c8e05cc1.tar.gz
fml8-04cb8de0162bf2d3acc6ce19226b5e93c8e05cc1.tar.bz2
fml8-04cb8de0162bf2d3acc6ce19226b5e93c8e05cc1.zip
update documents, comments
Diffstat (limited to 'fml/lib/FML/Command')
-rw-r--r--fml/lib/FML/Command/Attribute.pm37
-rw-r--r--fml/lib/FML/Command/SendFile.pm41
2 files changed, 52 insertions, 26 deletions
diff --git a/fml/lib/FML/Command/Attribute.pm b/fml/lib/FML/Command/Attribute.pm
index 694f5688..f6fa42be 100644
--- a/fml/lib/FML/Command/Attribute.pm
+++ b/fml/lib/FML/Command/Attribute.pm
@@ -4,13 +4,36 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: Attribute.pm,v 1.1 2001/10/17 10:24:26 fukachan Exp $
+# $FML: Attribute.pm,v 1.2 2001/12/22 09:21:03 fukachan Exp $
#
package FML::Command::Attribute;
use strict;
use vars qw($FML_USER_COMMAND $FML_ADMIN_COMMAND);
+=head1 NAME
+
+FML::Command::Attribute - define attributes for each command
+
+=head1 SYNOPSIS
+
+ $r = $obj->get_attribute($mode, $comname, 'require_lock');
+ lock() if $r;
+
+=head1 DESCRIPTION
+
+get attribute for command under ucrrent mode.
+do something following the attribute value.
+
+=head1 METHOD
+
+=head2 get_attribute(mode, comname, attribute)
+
+return attribute for (mode, comname, attribute) combination.
+
+=cut
+
+
$FML_USER_COMMAND = {
'__default__' => {
'require_lock' => 1,
@@ -22,6 +45,10 @@ $FML_USER_COMMAND = {
};
+# Descriptions: return attribute for (mode, comname, attribute) combination
+# Arguments: OBJ($self) STR($mode) STR($comname) STR($attribute)
+# Side Effects: none
+# Return Value: STR
sub get_attribute
{
my ($self, $mode, $comname, $attribute) = @_;
@@ -59,14 +86,6 @@ sub get_attribute
}
-=head1 NAME
-
-FML::Command::Attribute - attribute for each command
-
-=head1 SYNOPSIS
-
-=head1 DESCRIPTION
-
=head1 AUTHOR
Ken'ichi Fukamachi
diff --git a/fml/lib/FML/Command/SendFile.pm b/fml/lib/FML/Command/SendFile.pm
index 6af79298..0ba266a7 100644
--- a/fml/lib/FML/Command/SendFile.pm
+++ b/fml/lib/FML/Command/SendFile.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: SendFile.pm,v 1.4 2001/10/17 03:05:12 fukachan Exp $
+# $FML: SendFile.pm,v 1.5 2001/12/22 09:21:03 fukachan Exp $
#
package FML::Command::SendFile;
@@ -17,30 +17,36 @@ use FML::Log qw(Log LogWarn LogError);
=head1 NAME
-FML::Command::SendFile - utility functions to send back specified file
+FML::Command::SendFile - utility functions to send back file(s)
=head1 SYNOPSIS
-not yet implemented
+For example, See L<FML::Command::User::get> and
+L<FML::Command::Admin::get>..
+
+ sub process
+ {
+ my ($self, $curproc, $command_args) = @_;
+ $self->send_article($curproc, $command_args);
+ }
=head1 DESCRIPTION
+This module provides several utility functions to send back article
+and file in C<$ml_home_dir>.
+
=head1 METHODS
=head2 C<send_article($curproc, $command_args)>
-send back articles.
-
-used in
-C<FML::Command::User>
-and
-C<FML::Command::Admin>
-modules.
+send back articles. This is used in C<FML::Command::User> and
+C<FML::Command::Admin> modules.
=cut
+
# Descriptions: send back articles
-# Arguments: $self $curproc $command_args
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
# Side Effects: none
# Return Value: none
sub send_article
@@ -80,9 +86,9 @@ sub send_article
# Descriptions: check the argument and expand it if needed
-# Arguments: $self $curproc $filename_string
+# Arguments: OBJ($self) OBJ($curproc) STR($fn)
# Side Effects: none
-# Return Value: HASH ARRAY as [ $fist .. $last ]
+# Return Value: HASH_ARRAY as [ $fist .. $last ]
sub _is_valid_argument
{
my ($self, $curproc, $fn) = @_;
@@ -126,9 +132,9 @@ sub _is_valid_argument
# Descriptions: make an array from $fist to $last number
-# Arguments: $first_number $last_number
+# Arguments: NUM($first_number) NUM($last_number)
# Side Effects: none
-# Return Value: HASH ARRAY as [ $first .. $last ]
+# Return Value: HASH_ARRAY as [ $first .. $last ]
sub _expand_range
{
my ($first, $last) = @_;
@@ -145,8 +151,9 @@ send back file specified as C<$command_args->{ _file_to_send }>.
=cut
-# Descriptions:
-# Arguments: $self $curproc $command_args
+
+# Descriptions: send arbitrary file in $ml_home_dir.
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
# Side Effects: none
# Return Value: none
sub send_file