diff options
| author | fukachan <fukachan> | 2004-01-01 23:52:07 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-01-01 23:52:07 +0000 |
| commit | 39df5269fb3408ca775b72142a2dbc3a7b7dc87c (patch) | |
| tree | 871a3a78940a3653d40cf3cefbc7dc83c656aa15 /fml/lib/FML/Process | |
| parent | d48df2ad0fcce549bdbdc0891e14ea9c57d9d667 (diff) | |
| download | fml8-39df5269fb3408ca775b72142a2dbc3a7b7dc87c.tar.gz fml8-39df5269fb3408ca775b72142a2dbc3a7b7dc87c.tar.bz2 fml8-39df5269fb3408ca775b72142a2dbc3a7b7dc87c.zip | |
remove $args.
It is a top level parameter FML::Process::Switch provides. Almost
functions should access the content via utility methods provided by
FML::Process::Utils.
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/CGI/Kernel.pm | 96 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Command.pm | 56 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Distribute.pm | 64 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Error.pm | 10 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Fake.pm | 14 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 76 | ||||
| -rw-r--r-- | fml/lib/FML/Process/QMail.pm | 8 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Utils.pm | 10 |
8 files changed, 166 insertions, 168 deletions
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm index f5376989..e8abfe1b 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.69 2004/01/01 08:40:21 fukachan Exp $ +# $FML: Kernel.pm,v 1.70 2004/01/01 08:48:40 fukachan Exp $ # package FML::Process::CGI::Kernel; @@ -263,9 +263,9 @@ star_html(), run_cgi() and end_html(). C<run()> executes - $curproc->start_html($args); - $curproc->run_cgi($args); - $curproc->end_html($args); + $curproc->html_start(); + $curproc->_drive_cgi_by_table(); + $curproc->html_end(); C<run_cgi()> prepares tables by the following granularity. @@ -291,9 +291,9 @@ sub run { my ($curproc, $args) = @_; - $curproc->html_start($args); - $curproc->_drive_cgi_by_table($args); - $curproc->html_end($args); + $curproc->html_start(); + $curproc->_drive_cgi_by_table(); + $curproc->html_end(); } @@ -329,12 +329,12 @@ sub _error_string # Descriptions: show menu table -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub _drive_cgi_by_table { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $r = ''; # XXX-TODO: hmm, customisable by /etc/fml/cgi.conf ? @@ -372,7 +372,7 @@ sub _drive_cgi_by_table }; # firstly, execute command if needed. - $curproc->run_cgi_main($args); + $curproc->run_cgi_main(); print "<table border=0 cellspacing=\"0\" cellpadding=\"5\">\n"; print "\n<!-- new line -->\n"; @@ -395,7 +395,7 @@ sub _drive_cgi_by_table my $fp = $function_table->{ $pos }; if ($fp) { - eval q{ $curproc->$fp($args);}; + eval q{ $curproc->$fp();}; if ($r = $@) { _error_string($curproc, $r);} } print "\n</td>\n"; @@ -405,7 +405,7 @@ sub _drive_cgi_by_table } -=head2 cgi_execute_command($args, $command_args) +=head2 cgi_execute_command($command_args) execute specified command given as FML::Command::* @@ -413,12 +413,12 @@ execute specified command given as FML::Command::* # Descriptions: execute FML::Command -# Arguments: OBJ($curproc) HASH_REF($args) HASH_REF($command_args) +# Arguments: OBJ($curproc) HASH_REF($command_args) # Side Effects: load module # Return Value: none sub cgi_execute_command { - my ($curproc, $args, $command_args) = @_; + my ($curproc, $command_args) = @_; my $commode = $command_args->{ command_mode }; my $comname = $command_args->{ comname }; my $config = $curproc->config(); @@ -465,7 +465,7 @@ sub cgi_execute_command } -=head2 run_cgi_title($args) +=head2 run_cgi_title() show title. @@ -473,12 +473,12 @@ show title. # Descriptions: show title -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub run_cgi_title { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $myname = $curproc->cgi_var_myname(); my $ml_domain = $curproc->cgi_var_ml_domain(); my $ml_name = $curproc->cgi_var_ml_name(); @@ -497,7 +497,7 @@ sub run_cgi_title } -=head2 run_cgi_help($args) +=head2 run_cgi_help() help. @@ -505,12 +505,12 @@ help. # Descriptions: show help -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub run_cgi_help { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $ml_name = $curproc->cgi_var_ml_name(); my $ml_domain = $curproc->cgi_var_ml_domain(); my $mode = $curproc->cgi_var_cgi_mode(); @@ -539,7 +539,7 @@ sub run_cgi_help } -=head2 run_cgi_command_help($args) +=head2 run_cgi_command_help() command_help. @@ -547,12 +547,12 @@ command_help. # Descriptions: show command_dependent help -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub run_cgi_command_help { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $buf = ''; my $navi_command = $curproc->safe_param_navi_command(); my $command = $curproc->safe_param_command(); @@ -575,12 +575,12 @@ sub run_cgi_command_help # Descriptions: prepare arguemnts for message handling. -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: HASH_REF sub _gen_msg_args { - my ($curproc, $args) = @_; + my ($curproc) = @_; # natural language-ed name my $name_submit = $curproc->message_nl('term.submit', 'submit'); @@ -596,7 +596,7 @@ sub _gen_msg_args } -=head2 run_cgi_log($args) +=head2 run_cgi_log() log. @@ -604,18 +604,18 @@ log. # Descriptions: show log -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub run_cgi_log { - my ($curproc, $args) = @_; + my ($curproc) = @_; # XXX-TODO: NOT IMPLEMENTED. } -=head2 run_cgi_dummy($args) +=head2 run_cgi_dummy() dummy. @@ -623,18 +623,18 @@ dummy. # Descriptions: show dummy -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub run_cgi_dummy { - my ($curproc, $args) = @_; + my ($curproc) = @_; # XXX-TODO: NOT IMPLEMENTED. } -=head2 run_cgi_date($args) +=head2 run_cgi_date() date. @@ -642,19 +642,19 @@ date. # Descriptions: show date -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub run_cgi_date { - my ($curproc, $args) = @_; + my ($curproc) = @_; # XXX-TODO: NOT IMPLEMENTED. NOT USE `date`; print `date`; } -=head2 run_cgi_options($args) +=head2 run_cgi_options() show options. @@ -662,17 +662,17 @@ show options. # Descriptions: show options -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub run_cgi_options { - my ($curproc, $args) = @_; - my $domain = $curproc->cgi_var_ml_domain(); - my $action = $curproc->safe_cgi_action_name(); - my $lang = $curproc->cgi_var_language(); - my $config = $curproc->config(); - my $langlist = $config->get_as_array_ref('cgi_language_list'); + my ($curproc) = @_; + my $domain = $curproc->cgi_var_ml_domain(); + my $action = $curproc->safe_cgi_action_name(); + my $lang = $curproc->cgi_var_language(); + my $config = $curproc->config(); + my $langlist = $config->get_as_array_ref('cgi_language_list'); if ($#$langlist > 0) { # natural language-ed name @@ -699,7 +699,7 @@ sub run_cgi_options } -=head2 run_cgi_menu($args, $comname, $command_args) +=head2 run_cgi_menu() execute cgi_menu() given as FML::Command::* @@ -707,12 +707,12 @@ execute cgi_menu() given as FML::Command::* # Descriptions: execute FML::Command -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: load module # Return Value: none sub run_cgi_menu { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $pcb = $curproc->pcb(); my $command_args = $pcb->get('cgi', 'command_args'); @@ -727,17 +727,17 @@ sub run_cgi_menu }; if (defined $obj) { - $obj->cgi_menu($curproc, $args, $command_args); + $obj->cgi_menu($curproc, $command_args); } } else { my $ml_name = $curproc->safe_param_ml_name(); if ($ml_name) { - $curproc->run_cgi_help($args); + $curproc->run_cgi_help(); } else { - $curproc->run_cgi_help($args); + $curproc->run_cgi_help(); } } } diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm index 84da87e5..71ffa3b6 100644 --- a/fml/lib/FML/Process/Command.pm +++ b/fml/lib/FML/Process/Command.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Command.pm,v 1.91 2003/11/29 10:24:27 fukachan Exp $ +# $FML: Command.pm,v 1.92 2003/11/30 09:59:19 fukachan Exp $ # package FML::Process::Command; @@ -121,7 +121,7 @@ sub verify_request $curproc->verify_sender_credential(); unless ($curproc->is_refused()) { - $curproc->_check_filter($args); + $curproc->_check_filter(); } $eval = $config->get_hook( 'command_verify_request_end_hook' ); @@ -130,18 +130,18 @@ sub verify_request # Descriptions: filter -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: set flag to ignore this process if it should be filtered. # Return Value: none sub _check_filter { - my ($curproc, $args) = @_; - my $config = $curproc->config(); + my ($curproc) = @_; + my $config = $curproc->config(); eval q{ use FML::Filter; my $filter = new FML::Filter; - my $r = $filter->command_mail_filter($curproc, $args); + my $r = $filter->command_mail_filter($curproc); # filter traps this message. if ($r = $filter->error()) { @@ -195,7 +195,7 @@ sub run unless ($curproc->is_refused()) { # permit_xxx() sets the error reason at "check_restriction" in pcb. - if ($curproc->permit_command($args)) { + if ($curproc->permit_command()) { $curproc->_evaluate_command_lines($args); } # XXX reject command use irrespective of requests from admins/users. @@ -311,12 +311,12 @@ sub _check_context # Descriptions: check command (specified in $opts) is valid and permitted # in the configuration. -# Arguments: OBJ($curproc) HASH_REF($args) STR($level) HASH_REF($opts) +# Arguments: OBJ($curproc) STR($level) HASH_REF($opts) # Side Effects: none # Return Value: NUM(1 or 0) sub _config_permit_command { - my ($curproc, $args, $level, $opts) = @_; + my ($curproc, $level, $opts) = @_; my $config = $curproc->config(); my $cred = $curproc->{ credential }; # user credential my $prompt = $config->{ command_mail_reply_prompt } || '>>>'; @@ -348,13 +348,12 @@ sub _config_permit_command # Descriptions: validate command syntax by FML::Restriction. -# Arguments: OBJ($curproc) -# HASH_REF($args) HASH_REF($status) HASH_REF($cominfo) +# Arguments: OBJ($curproc) HASH_REF($status) HASH_REF($cominfo) # Side Effects: none # Return Value: NUM(1 or 0) sub _is_safe_syntax { - my ($curproc, $args, $status, $cominfo) = @_; + my ($curproc, $status, $cominfo) = @_; my $config = $curproc->config(); my $prompt = $config->{ command_mail_reply_prompt } || '>>>'; my $level = $status->{ level }; @@ -435,12 +434,12 @@ sub _get_command_name # Descriptions: authenticate the currrent process sender as an admin -# Arguments: OBJ($curproc) HASH_REF($args) HASH_REF($optargs) +# Arguments: OBJ($curproc) HASH_REF($optargs) # Side Effects: none # Return Value: NUM(1 or 0) sub _try_admin_auth { - my ($curproc, $args, $optargs) = @_; + my ($curproc, $optargs) = @_; my $is_auth = 0; my $obj = undef; @@ -452,7 +451,7 @@ sub _try_admin_auth my $config = $curproc->config(); my $rules = $config->get_as_array_ref('admin_command_restrictions'); for my $rule (@$rules) { - $is_auth = $obj->$rule($curproc, $args, $optargs); + $is_auth = $obj->$rule($curproc, $optargs); # reject as soon as possible if ($is_auth eq '__LAST__') { @@ -481,13 +480,12 @@ sub _try_admin_auth # Descriptions: determine $mode and $level for the current command (line). # We apply this function for each line in command request. # $mode and $level change line by line. -# Arguments: OBJ($curproc) -# HASH_REF($args) HASH_REF($status) HAS_REF($command_info) +# Arguments: OBJ($curproc) HASH_REF($status) HAS_REF($command_info) # Side Effects: update $status, $command_info # Return Value: STR sub _get_command_mode { - my ($curproc, $args, $status, $command_info) = @_; + my ($curproc, $status, $command_info) = @_; my $config = $curproc->config(); my $command = $command_info->{ command }; my $comname = $command_info->{ comname }; @@ -526,7 +524,7 @@ sub _get_command_mode # since $commands_for_stranger contains "confirm" command :-) # It is effective but wrong since we set $level = stranger # though we should set up $level = user. - if ($curproc->_config_permit_command($args, "stranger", $opts)) { + if ($curproc->_config_permit_command("stranger", $opts)) { $status->{ mode } = 'user'; $status->{ level } = 'stranger'; } @@ -552,7 +550,7 @@ sub _get_command_mode my $optargs = { address => $sender, password => $data }; # XXX simple state machine: update $status->{ is_auth } - $is_auth = $curproc->_try_admin_auth($args, $optargs); + $is_auth = $curproc->_try_admin_auth($optargs); $status->{ is_auth } = $is_auth; $curproc->log("admin: o.k. auth-ed as an ML admin") if $is_auth; } @@ -564,7 +562,7 @@ sub _get_command_mode my $opts = { comname => $comname, command => $command }; my $xmode = 'privileged_user'; - if ($curproc->_config_permit_command($args, $xmode, $opts)) { + if ($curproc->_config_permit_command($xmode, $opts)) { $status->{ mode } = 'admin'; $status->{ level } = 'admin'; $command_info->{ command } = $command; @@ -608,7 +606,7 @@ sub _get_command_mode else { if ($is_member) { my $opts = { comname => $comname, command => $command }; - if ($curproc->_config_permit_command($args, "user", $opts)) { + if ($curproc->_config_permit_command("user", $opts)) { $status->{ mode } = 'user'; $status->{ level } = 'user'; } @@ -620,7 +618,7 @@ sub _get_command_mode } else { my $opts = { comname => $comname, command => $command }; - if ($curproc->_config_permit_command($args, "stranger", $opts)) { + if ($curproc->_config_permit_command("stranger", $opts)) { $status->{ mode } = 'user'; $status->{ level } = 'stranger'; } @@ -730,13 +728,13 @@ sub __clean_up # Descriptions: set up error message to inform emergency stop -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # HASH_REF($status) HASH_REF($cominfo) STR($orig_command) # Side Effects: update reply messages # Return Value: none sub __stop_here { - my ($curproc, $args, $status, $cominfo, $orig_command) = @_; + my ($curproc, $status, $cominfo, $orig_command) = @_; my $config = $curproc->config(); my $prompt = $config->{ command_mail_reply_prompt } || '>>>'; my $key = $status->{ _stop_reason_key }; @@ -817,7 +815,7 @@ sub _evaluate_command_lines # Example: if orig_command = "# help", comname = "help" $fixed_command = __clean_up($orig_command); $cominfo = $curproc->_parse_command_args($args, $fixed_command); - $mode = $curproc->_get_command_mode($args, $status, $cominfo); + $mode = $curproc->_get_command_mode($status, $cominfo); # 1. check $mode if the further processing is allowed if ($mode eq '__NEXT__') { @@ -826,7 +824,7 @@ sub _evaluate_command_lines } elsif ($mode eq '__LAST__') { $curproc->logerror("command processing stop."); - $curproc->__stop_here($args, $status, $cominfo, $orig_command); + $curproc->__stop_here($status, $cominfo, $orig_command); last COMMAND; } @@ -839,7 +837,7 @@ sub _evaluate_command_lines # 1.3 valid mode unless ($mode eq 'user' || $mode eq 'admin') { $curproc->logerror("command processing stop."); - $curproc->__stop_here($args, $status, $cominfo, $orig_command); + $curproc->__stop_here($status, $cominfo, $orig_command); last COMMAND; } @@ -853,7 +851,7 @@ sub _evaluate_command_lines } # 3. simple syntax check - unless ($curproc->_is_safe_syntax($args, $status, $cominfo)) { + unless ($curproc->_is_safe_syntax($status, $cominfo)) { $curproc->logerror("invalid/unsafe syntax"); $curproc->log("(debug) ignore $fixed_command"); $num_ignored++; diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm index 9e6980f2..7b8cd539 100644 --- a/fml/lib/FML/Process/Distribute.pm +++ b/fml/lib/FML/Process/Distribute.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Distribute.pm,v 1.131 2003/12/24 14:29:36 fukachan Exp $ +# $FML: Distribute.pm,v 1.132 2003/12/25 10:52:23 tmu Exp $ # package FML::Process::Distribute; @@ -128,7 +128,7 @@ sub verify_request } unless ($curproc->is_refused()) { - $curproc->_check_filter($args); + $curproc->_check_filter(); } $eval = $config->get_hook( 'distribute_verify_request_end_hook' ); @@ -137,18 +137,18 @@ sub verify_request # Descriptions: filter -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: set flag to ignore this process if it should be filtered. # Return Value: none sub _check_filter { - my ($curproc, $args) = @_; - my $config = $curproc->config(); + my ($curproc) = @_; + my $config = $curproc->config(); eval q{ use FML::Filter; my $filter = new FML::Filter; - my $r = $filter->article_filter($curproc, $args); + my $r = $filter->article_filter($curproc); # filter traps this message. if ($r = $filter->error()) { @@ -212,7 +212,7 @@ sub run # $curproc->lock(); unless ($curproc->is_refused()) { - if ($curproc->permit_post($args)) { + if ($curproc->permit_post()) { $curproc->_distribute($args); } else { @@ -356,7 +356,7 @@ sub _distribute # XXX $article != $curproc->{ article } (which is just a key) # XXX $curproc->{ article } is prepared as a side effect for the future. - my $article = $curproc->_build_article_object($args); + my $article = $curproc->_build_article_object(); # get sequence number my $id = $article->increment_id; @@ -369,8 +369,8 @@ sub _distribute # thread system checks the message before header rewritings. if ($config->yes('use_thread_track')) { - # $curproc->_old_thread_check($args); - $curproc->_new_thread_check($args); + # $curproc->_old_thread_check(); + $curproc->_new_thread_check(); } # header operations @@ -387,29 +387,29 @@ sub _distribute # update header info to sync w/ article header. if ($config->yes('use_thread_track')) { - $curproc->_new_thread_check_post($args); + $curproc->_new_thread_check_post(); } $curproc->unlock($lock_channel); # delivery starts ! - $curproc->_deliver_article($args); + $curproc->_deliver_article(); if ($config->yes('use_html_archive')) { $curproc->log("htmlify article $id"); - $curproc->_htmlify($args); + $curproc->_htmlify(); $curproc->log("htmlify article $id end"); } } # Descriptions: build and return FML::Article object -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: OBJ(FML::Article) sub _build_article_object { - my ($curproc, $args) = @_; + my ($curproc) = @_; # create aritcle to distribute use FML::Article; @@ -422,16 +422,16 @@ sub _build_article_object # Descriptions: header rewrite followed by # $config->{ article_header_rewrite_rules } # each method exists in FML::Header module. -# Arguments: OBJ($curproc) HASH_REF($hw_args) +# Arguments: OBJ($curproc) HASH_REF($hrw_args) # Side Effects: $curproc->{ article }->{ header } is rewritten # Return Value: none sub _header_rewrite { - my ($curproc, $hw_args) = @_; + my ($curproc, $hrw_args) = @_; my $config = $curproc->config(); my $header = $curproc->article_message_header(); my $rules = $config->get_as_array_ref('article_header_rewrite_rules'); - my $id = $hw_args->{ id }; + my $id = $hrw_args->{ id }; for my $rule (@$rules) { $curproc->log("_header_rewrite( $rule )") if $config->yes('debug'); @@ -450,12 +450,12 @@ sub _header_rewrite # Descriptions: deliver the article -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: mail delivery, logging # Return Value: none sub _deliver_article { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $cred = $curproc->{ credential }; my $config = $curproc->config(); # FML::Config object my $message = $curproc->article_message(); # Mail::Message object @@ -521,12 +521,12 @@ sub _deliver_article # Descriptions: the top level interface to drive thread tracking system -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: update thread information # Return Value: none sub _old_thread_check { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $config = $curproc->config(); my $pcb = $curproc->pcb(); my $myname = $curproc->myname(); @@ -560,12 +560,12 @@ sub _old_thread_check # Descriptions: the top level interface to drive thread tracking system -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: update thread information # Return Value: none sub _new_thread_check { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $pcb = $curproc->pcb(); my $msg = $curproc->article_message(); @@ -574,7 +574,7 @@ sub _new_thread_check # XXX we need to specify article_id here since # XXX analyzer routine has no clue for the current primary key. my $article_id = $pcb->get('article', 'id'); - my $tdb_args = $curproc->thread_db_args($args); + my $tdb_args = $curproc->thread_db_args(); $tdb_args->{ id } = $article_id; # analyze the current message to update DB (UDB). @@ -587,12 +587,12 @@ sub _new_thread_check # Descriptions: the top level interface to drive thread tracking system -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: update thread information # Return Value: none sub _new_thread_check_post { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $pcb = $curproc->pcb(); my $hdr = $curproc->article_message_header(); @@ -601,7 +601,7 @@ sub _new_thread_check_post # XXX we need to specify article_id here since # XXX analyzer routine has no clue for the current primary key. my $article_id = $pcb->get('article', 'id'); - my $tdb_args = $curproc->thread_db_args($args); + my $tdb_args = $curproc->thread_db_args(); $tdb_args->{ id } = $article_id; # overwrite header info base on the article. @@ -615,12 +615,12 @@ sub _new_thread_check_post # Descriptions: the top level entry to create HTML article -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: update html database # Return Value: none sub _htmlify { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $config = $curproc->config(); my $pcb = $curproc->pcb(); my $myname = $curproc->myname(); @@ -628,11 +628,11 @@ sub _htmlify my $spool_dir = $config->{ spool_dir }; my $html_dir = $config->{ html_archive_dir }; my $udb_dir = $config->{ udb_base_dir }; - my $article = $curproc->_build_article_object($args); + my $article = $curproc->_build_article_object(); my $article_id = $pcb->get('article', 'id'); my $article_file = $article->filepath($article_id); my $index_order = $config->{ html_archive_index_order_type }; - my $_tdb_args = $curproc->thread_db_args($args); + my $_tdb_args = $curproc->thread_db_args(); $curproc->set_umask_as_public(); diff --git a/fml/lib/FML/Process/Error.pm b/fml/lib/FML/Process/Error.pm index c65e7b24..e7815b61 100644 --- a/fml/lib/FML/Process/Error.pm +++ b/fml/lib/FML/Process/Error.pm @@ -3,7 +3,7 @@ # Copyright (C) 2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Error.pm,v 1.34 2003/08/29 15:34:08 fukachan Exp $ +# $FML: Error.pm,v 1.35 2003/11/29 10:24:29 fukachan Exp $ # package FML::Process::Error; @@ -191,7 +191,7 @@ sub run if ($found) { $pcb->set("error", "found", 1); - $curproc->_clean_up_bouncers($args); + $curproc->_clean_up_bouncers(); } } @@ -202,13 +202,13 @@ sub run # Descriptions: run analyzer() if long time spent after the last # analyze. -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: remove addresses which causes bounces # Return Value: none sub _clean_up_bouncers { - my ($curproc, $args) = @_; - my $channel = 'erroranalyzer'; + my ($curproc) = @_; + my $channel = 'erroranalyzer'; if ($curproc->is_event_timeout($channel)) { $curproc->log("(debug) event timeout"); diff --git a/fml/lib/FML/Process/Fake.pm b/fml/lib/FML/Process/Fake.pm index fdec1e75..bb43cc42 100644 --- a/fml/lib/FML/Process/Fake.pm +++ b/fml/lib/FML/Process/Fake.pm @@ -3,7 +3,7 @@ # Copyright (C) 2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Fake.pm,v 1.1 2003/12/24 12:49:09 fukachan Exp $ +# $FML: Fake.pm,v 1.2 2003/12/30 03:57:05 fukachan Exp $ # package FML::Process::Fake; @@ -78,7 +78,7 @@ sub prepare if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; } $curproc->_faker_init($args); - $curproc->_faker_prepare($args); + $curproc->_faker_prepare(); $eval = $config->get_hook( 'faker_prepare_end_hook' ); if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; } @@ -223,12 +223,12 @@ sub _faker_init # Descriptions: parser of incoming message header. -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub _faker_prepare { - my ($curproc, $args) = @_; + my ($curproc) = @_; # 1. parse message $curproc->parse_incoming_message(); @@ -303,11 +303,11 @@ sub _faker_main # $curproc->_ml_create($ml_name, $ml_domain); } - $curproc->_process_switch($args, $ml_name, $ml_domain); + $curproc->_faker_process_switch($args, $ml_name, $ml_domain); if ($curproc->is_valid_ml($ml_name, $ml_domain)) { $curproc->log("ml found: $ml_name"); - $curproc->_process_switch($args, $ml_name, $ml_domain); + $curproc->_faker_process_switch($args, $ml_name, $ml_domain); } else { $curproc->logerror("fail to create ml: $ml_name"); @@ -361,7 +361,7 @@ sub _faker_analyze_address # Arguments: OBJ($curproc) HASH_REF($args) STR($ml_name) STR($ml_domain) # Side Effects: none # Return Value: none -sub _process_switch +sub _faker_process_switch { my ($curproc, $args, $ml_name, $ml_domain) = @_; my $ml_addr = sprintf("%s@%s", $ml_name, $ml_domain); diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index 22347379..5bf560d3 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/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.199 2003/12/29 14:57:04 fukachan Exp $ +# $FML: Kernel.pm,v 1.200 2003/12/30 03:53:53 fukachan Exp $ # package FML::Process::Kernel; @@ -180,12 +180,12 @@ sub new # Descriptions: set up default signal handling -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub _signal_init { - my ($curproc, $args) = @_; + my ($curproc) = @_; $SIG{'ALRM'} = $SIG{'INT'} = $SIG{'QUIT'} = $SIG{'TERM'} = sub { my ($signal) = @_; @@ -197,23 +197,23 @@ sub _signal_init # Descriptions: set up default printing style handling -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub _print_init { - my ($curproc, $args) = @_; + my ($curproc) = @_; $curproc->set_print_style( 'text' ); } # Descriptions: activate scheduler -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub scheduler_init { - my ($curproc, $args) = @_; + my ($curproc) = @_; use FML::Process::Scheduler; my $scheduler = new FML::Process::Scheduler $curproc; @@ -502,13 +502,13 @@ a side effect. # Descriptions: validate the sender address and do a few things # as a side effect -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: set the return value of $curproc->sender(). # stop the current process if needed. # Return Value: none sub verify_sender_credential { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $msg = $curproc->{'incoming_message'}; my $from = $msg->{'header'}->get('from'); @@ -1019,35 +1019,35 @@ The restriction rules follows the order of C<command_restrictions>. # Descriptions: permit this post process -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: set the error reason at "check_restriction" in pcb. # Return Value: NUM(1 or 0) sub permit_post { - my ($curproc, $args) = @_; - $curproc->_check_restrictions($args, 'post'); + my ($curproc) = @_; + $curproc->_check_restrictions('post'); } # Descriptions: permit this command process -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: set the error reason at "check_restriction" in pcb. # Return Value: NUM(1 or 0) sub permit_command { - my ($curproc, $args) = @_; - $curproc->_check_restrictions($args, 'command'); + my ($curproc) = @_; + $curproc->_check_restrictions('command'); } # Descriptions: permit this $type process based on the rules defined # in ${type}_restrictions. -# Arguments: OBJ($curproc) HASH_REF($args) STR($type) +# Arguments: OBJ($curproc) STR($type) # Side Effects: set the error reason at "check_restriction" n pcb. # Return Value: NUM(1 or 0) sub _check_restrictions { - my ($curproc, $args, $type) = @_; + my ($curproc, $type) = @_; my $config = $curproc->config(); my $cred = $curproc->{ credential }; # user credential my $pcb = $curproc->pcb(); @@ -1513,13 +1513,13 @@ sub _array_is_different # Descriptions: add the specified $msg into on memory queue -# Arguments: OBJ($curproc) OBJ($msg) HASH_REF($args) +# Arguments: OBJ($curproc) OBJ($msg) HASH_REF($rm_args) # ARRAY_REF($recipient) ARRAY_REF($recipient_maps) OBJ($hdr) # Side Effects: update on momory queue which is on PCB area. # Return Value: none sub _append_message_into_queue { - my ($curproc, $msg, $args, $recipient, $recipient_maps, $hdr) = @_; + my ($curproc, $msg, $rm_args, $recipient, $recipient_maps, $hdr) = @_; my $pcb = $curproc->pcb(); my $category = 'reply_message'; my $class = 'queue'; @@ -1538,13 +1538,13 @@ sub _append_message_into_queue # Descriptions: add the specified $msg into on memory queue -# Arguments: OBJ($curproc) OBJ($msg) HASH_REF($args) +# Arguments: OBJ($curproc) OBJ($msg) HASH_REF($rm_args) # ARRAY_REF($recipient) ARRAY_REF($recipient_maps) OBJ($hdr) # Side Effects: update on momory queue which is on PCB area. # Return Value: none sub _append_message_into_queue2 { - my ($curproc, $msg, $args, $recipient, $recipient_maps, $hdr) = @_; + my ($curproc, $msg, $rm_args, $recipient, $recipient_maps, $hdr) = @_; my $pcb = $curproc->pcb(); my $category = 'reply_message'; my $class = 'queue'; @@ -1576,12 +1576,12 @@ sub _append_message_into_queue2 # Descriptions: built and return recipient type and list in # on memory queue. -# Arguments: OBJ($curproc) OBJ($msg) HASH_REF($args) +# Arguments: OBJ($curproc) OBJ($msg) # Side Effects: none # Return Value: ARRAY( HASH_REF, HASH_REF ) sub _reply_message_recipient_keys { - my ($curproc, $msg, $args) = @_; + my ($curproc, $msg) = @_; my $pcb = $curproc->pcb(); my $category = 'reply_message'; my $class = 'queue'; @@ -1664,32 +1664,32 @@ This $args is passed through to reply_message(). # Descriptions: set reply message with translation to natual language -# Arguments: OBJ($curproc) STR($class) STR($default_msg) HASH_REF($args) +# Arguments: OBJ($curproc) STR($class) STR($default_msg) HASH_REF($rm_args) # Side Effects: none # Return Value: none sub reply_message_nl { - my ($curproc, $class, $default_msg, $args) = @_; + my ($curproc, $class, $default_msg, $rm_args) = @_; my $config = $curproc->config(); - my $buf = $curproc->message_nl($class, $default_msg, $args); + my $buf = $curproc->message_nl($class, $default_msg, $rm_args); $curproc->caller_info($class, caller) if $debug; if (defined $buf) { if ($buf =~ /\$/) { - $config->expand_variable_in_buffer(\$buf, $args); + $config->expand_variable_in_buffer(\$buf, $rm_args); } # XXX-TODO: jis-jp is hard-coded. eval q{ use Mail::Message::Encode; my $obj = new Mail::Message::Encode; - $curproc->reply_message( $obj->convert( $buf, 'jis-jp' ), $args); + $curproc->reply_message( $obj->convert( $buf, 'jis-jp' ), $rm_args); }; $curproc->logerror($@) if $@; } else { - $curproc->reply_message($default_msg, $args); + $curproc->reply_message($default_msg, $rm_args); } } @@ -1711,12 +1711,12 @@ sub reply_message_add_header_info # Descriptions: get template message in natual language -# Arguments: OBJ($curproc) STR($class) STR($default_msg) HASH_REF($args) +# Arguments: OBJ($curproc) STR($class) STR($default_msg) HASH_REF($m_args) # Side Effects: none # Return Value: STR sub message_nl { - my ($curproc, $class, $default_msg, $args) = @_; + my ($curproc, $class, $default_msg, $m_args) = @_; my $config = $curproc->config(); my $dir = $config->{ message_template_dir }; my $local_dir = $config->{ ml_local_message_template_dir }; @@ -1749,7 +1749,7 @@ sub message_nl if (defined $buf) { my $config = $curproc->config(); if ($buf =~ /\$/o) { - $config->expand_variable_in_buffer(\$buf, $args); + $config->expand_variable_in_buffer(\$buf, $m_args); } } @@ -1792,12 +1792,12 @@ Prepare the message and queue it in by C<Mail::Delivery::Queue>. # $r = get(message, queue) # msg = header + "text" + $r->[0] + $r->[1] + ... # -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: none sub inform_reply_messages { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $pcb = $curproc->pcb(); # We should classify reply messages by @@ -2208,13 +2208,13 @@ sub _add_info_on_header $msg->attr('X-ML-Name' => $ml_name); use FML::Header; - my $args = { + my $hrw_args = { type => 'MIME::Lite', message => $msg, }; - FML::Header->add_message_id($config, $args); - FML::Header->add_software_info($config, $args); - FML::Header->add_rfc2369($config, $args); + FML::Header->add_message_id($config, $hrw_args); + FML::Header->add_software_info($config, $hrw_args); + FML::Header->add_rfc2369($config, $hrw_args); } diff --git a/fml/lib/FML/Process/QMail.pm b/fml/lib/FML/Process/QMail.pm index 385738b7..7359521f 100644 --- a/fml/lib/FML/Process/QMail.pm +++ b/fml/lib/FML/Process/QMail.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: QMail.pm,v 1.17 2003/08/23 15:33:14 fukachan Exp $ +# $FML: QMail.pm,v 1.18 2003/08/29 15:34:09 fukachan Exp $ # package FML::Process::QMail; @@ -61,13 +61,13 @@ C<NOT YET IMPLERMENTED>. # Descriptions: qmail style command extention # elena-subscribe@domain implies # "mail message body with subscribe to elena-ctl@domain" -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: STR sub DotQmailExt { - my ($curproc, $args) = @_; - my $config = $curproc->config(); + my ($curproc) = @_; + my $config = $curproc->config(); # get ? my $ext = $ENV{'EXT'}; diff --git a/fml/lib/FML/Process/Utils.pm b/fml/lib/FML/Process/Utils.pm index 23f14731..994a9673 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.98 2003/12/29 14:49:09 fukachan Exp $ +# $FML: Utils.pm,v 1.99 2003/12/30 03:46:35 fukachan Exp $ # package FML::Process::Utils; @@ -1199,7 +1199,7 @@ sub is_under_mta_process } -=head2 get_ml_list() +=head2 get_ml_list($ml_domain) get ARRAY_REF of valid mailing lists. @@ -1550,7 +1550,7 @@ sub get_accept_language_list } -=head2 thread_db_args($args) +=head2 thread_db_args() prepare and return information (HASH_REF) needed to manipulate thread database. @@ -1559,12 +1559,12 @@ database. # Descriptions: return information (HASH_REF) needed for thread database. -# Arguments: OBJ($curproc) HASH_REF($args) +# Arguments: OBJ($curproc) # Side Effects: none # Return Value: HASH_REF sub thread_db_args { - my ($curproc, $args) = @_; + my ($curproc) = @_; my $config = $curproc->config(); my $ml_name = $config->{ ml_name }; my $html_dir = $config->{ html_archive_dir }; |
