summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-05-28 16:17:12 +0000
committerfukachan <fukachan>2001-05-28 16:17:12 +0000
commit2b66d7580815f48c1bd7fb9ff50834a94e957dd9 (patch)
tree226cd212fe15dccdccd3e552b8260e00bcd059dc /fml/lib/FML/Process
parent44f5a673de6ec6dd6eef85ed9f523ca7b181146d (diff)
downloadfml8-2b66d7580815f48c1bd7fb9ff50834a94e957dd9.tar.gz
fml8-2b66d7580815f48c1bd7fb9ff50834a94e957dd9.tar.bz2
fml8-2b66d7580815f48c1bd7fb9ff50834a94e957dd9.zip
clean up documents
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/CGI.pm21
-rw-r--r--fml/lib/FML/Process/Command.pm70
-rw-r--r--fml/lib/FML/Process/QMail.pm13
-rw-r--r--fml/lib/FML/Process/Switch.pm34
4 files changed, 111 insertions, 27 deletions
diff --git a/fml/lib/FML/Process/CGI.pm b/fml/lib/FML/Process/CGI.pm
index a35900f3..051ae55c 100644
--- a/fml/lib/FML/Process/CGI.pm
+++ b/fml/lib/FML/Process/CGI.pm
@@ -4,8 +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.
#
-# $Id$
-# $FML$
+# $FML: CGI.pm,v 1.12 2001/04/03 09:45:43 fukachan Exp $
#
package FML::Process::CGI;
@@ -26,13 +25,14 @@ FML::Process::CGI - CGI basic functions
=head1 DESCRIPTION
-the base class of CGI programs
+the base class of CGI programs.
+It provides basic functions and flow.
=head1 METHODS
=head2 C<new()>
-constructor which is usual in FML::Process classes.
+ordinary constructor which is used widely in FML::Process classes.
=cut
@@ -43,7 +43,7 @@ use FML::Config;
# load standard CGI routines
use CGI qw/:standard/;
-@ISA = qw(FML::Process::Kernel Exporter);
+@ISA = qw(FML::Process::Kernel);
# XXX now we re-evaluate $ml_home_dir and @cf again.
@@ -75,6 +75,7 @@ sub new
=head2 C<prepare()>
print HTTP header.
+The charset is C<euc-jp> by default.
=cut
@@ -92,11 +93,11 @@ sub prepare
=head2 C<verify_request()>
-a dummy method
+dummy method now.
=head2 C<finish()>
-dummy method
+dummy method now.
=cut
@@ -104,6 +105,12 @@ sub verify_request { 1;}
sub finish { 1;}
+=head2 C<run()>
+
+dispatch *.cgi programs.
+
+=cut
+
# See CGI.pm for more details
sub run
{
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index 804c171b..85cfb9c4 100644
--- a/fml/lib/FML/Process/Command.pm
+++ b/fml/lib/FML/Process/Command.pm
@@ -1,10 +1,10 @@
#!/usr/local/bin/perl -w
#-*- perl -*-
#
-# Copyright (C) 2000 Ken'ichi Fukamachi
+# Copyright (C) 2000,2001 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Command.pm,v 1.8 2001/04/03 09:45:43 fukachan Exp $
+# $FML: Command.pm,v 1.9 2001/04/06 16:25:43 fukachan Exp $
#
package FML::Process::Command;
@@ -22,24 +22,38 @@ use FML::Config;
=head1 NAME
-FML::Process::Command -- fml5 command wrapper.
+FML::Process::Command -- fml5 command dispacher.
=head1 SYNOPSIS
use FML::Process::Command;
...
-See L<FML::Process::Flow> for details of flow.
+See L<FML::Process::Flow> for details of fml process flow.
=head1 DESCRIPTION
C<FML::Process::Command> is a command wrapper and top level
-dispatcher.
-It kicks off C<FML::Command>->C<$command($curproc, $args)> for each
-C<$command>.
+dispatcher for commands.
+It kicks off corresponding
+C<FML::Command>->C<$command($curproc,$args)>
+for the given C<$command>.
+
+=head1 METHODS
+
+=head2 C<new($args)>
+
+make fml process object.
+
+ my $curproc = new FML::Process::Kernel $args;
+
+=head2 C<prepare($args)>
+
+forward the request to SUPER CLASS.
=cut
+
sub new
{
my ($self, $args) = @_;
@@ -56,6 +70,12 @@ sub prepare
}
+=head2 C<verify_request($args)>
+
+verify the sender is a valid member or not.
+
+=cut
+
sub verify_request
{
my ($curproc, $args) = @_;
@@ -63,6 +83,17 @@ sub verify_request
}
+=head2 C<run($args)>
+
+dispatcher to run correspondig C<FML::Command::command> for
+C<command>.
+
+ lock
+ execute FML::Command::command
+ unlock
+
+=cut
+
sub run
{
my ($curproc, $args) = @_;
@@ -81,6 +112,12 @@ sub run
}
+=head2 C<finish($args)>
+
+ $curproc->inform_reply_messages();
+
+=cut
+
sub finish
{
my ($curproc, $args) = @_;
@@ -128,4 +165,23 @@ sub _evaluate_command
}
+=head1 AUTHOR
+
+Ken'ichi Fukamachi
+
+=head1 COPYRIGHT
+
+Copyright (C) 2001 Ken'ichi Fukamachi
+
+All rights reserved. This program is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 HISTORY
+
+FML::Process::Command appeared in fml5 mailing list driver package.
+See C<http://www.fml.org/> for more details.
+
+=cut
+
+
1;
diff --git a/fml/lib/FML/Process/QMail.pm b/fml/lib/FML/Process/QMail.pm
index 043e1072..fecf5527 100644
--- a/fml/lib/FML/Process/QMail.pm
+++ b/fml/lib/FML/Process/QMail.pm
@@ -4,8 +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.
#
-# $Id$
-# $FML$
+# $FML: QMail.pm,v 1.7 2001/04/03 09:45:43 fukachan Exp $
#
package FML::Process::QMail;
@@ -36,6 +35,16 @@ C<NOT YET IMPLERMENTED>.
C<NOT YET IMPLERMENTED>.
+=head1 TODO
+
+ XXX
+ XXX MEMO on TODO
+ XXX
+
+ we should not use "# command" representation even though internally.
+
+ check $ext more restrictly.
+
=head1 METHODS
=cut
diff --git a/fml/lib/FML/Process/Switch.pm b/fml/lib/FML/Process/Switch.pm
index e189be09..9009aef2 100644
--- a/fml/lib/FML/Process/Switch.pm
+++ b/fml/lib/FML/Process/Switch.pm
@@ -4,8 +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.
#
-# $Id$
-# $FML: Switch.pm,v 1.17 2001/04/05 08:30:27 fukachan Exp $
+# $FML: Switch.pm,v 1.18 2001/04/15 13:30:02 fukachan Exp $
#
package FML::Process::Switch;
@@ -17,11 +16,11 @@ use vars qw($debug);
=head1 NAME
-FML::Process::Switch - switch or dispather table to run the suitable library
+FML::Process::Switch - dispatch the suitable library
=head1 SYNOPSIS
-(in libexec/loader)
+used in C<libexec/loader>.
package main;
use FML::Process::Switch;
@@ -32,15 +31,19 @@ FML::Process::Switch - switch or dispather table to run the suitable library
C<libexec/loader> (C<libexec/fml/loader>), the wrapper, loads this
program and calls C<Bootstrap2()>.
C<Bootstrap2()> loads main.cf,
-analyzes the command argument
-and kicks off C<ProcessSwitch()> finally.
-C<ProcessSwitch()> emulates "use $package" to load a program specified
-by the arguments.
+analyzes the command arguments
+and call C<ProcessSwitch()> finally.
+
+C<ProcessSwitch()> emulates "use $package" to load
+the corresponding library with the arguments.
The fml flow bifurcates here through C<ProcessSwitch()>.
-The details of each program exists in FML::Process:: class.
+The flow details of program exists in FML::Process:: class.
For example, libexec/distribute (fml.pl) runs in this way.
-
+
+ functions class
+ ----------------------------------------
+
main::Bootstrap() libexec/loader
|
V
@@ -63,7 +66,8 @@ It reads *.cf files, parses them and set the result to C<@cf>
array variable.
We pass it to C<ProcessSwitch()> later.
- @cf = ( /etc/fml/defaults/$VERSION/default_config.cf
+ @cf = (
+ /etc/fml/defaults/$VERSION/default_config.cf
/etc/fml/site_default_config.cf (required ?)
/etc/fml/domains/$DOMAIN/default_config.cf
/var/spool/ml/elena/config.cf
@@ -246,6 +250,14 @@ sub _makefml_parse_argv
=head2 C<ProcessSwitch($args)>
+load the library and prepare environment to use it.
+C<ProcessSwitch($args)> return process object C<$obj>.
+
+To start the process, we pass C<$obj> with C<$args> to
+C<FML::Process::Flow::ProcessStart($obj, $args)>.
+
+C<$args> is like this:
+
my $args = {
fml_version => $main_cf->{ fml_version },