summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fml/lib/FML/Process/CGI.pm6
-rw-r--r--fml/lib/FML/Process/CGI/Kernel.pm20
-rw-r--r--fml/lib/FML/Process/CGI/Param.pm10
-rw-r--r--fml/lib/FML/Process/Digest.pm21
-rw-r--r--fml/lib/FML/Process/Error.pm14
-rw-r--r--fml/lib/FML/Process/HTMLify.pm15
-rw-r--r--fml/lib/FML/Process/QueueManager.pm7
-rw-r--r--fml/lib/FML/Process/ThreadTrack.pm9
8 files changed, 61 insertions, 41 deletions
diff --git a/fml/lib/FML/Process/CGI.pm b/fml/lib/FML/Process/CGI.pm
index 077558c1..d043303f 100644
--- a/fml/lib/FML/Process/CGI.pm
+++ b/fml/lib/FML/Process/CGI.pm
@@ -1,10 +1,10 @@
#-*- perl -*-
#
-# Copyright (C) 2001 Ken'ichi Fukamachi
+# Copyright (C) 2001,2002 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.
#
-# $FML: CGI.pm,v 1.21 2002/09/11 23:18:13 fukachan Exp $
+# $FML: CGI.pm,v 1.22 2002/09/22 14:56:51 fukachan Exp $
#
package FML::Process::CGI;
@@ -44,7 +44,7 @@ Ken'ichi Fukamachi
=head1 COPYRIGHT
-Copyright (C) 2001 Ken'ichi Fukamachi
+Copyright (C) 2001,2002 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.
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm
index c9484a3f..2819a967 100644
--- a/fml/lib/FML/Process/CGI/Kernel.pm
+++ b/fml/lib/FML/Process/CGI/Kernel.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: Kernel.pm,v 1.43 2002/09/11 23:18:17 fukachan Exp $
+# $FML: Kernel.pm,v 1.44 2002/09/22 14:56:55 fukachan Exp $
#
package FML::Process::CGI::Kernel;
@@ -75,11 +75,14 @@ sub new
print HTTP header.
The charset is C<euc-jp> by default.
+adjust ml_*, load config files and fix @INC.
+
=cut
# Descriptions: print html header.
# analyze cgi data to determine ml_name et.al.
+# adjust ml_*, load config files and fix @INC.
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: none
# Return Value: none
@@ -219,7 +222,7 @@ sub run
# Descriptions: show error string
-# Arguments: STR($r)
+# Arguments: OBJ($curproc) STR($r)
# Side Effects: none
# Return Value: none
sub _error_string
@@ -258,6 +261,7 @@ sub _drive_cgi_by_table
my ($curproc, $args) = @_;
my $r = '';
+ # XXX-TODO: hmm, customisable by /etc/fml/cgi.conf ?
#
# nw north ne
# west center east
@@ -346,6 +350,7 @@ sub cgi_execute_command
unless ($config->has_attribute("commands_for_admin_cgi", $comname)) {
LogError("cgi deny command: mode=$commode level=cgi");
+ # XXX-TODO: validate $comname (CSS).
my $buf = $curproc->message_nl("cgi.deny",
"Error: deny $comname command");
print $buf, "<BR>\n";
@@ -364,6 +369,7 @@ sub cgi_execute_command
$obj->$comname($curproc, $command_args);
};
unless ($@) {
+ # XXX-TODO: validate $comname (CSS).
print "OK! $comname succeed.\n";
}
else {
@@ -373,6 +379,7 @@ sub cgi_execute_command
my ($key, $r) = $curproc->parse_exception($reason);
my $buf = $curproc->message_nl($key);
+ # XXX-TODO: validate output.
print "<BR>\n";
print ($buf || $reason);
print "<BR>\n";
@@ -480,6 +487,8 @@ log.
sub run_cgi_log
{
my ($curproc, $args) = @_;
+
+ # XXX-TODO: NOT IMPLEMENTED.
}
@@ -497,6 +506,8 @@ dummy.
sub run_cgi_dummy
{
my ($curproc, $args) = @_;
+
+ # XXX-TODO: NOT IMPLEMENTED.
}
@@ -515,6 +526,7 @@ sub run_cgi_date
{
my ($curproc, $args) = @_;
+ # XXX-TODO: NOT IMPLEMENTED. NOT USE `date`;
print `date`;
}
@@ -538,6 +550,7 @@ sub run_cgi_options
print "<P> <B> options </B>\n";
+ # XXX-TODO: validate $action.
print start_form(-action=>$action);
print "Language:\n";
@@ -561,7 +574,6 @@ execute cgi_menu() given as FML::Command::*
# Descriptions: execute FML::Command
# Arguments: OBJ($curproc) HASH_REF($args)
-# STR($comname) HASH_REF($command_args)
# Side Effects: load module
# Return Value: none
sub run_cgi_menu
@@ -571,6 +583,7 @@ sub run_cgi_menu
my $command_args = $pcb->get('cgi', 'command_args');
if (defined $command_args) {
+ # XXX-TODO: validate $comname
my $comname = $command_args->{ comname };
my $cmd = "FML::Command::Admin::$comname";
my $obj = undef;
@@ -713,6 +726,7 @@ sub AUTOLOAD
return $curproc->$method($varname);
}
else {
+ # XXX-TODO: validate $comname
croak("__ERROR_cgi.unknown_method__: unknown method $comname");
}
}
diff --git a/fml/lib/FML/Process/CGI/Param.pm b/fml/lib/FML/Process/CGI/Param.pm
index 42766647..0658b722 100644
--- a/fml/lib/FML/Process/CGI/Param.pm
+++ b/fml/lib/FML/Process/CGI/Param.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: Param.pm,v 1.17 2002/09/11 23:18:17 fukachan Exp $
+# $FML: Param.pm,v 1.18 2002/09/22 14:56:55 fukachan Exp $
#
package FML::Process::CGI::Param;
@@ -17,7 +17,7 @@ use CGI qw/:standard/;
=head1 NAME
-FML::Process::CGI::Param - CGI input restriction
+FML::Process::CGI::Param - restric CGI input
=head1 SYNOPSIS
@@ -25,11 +25,11 @@ See FML::CGI:: on usage.
=head1 DESCRIPTION
-cleaner for data.
+cleaner for input data.
=head1 METHODS
-=head2 safe_param(str, key)
+=head2 safe_param(key)
return value for key if the value is appropriate.
@@ -77,7 +77,7 @@ sub safe_param
}
-=head2 safe_paramlist($self, $numregexp, $key)
+=head2 safe_paramlist($numregexp, $key)
return ARRAY_REF for $key.
diff --git a/fml/lib/FML/Process/Digest.pm b/fml/lib/FML/Process/Digest.pm
index 35ccc853..47a37018 100644
--- a/fml/lib/FML/Process/Digest.pm
+++ b/fml/lib/FML/Process/Digest.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Digest.pm,v 1.4 2002/11/18 13:52:22 fukachan Exp $
+# $FML: Digest.pm,v 1.5 2002/12/10 12:00:50 fukachan Exp $
#
package FML::Process::Digest;
@@ -63,12 +63,13 @@ sub new
forward the request to the base class.
adjust ml_* and load configuration files.
+fix @INC.
=cut
# Descriptions: prepare miscellaneous work before the main routine starts.
-# adjust ml_* and load configuration files.
+# adjust ml_* and load configuration files. fix @INC.
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: none
# Return Value: none
@@ -97,15 +98,12 @@ sub prepare
=head2 C<verify_request($args)>
-check the mail sender and the mail loop possibility.
+set up the mail sender.
=cut
-# Descriptions: verify the mail sender and others
-# 1. verify user credential
-# 2. primitive loop check
-# 3. filter
+# Descriptions: set up the mail sender.
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: none
# Return Value: none
@@ -201,8 +199,8 @@ If needed, we send back error messages to the mail sender.
=cut
-# Descriptions: clean up in the end of the curreen process.
-# return error messages et. al.
+# Descriptions: queue flush.
+# return error messages et. al if needed.
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: queue flush
# Return Value: none
@@ -223,9 +221,9 @@ sub finish
}
-# Descriptions:
+# Descriptions: primitive digest delivery.
# Arguments: OBJ($curproc) HASH_REF($args)
-# Side Effects:
+# Side Effects: update digest sequence.
# Return Value: none
sub _digest
{
@@ -241,6 +239,7 @@ sub _digest
$did++; # start = last digest id + 1
my $range = "$did-$aid";
+ # XXX-TODO: $range = "100-200" -> $range = [ 100, 101, ... ]; ?
# create multipart of articles as a digest.
$digest->create_multipart_message({ range => $range });
diff --git a/fml/lib/FML/Process/Error.pm b/fml/lib/FML/Process/Error.pm
index 97617f0a..2af4d3f9 100644
--- a/fml/lib/FML/Process/Error.pm
+++ b/fml/lib/FML/Process/Error.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Error.pm,v 1.23 2002/09/22 14:56:52 fukachan Exp $
+# $FML: Error.pm,v 1.24 2002/09/22 15:01:21 fukachan Exp $
#
package FML::Process::Error;
@@ -57,7 +57,9 @@ sub new
=head2 C<prepare($args)>
-forward the request to SUPER CLASS.
+parse argv, load config files and fix @INC.
+
+if $use_error_analyzer_program, parse incoming message.
=cut
@@ -93,12 +95,12 @@ sub prepare
=head2 C<verify_request($args)>
-verify the sender is a valid member or not.
+dummy.
=cut
-# Descriptions: verify the sender of this process is an ML member.
+# Descriptions: dummy.
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: none
# Return Value: 1 or 0
@@ -129,9 +131,9 @@ XXX Each command determines need of lock or not.
=cut
-# Descriptions: call _evaluate_command_lines()
+# Descriptions: analyze error mails and remove error addresses.
# Arguments: OBJ($curproc) HASH_REF($args)
-# Side Effects: none
+# Side Effects: update cache and member lists if needed.
# Return Value: none
sub run
{
diff --git a/fml/lib/FML/Process/HTMLify.pm b/fml/lib/FML/Process/HTMLify.pm
index a93ee4a5..b9361698 100644
--- a/fml/lib/FML/Process/HTMLify.pm
+++ b/fml/lib/FML/Process/HTMLify.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: HTMLify.pm,v 1.24 2002/09/22 14:56:53 fukachan Exp $
+# $FML: HTMLify.pm,v 1.25 2002/11/18 22:47:26 fukachan Exp $
#
package FML::Process::HTMLify;
@@ -41,7 +41,7 @@ create a C<FML::Process::Kernel> object and return it.
=head2 C<prepare()>
-adjust ml_* and load configuration files.
+adjust ml_*, load configuration files and fix @INC.
=cut
@@ -59,7 +59,7 @@ sub new
}
-# Descriptions: adjust ml_* and load configuration files
+# Descriptions: adjust ml_*, load configuration files, and fix @INC.
# Arguments: OBJ($self) HASH_REF($args)
# Side Effects: none
# Return Value: none
@@ -80,7 +80,7 @@ sub prepare
}
-# Descriptions: dummy to avoid to take data from STDIN
+# Descriptions: dummy.
# Arguments: OBJ($self) HASH_REF($args)
# Side Effects: none
# Return Value: none
@@ -99,10 +99,11 @@ sub verify_request
=head2 C<run($args)>
-call the actual thread tracking system.
+call &FML::Command::HTMLify::convert().
=cut
+
# Descriptions: convert text format article to HTML by Mail::Message::ToHTML
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: load modules, create HTML files and directories
@@ -160,7 +161,7 @@ _EOF_
}
-# Descriptions: dummy to avoid to take data from STDIN
+# Descriptions: dummy.
# Arguments: OBJ($self) HASH_REF($args)
# Side Effects: none
# Return Value: none
@@ -177,7 +178,7 @@ sub finish
}
-# Descriptions: dummy to avoid to take data from STDIN
+# Descriptions: dummy.
# Arguments: OBJ($self) HASH_REF($args)
# Side Effects: none
# Return Value: none
diff --git a/fml/lib/FML/Process/QueueManager.pm b/fml/lib/FML/Process/QueueManager.pm
index 974e19b5..14a68118 100644
--- a/fml/lib/FML/Process/QueueManager.pm
+++ b/fml/lib/FML/Process/QueueManager.pm
@@ -1,10 +1,10 @@
#-*- perl -*-
#
-# Copyright (C) 2001 Ken'ichi Fukamachi
+# Copyright (C) 2001,2002 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.
#
-# $FML: QueueManager.pm,v 1.8 2002/09/11 23:18:16 fukachan Exp $
+# $FML: QueueManager.pm,v 1.9 2002/09/22 14:56:53 fukachan Exp $
#
package FML::Process::QueueManager;
@@ -93,6 +93,7 @@ sub send
$self->_send($curproc, $q) && $q->remove();
}
else {
+ # XXX-TODO: $q->remove() if invalid queue ?
Log("$qid is invalid");
}
$q->unlock();
@@ -148,7 +149,7 @@ Ken'ichi Fukamachi
=head1 COPYRIGHT
-Copyright (C) 2001 Ken'ichi Fukamachi
+Copyright (C) 2001,2002 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.
diff --git a/fml/lib/FML/Process/ThreadTrack.pm b/fml/lib/FML/Process/ThreadTrack.pm
index f29562d6..05fd2359 100644
--- a/fml/lib/FML/Process/ThreadTrack.pm
+++ b/fml/lib/FML/Process/ThreadTrack.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: ThreadTrack.pm,v 1.34 2002/09/22 14:56:54 fukachan Exp $
+# $FML: ThreadTrack.pm,v 1.35 2002/10/28 09:58:12 tmu Exp $
#
package FML::Process::ThreadTrack;
@@ -38,7 +38,7 @@ create a C<FML::Process::Kernel> object and return it.
=head2 C<prepare()>
-adjust ml_* and load configuration files.
+adjust ml_*, load configuration files and fix @INC.
=cut
@@ -56,7 +56,7 @@ sub new
}
-# Descriptions: adjust ml_* and load configuration files
+# Descriptions: adjust ml_*, load configuration files and fix @INC.
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: none
# Return Value: none
@@ -178,6 +178,7 @@ sub run
elsif ($command eq 'close') {
my $thread_id = $argv->[ 2 ];
if (defined $thread_id) {
+ # XXX-TODO: method-ify.
_close($thread, $thread_id, 1, $max_id);
}
else {
@@ -185,6 +186,8 @@ sub run
}
}
else {
+ # XXX-TODO: hmm, run interactive session unless @ARGV ?
+ # XXX-TODO: showing help is appropriate ?
if ($argv->[ 0 ] ne '') {
push(@ISA, 'FML::Process::ThreadTrack::CUI');
$ttargs->{ ml_name } = $argv->[ 0 ];