summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-12-18 04:43:51 +0000
committerfukachan <fukachan>2002-12-18 04:43:51 +0000
commit0e7a6e2a86e09cbc2e5631bcaf5e2518f81cd328 (patch)
tree9705d4b6a9ce6eda7d4e8b3bd1843b12bb814b53 /fml/lib/FML/Process
parentea5a0bc5326d04fc0071a4512e46599e81d42f43 (diff)
downloadfml8-0e7a6e2a86e09cbc2e5631bcaf5e2518f81cd328.tar.gz
fml8-0e7a6e2a86e09cbc2e5631bcaf5e2518f81cd328.tar.bz2
fml8-0e7a6e2a86e09cbc2e5631bcaf5e2518f81cd328.zip
fix comments, more error messagse
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Alias.pm26
-rw-r--r--fml/lib/FML/Process/Calender.pm8
-rw-r--r--fml/lib/FML/Process/ConfViewer.pm14
-rw-r--r--fml/lib/FML/Process/Configure.pm18
-rw-r--r--fml/lib/FML/Process/DocViewer.pm10
-rw-r--r--fml/lib/FML/Process/QMail.pm8
-rw-r--r--fml/lib/FML/Process/Scheduler.pm6
-rw-r--r--fml/lib/FML/Process/Summary.pm29
-rw-r--r--fml/lib/FML/Process/Utils.pm11
9 files changed, 82 insertions, 48 deletions
diff --git a/fml/lib/FML/Process/Alias.pm b/fml/lib/FML/Process/Alias.pm
index 43a66a0c..335d4f1d 100644
--- a/fml/lib/FML/Process/Alias.pm
+++ b/fml/lib/FML/Process/Alias.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Alias.pm,v 1.4 2002/09/11 23:18:13 fukachan Exp $
+# $FML: Alias.pm,v 1.5 2002/09/22 14:56:51 fukachan Exp $
#
package FML::Process::Alias;
@@ -20,7 +20,7 @@ use FML::Process::Kernel;
=head1 NAME
-FML::Process::Alias -- fmlalias main functions
+FML::Process::Alias -- fmlalias, which show all aliases.
=head1 SYNOPSIS
@@ -32,6 +32,9 @@ FML::Process::Alias -- fmlalias main functions
FML::Process::Alias provides the main function for C<fmlalias>.
+C<fmladdr> command shows all aliases (accounts + aliases) but
+C<fmlalias> command shows only aliases without accounts.
+
See C<FML::Process::Flow> for the flow detail.
=head1 METHODS
@@ -61,7 +64,7 @@ sub new
}
-# Descriptions: dummy
+# Descriptions: load config files and fix @INC.
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: none
# Return Value: none
@@ -82,7 +85,7 @@ sub prepare
}
-# Descriptions: check @ARGV, call help() if needed.
+# Descriptions: dummy.
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: exit ASAP.
# longjmp() to help() if appropriate
@@ -110,12 +113,7 @@ sub verify_request
=head2 C<run($args)>
-the top level dispatcher for C<fmlconf> and C<fmlalias>.
-
-It kicks off internal function
-C<_fmlconf($args)> for C<fmlconf>
- and
-C<_fmlalias($args)> for fmlalias.
+the top level dispatcher for C<fmlalias>.
NOTE:
C<$args> is passed from parrent libexec/loader.
@@ -179,10 +177,6 @@ print <<"_EOF_";
Usage: $name \$command \$ml_name [options]
-$name help \$ml_name show this help
-
-$name list
-
_EOF_
}
@@ -190,8 +184,6 @@ _EOF_
=head2 C<_fmlalias($args)> (INTERNAL USE)
switch of C<fmlalias> command.
-It kicks off <FML::Command::$command> corrsponding with
-C<@$argv> ( $argv = $args->{ ARGV } ).
C<Caution:>
C<$args> is passed from parrent libexec/loader.
@@ -221,7 +213,7 @@ sub _fmlalias
my $eval = $config->get_hook( 'fmlalias_run_start_hook' );
if ($eval) { eval qq{ $eval; }; LogWarn($@) if $@; }
- # -n
+ # show fmlonly aliases if -n option specified.
my $mode = $args->{ options }->{ n } ? 'fmlonly' : 'all';
use FML::MTAControl;
diff --git a/fml/lib/FML/Process/Calender.pm b/fml/lib/FML/Process/Calender.pm
index 168dac02..9bfd55a2 100644
--- a/fml/lib/FML/Process/Calender.pm
+++ b/fml/lib/FML/Process/Calender.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Calender.pm,v 1.8 2002/09/11 23:18:14 fukachan Exp $
+# $FML: Calender.pm,v 1.9 2002/09/22 14:56:51 fukachan Exp $
#
package FML::Process::Calender;
@@ -41,6 +41,10 @@ standard constructor.
dummy.
+=head2 C<verify_request($args)>
+
+dummy.
+
=cut
@@ -135,9 +139,11 @@ sub run
$wh->close;
+ # XXX-TODO: use $path_w3m not w3m
if ($mode eq 'text') {
system "w3m -dump $tmpf";
}
+ # XXX-TODO: use $path_cat not cat
else {
system "cat $tmpf";
}
diff --git a/fml/lib/FML/Process/ConfViewer.pm b/fml/lib/FML/Process/ConfViewer.pm
index 5058df26..bf5aeaf5 100644
--- a/fml/lib/FML/Process/ConfViewer.pm
+++ b/fml/lib/FML/Process/ConfViewer.pm
@@ -3,14 +3,13 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: ConfViewer.pm,v 1.17 2002/09/22 14:56:52 fukachan Exp $
+# $FML: ConfViewer.pm,v 1.18 2002/09/29 05:28:25 fukachan Exp $
#
package FML::Process::ConfViewer;
-
-use vars qw($debug @ISA @EXPORT @EXPORT_OK);
use strict;
use Carp;
+use vars qw($debug @ISA @EXPORT @EXPORT_OK);
use FML::Log qw(Log LogWarn LogError);
use FML::Process::Kernel;
@ISA = qw(FML::Process::Kernel);
@@ -41,7 +40,11 @@ It make a C<FML::Process::Kernel> object and return it.
=head2 C<prepare($args)>
-adjust ml_* and load configuration files.
+fix @INC, adjust ml_* and load configuration files.
+
+=head2 C<verify_request($args)>
+
+show help unless @ARGV.
=cut
@@ -118,7 +121,7 @@ sub verify_request
=head2 C<run($args)>
-the top level dispatcher for C<fmlconf> and C<makefml>.
+the top level dispatcher for C<fmlconf>.
It kicks off internal function C<_fmlconf($args)> for C<fmlconf>.
@@ -225,6 +228,7 @@ sub _fmlconf
my $mode = $args->{ options }->{ n } ? 'difference_only' : 'all';
my $argv = $curproc->command_line_argv();
+ # if variable name is given, show the value.
if (defined $argv->[1]) {
my $k = $argv->[1];
print "$k = ", $config->{ $k }, "\n";
diff --git a/fml/lib/FML/Process/Configure.pm b/fml/lib/FML/Process/Configure.pm
index fcc92bf0..fa898a5f 100644
--- a/fml/lib/FML/Process/Configure.pm
+++ b/fml/lib/FML/Process/Configure.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Configure.pm,v 1.44 2002/09/11 23:18:14 fukachan Exp $
+# $FML: Configure.pm,v 1.45 2002/09/22 14:56:52 fukachan Exp $
#
package FML::Process::Configure;
@@ -43,7 +43,11 @@ It make a C<FML::Process::Kernel> object and return it.
=head2 C<prepare($args)>
-adjust ml_* and load configuration files.
+fix @INC, adjust ml_* and load configuration files.
+
+=head2 C<verify_request($args)>
+
+show help if needed.
=cut
@@ -109,11 +113,9 @@ sub verify_request
=head2 C<run($args)>
-the top level dispatcher for C<fmlconf> and C<makefml>.
+the top level dispatcher for C<makefml>.
It kicks off internal function
-C<_fmlconf($args)> for C<fmlconf>
- and
C<_makefml($args)> for makefml.
NOTE:
@@ -182,8 +184,11 @@ $name help \$ml_name show this help
$name subscribe \$ml_name ADDRESS
$name unsubscribe \$ml_name ADDRESS
-
+...
_EOF_
+
+ # XXX-TODO: show all available commands at the last of help message.
+
}
@@ -220,6 +225,7 @@ sub _makefml
my ($method, $argv_ml_name, @options) = @$argv;
# arguments to pass off to each method
+ # XXX-TODO: command = [ $method, @options ]; ? (no, used only for message?)
my $command_args = {
command_mode => 'admin',
comname => $method,
diff --git a/fml/lib/FML/Process/DocViewer.pm b/fml/lib/FML/Process/DocViewer.pm
index d52957bd..81d1cff7 100644
--- a/fml/lib/FML/Process/DocViewer.pm
+++ b/fml/lib/FML/Process/DocViewer.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: DocViewer.pm,v 1.20 2002/09/11 23:18:15 fukachan Exp $
+# $FML: DocViewer.pm,v 1.21 2002/09/22 14:56:52 fukachan Exp $
#
package FML::Process::DocViewer;
@@ -46,7 +46,11 @@ It inherits C<FML::Process::Kernel>.
=head2 C<prepare($args)>
-load default configuration files.
+load default configuration files and fix @INC.
+
+=head2 C<verify_request($args)>
+
+show help unless @ARGV.
=cut
@@ -64,7 +68,7 @@ sub new
}
-# Descriptions: load default configurations
+# Descriptions: load default configurations and fix @INC.
# Arguments: OBJ($self) HASH_REF($args)
# Side Effects: none
# Return Value: none
diff --git a/fml/lib/FML/Process/QMail.pm b/fml/lib/FML/Process/QMail.pm
index 6ad5e6d8..89e0e50f 100644
--- a/fml/lib/FML/Process/QMail.pm
+++ b/fml/lib/FML/Process/QMail.pm
@@ -4,13 +4,13 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: QMail.pm,v 1.13 2002/09/11 23:18:15 fukachan Exp $
+# $FML: QMail.pm,v 1.14 2002/09/22 14:56:53 fukachan Exp $
#
package FML::Process::QMail;
use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
+use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use FML::Log qw(Log LogWarn LogError);
@@ -53,6 +53,10 @@ C<NOT YET IMPLERMENTED>.
=cut
+#
+# XXX-TODO: NOT YET IMPLERMENTED.
+#
+
# Descriptions: qmail style command extention
# elena-subscribe@domain implies
diff --git a/fml/lib/FML/Process/Scheduler.pm b/fml/lib/FML/Process/Scheduler.pm
index 7d63208a..bd9f0233 100644
--- a/fml/lib/FML/Process/Scheduler.pm
+++ b/fml/lib/FML/Process/Scheduler.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Scheduler.pm,v 1.18 2002/09/15 00:11:44 fukachan Exp $
+# $FML: Scheduler.pm,v 1.19 2002/09/22 14:56:54 fukachan Exp $
#
package FML::Process::Scheduler;
@@ -55,6 +55,8 @@ sub new
sub queue_in
{
my ($self, $key) = @_;
+
+ # XXX-TODO: NOT IMPLEMENTED
}
@@ -64,7 +66,7 @@ sub queue_in
# Return Value: none
sub exits
{
-
+ # XXX-TODO: NOT IMPLEMENTED
}
diff --git a/fml/lib/FML/Process/Summary.pm b/fml/lib/FML/Process/Summary.pm
index 1f33a2c4..f64f4c96 100644
--- a/fml/lib/FML/Process/Summary.pm
+++ b/fml/lib/FML/Process/Summary.pm
@@ -1,17 +1,16 @@
#-*- perl -*-
#
-# Copyright (C) 2001,2002 Ken'ichi Fukamachi
+# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Summary.pm,v 1.2 2002/11/26 10:30:06 fukachan Exp $
+# $FML: Summary.pm,v 1.3 2002/11/26 10:47:22 fukachan Exp $
#
package FML::Process::Summary;
-use vars qw($debug @ISA @EXPORT @EXPORT_OK);
use strict;
use Carp;
-
+use vars qw($debug @ISA @EXPORT @EXPORT_OK);
use FML::Log qw(Log LogWarn LogError);
use FML::Config;
use FML::Process::Kernel;
@@ -20,7 +19,7 @@ use FML::Process::Kernel;
=head1 NAME
-FML::Process::Summary -- maintenance article summary
+FML::Process::Summary -- maintain article summary
=head1 SYNOPSIS
@@ -43,7 +42,11 @@ It make a C<FML::Process::Kernel> object and return it.
=head2 C<prepare($args)>
-dummy.
+adjust ml_* variables, load config files and fix @INC.
+
+=head2 C<verify_request($args)>
+
+show help if enough arguments not specified.
=cut
@@ -186,9 +189,7 @@ _EOF_
=head2 C<_fmlsummary($args)> (INTERNAL USE)
-switch of C<fmlsummary> command.
-It kicks off <FML::Command::$command> corrsponding with
-C<@$argv> ( $argv = $args->{ ARGV } ).
+the main switch of C<fmlsummary> command.
C<Caution:>
C<$args> is passed from parrent libexec/loader.
@@ -229,8 +230,14 @@ sub _fmlsummary
$summary->rebuild(1, $id_max);
}
else {
- LogError("unknown method=$method");
- print STDERR "Error: unknown method=$method\n";
+ if ($method) {
+ LogError("unknown method=$method");
+ print STDERR "Error: unknown method=$method\n";
+ }
+ else {
+ LogError("method not given");
+ print STDERR "Error: method not given\n";
+ }
}
$eval = $config->get_hook( 'fmlsummary_run_end_hook' );
diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm
index eb5173df..4faff18b 100644
--- a/fml/lib/FML/Process/Utils.pm
+++ b/fml/lib/FML/Process/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.48 2002/10/29 10:35:30 fukachan Exp $
+# $FML: Utils.pm,v 1.49 2002/11/23 15:21:08 fukachan Exp $
#
package FML::Process::Utils;
@@ -201,8 +201,17 @@ sub article_message
=head1 misc METHODS
+=head2 mkdir($dir, $mode)
+
+create directory $dir if needed.
+
=cut
+#
+# XXX-TODO: $curproc->mkdir() is strage.
+# XXX-TODO: hmm, we create a new subcleass such as $curproc->util->mkdir() ?
+# XXX-TODO: or $utils = $curproc->utils(); $utils->mkdir(dir, mode); ?
+#
# Descriptions: create directory $dir if needed
# Arguments: OBJ($curproc) STR($dir) STR($mode)