summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-08-29 15:33:54 +0000
committerfukachan <fukachan>2003-08-29 15:33:54 +0000
commite460ae393d4c06ac2219811653b1388acf28bebb (patch)
tree5c04b53bb40f2e2e749db3be89dd9db9920830bb /fml/lib/FML/Process
parent69b67704253d230af64d85a6b8b91ed4b9bac14d (diff)
downloadfml8-e460ae393d4c06ac2219811653b1388acf28bebb.tar.gz
fml8-e460ae393d4c06ac2219811653b1388acf28bebb.tar.bz2
fml8-e460ae393d4c06ac2219811653b1388acf28bebb.zip
use $curproc->config(), pcb() not { config }, { pcb } respectively.
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Addr.pm12
-rw-r--r--fml/lib/FML/Process/Alias.pm12
-rw-r--r--fml/lib/FML/Process/CGI/Kernel.pm6
-rw-r--r--fml/lib/FML/Process/Calendar.pm4
-rw-r--r--fml/lib/FML/Process/Command.pm26
-rw-r--r--fml/lib/FML/Process/ConfViewer.pm12
-rw-r--r--fml/lib/FML/Process/Configure.pm12
-rw-r--r--fml/lib/FML/Process/Digest.pm10
-rw-r--r--fml/lib/FML/Process/Distribute.pm20
-rw-r--r--fml/lib/FML/Process/DocViewer.pm12
-rw-r--r--fml/lib/FML/Process/Error.pm14
-rw-r--r--fml/lib/FML/Process/HTMLify.pm10
-rw-r--r--fml/lib/FML/Process/Kernel.pm58
-rw-r--r--fml/lib/FML/Process/QMail.pm4
-rw-r--r--fml/lib/FML/Process/Utils.pm22
15 files changed, 117 insertions, 117 deletions
diff --git a/fml/lib/FML/Process/Addr.pm b/fml/lib/FML/Process/Addr.pm
index 9de628a6..e39c89b3 100644
--- a/fml/lib/FML/Process/Addr.pm
+++ b/fml/lib/FML/Process/Addr.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Addr.pm,v 1.9 2003/08/23 04:43:40 fukachan Exp $
+# $FML: Addr.pm,v 1.10 2003/08/23 07:24:45 fukachan Exp $
#
package FML::Process::Addr;
@@ -75,7 +75,7 @@ sub new
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmladdr_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -99,7 +99,7 @@ sub verify_request
my ($curproc, $args) = @_;
my $argv = $curproc->command_line_argv();
my $len = $#$argv + 1;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmladdr_verify_request_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -135,7 +135,7 @@ See <FML::Process::Switch()> on C<$args> for more details.
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $myname = $curproc->myname();
my $argv = $curproc->command_line_argv();
@@ -150,7 +150,7 @@ sub run
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmladdr_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -211,7 +211,7 @@ See <FML::Process::Switch()> on C<$args> for more details.
sub _fmladdr
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmladdr_run_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
diff --git a/fml/lib/FML/Process/Alias.pm b/fml/lib/FML/Process/Alias.pm
index 5d242036..b2352253 100644
--- a/fml/lib/FML/Process/Alias.pm
+++ b/fml/lib/FML/Process/Alias.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Alias.pm,v 1.10 2003/08/23 04:43:41 fukachan Exp $
+# $FML: Alias.pm,v 1.11 2003/08/23 07:24:46 fukachan Exp $
#
package FML::Process::Alias;
@@ -71,7 +71,7 @@ sub new
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlalias_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -95,7 +95,7 @@ sub verify_request
my ($curproc, $args) = @_;
my $argv = $curproc->command_line_argv();
my $len = $#$argv + 1;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlalias_verify_request_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -129,7 +129,7 @@ See <FML::Process::Switch()> on C<$args> for more details.
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $myname = $curproc->myname();
my $argv = $curproc->command_line_argv();
@@ -144,7 +144,7 @@ sub run
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlalias_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -209,7 +209,7 @@ See <FML::Process::Switch()> on C<$args> for more details.
sub _fmlalias
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlalias_run_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
diff --git a/fml/lib/FML/Process/CGI/Kernel.pm b/fml/lib/FML/Process/CGI/Kernel.pm
index ee87a033..f99b71e4 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.50 2003/08/23 04:35:41 fukachan Exp $
+# $FML: Kernel.pm,v 1.51 2003/08/23 07:24:49 fukachan Exp $
#
package FML::Process::CGI::Kernel;
@@ -108,7 +108,7 @@ sub prepare
sub _cgi_resolve_ml_specific_variables
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my ($ml_home_dir, $config_cf);
# inherit ml_domain from $hints
@@ -578,7 +578,7 @@ execute cgi_menu() given as FML::Command::*
sub run_cgi_menu
{
my ($curproc, $args) = @_;
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
my $command_args = $pcb->get('cgi', 'command_args');
if (defined $command_args) {
diff --git a/fml/lib/FML/Process/Calendar.pm b/fml/lib/FML/Process/Calendar.pm
index e2a9ed31..0d59c505 100644
--- a/fml/lib/FML/Process/Calendar.pm
+++ b/fml/lib/FML/Process/Calendar.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Calendar.pm,v 1.3 2003/03/06 04:15:35 fukachan Exp $
+# $FML: Calendar.pm,v 1.4 2003/08/23 04:35:38 fukachan Exp $
#
package FML::Process::Calendar;
@@ -72,7 +72,7 @@ sub prepare
# load default configurations.
use FML::Config;
- $curproc->{ config } = new FML::Config;
+ $curproc->config() = new FML::Config;
$curproc->load_config_files( $args->{ cf_list } );
}
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index a4a7461f..eb8278da 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.87 2003/08/23 04:35:38 fukachan Exp $
+# $FML: Command.pm,v 1.88 2003/08/23 07:24:46 fukachan Exp $
#
package FML::Process::Command;
@@ -75,7 +75,7 @@ parse the incoming message.
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'command_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -112,7 +112,7 @@ verify the sender is a valid member or not.
sub verify_request
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'command_verify_request_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -186,8 +186,8 @@ XXX Each command determines need of lock or not.
sub run
{
my ($curproc, $args) = @_;
- my $pcb = $curproc->{ pcb };
- my $config = $curproc->{ config };
+ my $pcb = $curproc->pcb();
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'command_run_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -272,7 +272,7 @@ queue flush and send back the results or error messages.
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'command_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -316,7 +316,7 @@ sub _check_context
sub _config_permit_command
{
my ($curproc, $args, $level, $opts) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $cred = $curproc->{ credential }; # user credential
my $prompt = $config->{ command_prompt } || '>>>';
my $comname = $opts->{ comname };
@@ -354,7 +354,7 @@ sub _config_permit_command
sub _is_safe_syntax
{
my ($curproc, $args, $status, $cominfo) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $prompt = $config->{ command_prompt } || '>>>';
my $level = $status->{ level };
my $command = $cominfo->{ command };
@@ -391,7 +391,7 @@ sub _is_safe_syntax
sub _parse_command_args
{
my ($curproc, $args, $fixed_command) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $ml_name = $config->{ ml_name };
my $argv = $curproc->command_line_argv();
@@ -448,7 +448,7 @@ sub _try_admin_auth
$obj = new FML::Command::Auth;
};
unless ($@) {
- my $config = $curproc->{ config };
+ 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);
@@ -487,7 +487,7 @@ sub _try_admin_auth
sub _get_command_mode
{
my ($curproc, $args, $status, $command_info) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $command = $command_info->{ command };
my $comname = $command_info->{ comname };
my $comsubname = $command_info->{ comsubname };
@@ -736,7 +736,7 @@ sub __clean_up
sub __stop_here
{
my ($curproc, $args, $status, $cominfo, $orig_command) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $prompt = $config->{ command_prompt } || '>>>';
my $key = $status->{ _stop_reason_key };
my $str = $status->{ _stop_reason_str };
@@ -764,7 +764,7 @@ sub __stop_here
sub _evaluate_command_lines
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $ml_name = $config->{ ml_name };
my $argv = $curproc->command_line_argv();
my $prompt = $config->{ command_prompt } || '>>>';
diff --git a/fml/lib/FML/Process/ConfViewer.pm b/fml/lib/FML/Process/ConfViewer.pm
index 22cec004..f6af5ac9 100644
--- a/fml/lib/FML/Process/ConfViewer.pm
+++ b/fml/lib/FML/Process/ConfViewer.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: ConfViewer.pm,v 1.22 2003/08/23 04:43:41 fukachan Exp $
+# $FML: ConfViewer.pm,v 1.23 2003/08/24 14:12:18 fukachan Exp $
#
package FML::Process::ConfViewer;
@@ -69,7 +69,7 @@ sub new
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlconf_prepare_start_hook' );
if ($eval) {
@@ -98,7 +98,7 @@ sub verify_request
{
my ($curproc, $args) = @_;
my $argv = $curproc->command_line_argv();
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlconf_verify_request_start_hook' );
if ($eval) {
@@ -139,7 +139,7 @@ See <FML::Process::Switch()> on C<$args> for more details.
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $myname = $curproc->myname();
my $argv = $curproc->command_line_argv();
@@ -194,7 +194,7 @@ _EOF_
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlconf_finish_start_hook' );
if ($eval) {
@@ -224,7 +224,7 @@ run dump_variables of C<FML::Config>.
sub _fmlconf
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $mode = $args->{ options }->{ n } ? 'difference_only' : 'all';
my $argv = $curproc->command_line_argv();
diff --git a/fml/lib/FML/Process/Configure.pm b/fml/lib/FML/Process/Configure.pm
index c8fa69fa..f4c4c7ba 100644
--- a/fml/lib/FML/Process/Configure.pm
+++ b/fml/lib/FML/Process/Configure.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Configure.pm,v 1.53 2003/08/23 04:43:41 fukachan Exp $
+# $FML: Configure.pm,v 1.54 2003/08/23 07:24:46 fukachan Exp $
#
package FML::Process::Configure;
@@ -72,7 +72,7 @@ sub new
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'makefml_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -97,7 +97,7 @@ sub verify_request
my ($curproc, $args) = @_;
my $argv = $curproc->command_line_argv();
my $len = $#$argv + 1;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'makefml_verify_request_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -133,7 +133,7 @@ See <FML::Process::Switch()> on C<$args> for more details.
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $myname = $curproc->myname();
my $argv = $curproc->command_line_argv();
@@ -148,7 +148,7 @@ sub run
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'makefml_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -273,7 +273,7 @@ See <FML::Process::Switch()> on C<$args> for more details.
sub _makefml
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $ml_name = $config->{ ml_name };
my $myname = $curproc->myname();
my $argv = $curproc->command_line_argv();
diff --git a/fml/lib/FML/Process/Digest.pm b/fml/lib/FML/Process/Digest.pm
index db42224c..28cea281 100644
--- a/fml/lib/FML/Process/Digest.pm
+++ b/fml/lib/FML/Process/Digest.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Digest.pm,v 1.9 2003/08/23 07:24:46 fukachan Exp $
+# $FML: Digest.pm,v 1.10 2003/08/23 15:33:14 fukachan Exp $
#
package FML::Process::Digest;
@@ -76,7 +76,7 @@ fix @INC.
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'digest_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -110,7 +110,7 @@ set up the mail sender.
sub verify_request
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $maintainer = $config->{ maintainer };
my $eval = $config->get_hook( 'digest_verify_request_start_hook' );
@@ -148,7 +148,7 @@ Lastly we unlock the current process.
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $maintainer = $config->{ maintainer };
my $sender = $curproc->{'credential'}->{'sender'};
@@ -207,7 +207,7 @@ If needed, we send back error messages to the mail sender.
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'digest_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 7c0cdcb2..8c27dde2 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.123 2003/08/23 04:43:41 fukachan Exp $
+# $FML: Distribute.pm,v 1.124 2003/08/23 07:24:46 fukachan Exp $
#
package FML::Process::Distribute;
@@ -75,7 +75,7 @@ adjust ml_* and load configuration files.
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'distribute_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -115,7 +115,7 @@ check the mail sender and the mail loop possibility.
sub verify_request
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'distribute_verify_request_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -194,7 +194,7 @@ Lastly we unlock the current process.
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $maintainer = $config->{ maintainer };
my $sender = $curproc->{'credential'}->{'sender'};
my $data_type =
@@ -215,7 +215,7 @@ sub run
$curproc->_distribute($args);
}
else {
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
$curproc->log("deny article submission");
@@ -318,7 +318,7 @@ If needed, we send back error messages to the mail sender.
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'distribute_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -421,7 +421,7 @@ sub _build_article_object
sub _header_rewrite
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $header = $curproc->article_message_header();
my $rules = $config->get_as_array_ref('article_header_rewrite_rules');
my $id = $args->{ id };
@@ -450,7 +450,7 @@ sub _deliver_article
{
my ($curproc, $args) = @_;
my $cred = $curproc->{ credential };
- my $config = $curproc->{ config }; # FML::Config object
+ my $config = $curproc->config(); # FML::Config object
my $message = $curproc->article_message(); # Mail::Message object
my $header = $curproc->article_message_header(); # FML::Header object
my $body = $curproc->article_message_body(); # Mail::Message object
@@ -520,8 +520,8 @@ sub _deliver_article
sub _old_thread_check
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
- my $pcb = $curproc->{ pcb };
+ my $config = $curproc->config();
+ my $pcb = $curproc->pcb();
my $myname = $curproc->myname();
my $ml_name = $config->{ ml_name };
diff --git a/fml/lib/FML/Process/DocViewer.pm b/fml/lib/FML/Process/DocViewer.pm
index 910f7c1d..f5ee9c8b 100644
--- a/fml/lib/FML/Process/DocViewer.pm
+++ b/fml/lib/FML/Process/DocViewer.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: DocViewer.pm,v 1.24 2003/08/23 04:35:39 fukachan Exp $
+# $FML: DocViewer.pm,v 1.25 2003/08/23 07:24:47 fukachan Exp $
#
package FML::Process::DocViewer;
@@ -75,7 +75,7 @@ sub new
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmldoc_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -98,7 +98,7 @@ sub verify_request
{
my ($curproc, $args) = @_;
my $argv = $curproc->command_line_argv();
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmldoc_verify_request_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -129,7 +129,7 @@ C<fmlconf($args)>.
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $myname = $curproc->myname();
my $argv = $curproc->command_line_argv();
@@ -144,7 +144,7 @@ sub run
sub _fmldoc
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $myname = $curproc->myname();
my $argv = $curproc->command_line_argv();
@@ -216,7 +216,7 @@ finalize.
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmldoc_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
diff --git a/fml/lib/FML/Process/Error.pm b/fml/lib/FML/Process/Error.pm
index d71a32da..aae15a2e 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.32 2003/08/23 04:35:39 fukachan Exp $
+# $FML: Error.pm,v 1.33 2003/08/23 07:24:47 fukachan Exp $
#
package FML::Process::Error;
@@ -71,7 +71,7 @@ if $use_error_analyzer_program, parse incoming message.
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'error_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -107,7 +107,7 @@ dummy.
sub verify_request
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $maintainer = $config->{ maintainer };
my $eval = $config->get_hook( 'error_verify_request_start_hook' );
@@ -145,9 +145,9 @@ XXX Each command determines need of lock or not.
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $found = 0;
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
my $msg = $curproc->incoming_message();
my $eval = $config->get_hook( 'error_run_start_hook' );
@@ -267,8 +267,8 @@ _EOF_
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
- my $pcb = $curproc->{ pcb };
+ my $config = $curproc->config();
+ my $pcb = $curproc->pcb();
my $eval = $config->get_hook( 'error_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
diff --git a/fml/lib/FML/Process/HTMLify.pm b/fml/lib/FML/Process/HTMLify.pm
index 53c280c9..02599ddf 100644
--- a/fml/lib/FML/Process/HTMLify.pm
+++ b/fml/lib/FML/Process/HTMLify.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2001,2002,2003 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: HTMLify.pm,v 1.28 2003/08/23 04:35:39 fukachan Exp $
+# $FML: HTMLify.pm,v 1.29 2003/08/23 07:24:47 fukachan Exp $
#
package FML::Process::HTMLify;
@@ -66,7 +66,7 @@ sub new
sub prepare
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlhtmlify_prepare_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -87,7 +87,7 @@ sub prepare
sub verify_request
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlhtmlify_verify_request_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
@@ -111,7 +111,7 @@ call &FML::Command::HTMLify::convert().
sub run
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $argv = $curproc->command_line_argv();
my $options = $curproc->command_line_options();
my $src_dir = $argv->[0];
@@ -168,7 +168,7 @@ _EOF_
sub finish
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $eval = $config->get_hook( 'fmlhtmlify_finish_start_hook' );
if ($eval) { eval qq{ $eval; }; $curproc->logwarn($@) if $@; }
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index ff4d3193..5f759759 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.174 2003/08/23 05:29:01 fukachan Exp $
+# $FML: Kernel.pm,v 1.175 2003/08/23 07:24:48 fukachan Exp $
#
package FML::Process::Kernel;
@@ -58,8 +58,8 @@ in the process flow.
3. initialize current process struct C<$curproc> such as
$curproc->{ main_cf }
- $curproc->{ config }
- $curproc->{ pcb }
+ $curproc->config()
+ $curproc->pcb()
For example, this C<main_cf> provides the pointer to /etc/fml/main.cf
parameters.
@@ -129,11 +129,11 @@ sub new
# 3.2 bind FML::Config object to $curproc
use FML::Config;
- $curproc->{ config } = new FML::Config $cfargs;
+ $curproc->config() = new FML::Config $cfargs;
# 3.3 initialize PCB (Process Control Block)
use FML::PCB;
- $curproc->{ pcb } = new FML::PCB;
+ $curproc->pcb() = new FML::PCB;
# 3.4
# object-ify. bless! bless! bless!
@@ -313,7 +313,7 @@ sub unlock
# initialize
($channel, $lock_file) = $curproc->_lock_init($channel);
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
my $lockobj = $pcb->get('lock', $channel);
if (defined $lockobj) {
@@ -346,7 +346,7 @@ sub unlock
sub _lock_init
{
my ($curproc, $channel) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $home_dir = $config->{ ml_home_dir };
my $lock_dir = $config->{ lock_dir };
my $lock_type = $config->{ lock_type };
@@ -564,7 +564,7 @@ See C<FML::Header> object for more details.
sub simple_loop_check
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $header = $curproc->incoming_message_header();
my $rules = $config->get_as_array_ref( 'header_loop_check_rules' );
my $match = 0;
@@ -616,7 +616,7 @@ sub resolve_ml_specific_variables
my ($curproc, $args) = @_;
my ($ml_name, $ml_domain, $ml_home_prefix, $ml_home_dir);
my ($command, @options, $config_cf_path);
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $myname = $args->{ myname };
my $ml_addr = '';
@@ -765,7 +765,7 @@ my @delayed_buffer = ();
sub __debug_ml_xxx
{
my ($curproc, $str) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
if (defined $config->{ log_file } && (-w $config->{ log_file })) {
for my $buf (@delayed_buffer) { $curproc->log( $buf ); }
@@ -857,12 +857,12 @@ sub load_config_files
# load configuration variables from given files e.g. /some/where.cf
# XXX overload variables from each $cf
for my $cf (@$files) {
- $curproc->{ config }->overload( $cf );
+ $curproc->config()->overload( $cf );
}
# XXX We need to expand variables after we load all *cf files.
# XXX 2001/05/05 changed to dynamic expansion for hook
- # $curproc->{ config }->expand_variables();
+ # $curproc->config()->expand_variables();
# XXX simple sanity check
# MAIL_LIST != MAINTAINER
@@ -886,7 +886,7 @@ sub load_config_files
sub fix_perl_include_path
{
my ($curproc) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
# XXX update @INC here since we should do after loading configurations.
# update @INC for ml local libraries
@@ -938,7 +938,7 @@ sub parse_incoming_message
$curproc->{ incoming_message }->{ body } = $msg->whole_message_body;
# save input message for further investigation
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
if ($config->yes('use_incoming_mail_cache')) {
my $dir = $config->{ incoming_mail_cache_dir };
my $modulus = $config->{ incoming_mail_cache_size };
@@ -1004,7 +1004,7 @@ sub _check_restrictions
my ($curproc, $args, $type) = @_;
my $config = $curproc->config();
my $cred = $curproc->{ credential }; # user credential
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
my $sender = $cred->sender();
my $rules = $config->get_as_array_ref( "${type}_restrictions" );
@@ -1389,7 +1389,7 @@ sub _array_is_different
sub _append_message_into_queue
{
my ($curproc, $msg, $args, $recipient, $recipient_maps, $hdr) = @_;
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
my $category = 'reply_message';
my $class = 'queue';
my $rarray = $pcb->get($category, $class) || [];
@@ -1414,7 +1414,7 @@ sub _append_message_into_queue
sub _append_message_into_queue2
{
my ($curproc, $msg, $args, $recipient, $recipient_maps, $hdr) = @_;
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
my $category = 'reply_message';
my $class = 'queue';
my $rarray = $pcb->get($category, $class) || [];
@@ -1451,7 +1451,7 @@ sub _append_message_into_queue2
sub _reply_message_recipient_keys
{
my ($curproc, $msg, $args) = @_;
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
my $category = 'reply_message';
my $class = 'queue';
my $rarray = $pcb->get($category, $class) || [];
@@ -1539,7 +1539,7 @@ This $args is passed through to reply_message().
sub reply_message_nl
{
my ($curproc, $class, $default_msg, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $buf = $curproc->message_nl($class, $default_msg, $args);
$curproc->caller_info($class, caller) if $debug;
@@ -1585,7 +1585,7 @@ sub reply_message_add_header_info
sub message_nl
{
my ($curproc, $class, $default_msg, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $dir = $config->{ message_template_dir };
my $local_dir = $config->{ ml_local_message_template_dir };
my $charset = $config->{ template_file_charset } || 'en';
@@ -1659,7 +1659,7 @@ Prepare the message and queue it in by C<Mail::Delivery::Queue>.
sub inform_reply_messages
{
my ($curproc, $args) = @_;
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
# We should classify reply messages by
# a set of ( category, recipient(s) , + more ? what ??? );
@@ -1700,8 +1700,8 @@ sub inform_reply_messages
sub queue_in
{
my ($curproc, $category, $optargs) = @_;
- my $pcb = $curproc->{ pcb };
- my $config = $curproc->{ config };
+ my $pcb = $curproc->pcb();
+ my $config = $curproc->config();
my $sender = $config->{ maintainer };
my $charset = $config->{ "${category}_charset" } || 'us-ascii';
my $subject = $config->{ "${category}_subject" };
@@ -2012,7 +2012,7 @@ sub clean_up_tmpfiles
sub temp_file_path
{
my ($curproc) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $tmp_dir = $config->{ tmp_dir };
$TmpFileCounter++; # ensure uniqueness
@@ -2061,7 +2061,7 @@ C<TODO:>
sub queue_flush
{
my ($curproc, $queue) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $queue_dir = $config->{ mail_queue_dir };
eval q{
@@ -2104,7 +2104,7 @@ C<Caution:>
sub prepare_file_to_return
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $tmp_dir = $config->{ tmp_dir };
my $tmpf = File::Spec->catfile($tmp_dir, $$);
my $src_file = $args->{ src };
@@ -2156,7 +2156,7 @@ sub prepare_file_to_return
sub open_outgoing_message_channel
{
my ($curproc, $optargs) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
# save message for further investigation
if ($config->yes('use_outgoing_mail_cache')) {
@@ -2216,7 +2216,7 @@ sub parse_exception
sub set_umask_as_public
{
my ($curproc) = @_;
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
# reset umask since html archives should be public open.
my $saved_umask = umask;
@@ -2232,7 +2232,7 @@ sub set_umask_as_public
sub reset_umask
{
my ($curproc) = @_;
- my $pcb = $curproc->{ pcb };
+ my $pcb = $curproc->pcb();
my $saved_umask = $pcb->get('umask', 'saved_umask');
# back to the original umask;
diff --git a/fml/lib/FML/Process/QMail.pm b/fml/lib/FML/Process/QMail.pm
index e10d9d37..385738b7 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.16 2003/08/23 07:24:48 fukachan Exp $
+# $FML: QMail.pm,v 1.17 2003/08/23 15:33:14 fukachan Exp $
#
package FML::Process::QMail;
@@ -67,7 +67,7 @@ C<NOT YET IMPLERMENTED>.
sub DotQmailExt
{
my ($curproc, $args) = @_;
- my $config = $curproc->{ config };
+ 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 8e7b36d4..b5f9c9e0 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.73 2003/08/23 14:38:01 fukachan Exp $
+# $FML: Utils.pm,v 1.74 2003/08/25 14:13:58 fukachan Exp $
#
package FML::Process::Utils;
@@ -51,8 +51,8 @@ sub config
{
my ($curproc) = @_;
- if (defined $curproc->{ config }) {
- return $curproc->{ config };
+ if (defined $curproc->config()) {
+ return $curproc->config();
}
else {
return undef;
@@ -68,8 +68,8 @@ sub pcb
{
my ($curproc) = @_;
- if (defined $curproc->{ pcb }) {
- return $curproc->{ pcb };
+ if (defined $curproc->pcb()) {
+ return $curproc->pcb();
}
else {
return undef;
@@ -638,7 +638,7 @@ not yet implemenetd properly. (?)
sub ml_name
{
my ($curproc) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
if (defined $config->{ ml_name } && $config->{ ml_name }) {
return $config->{ ml_name };
@@ -664,7 +664,7 @@ properly, return the default domain defined in /etc/fml/main.cf.
sub ml_domain
{
my ($curproc) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
if (defined $config->{ ml_domain } && $config->{ ml_domain }) {
return $config->{ ml_domain };
@@ -919,7 +919,7 @@ sub config_cf_filepath
my $prefix = $curproc->ml_home_prefix($domain);
unless (defined $ml) {
- $ml = $curproc->{ config }->{ ml_name };
+ $ml = $curproc->config()->{ ml_name };
}
use File::Spec;
@@ -1054,7 +1054,7 @@ get ARRAY_REF of address list for the specified map.
sub get_address_list
{
my ($curproc, $map) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $list = $config->get_as_array_ref( $map );
eval q{ use FML::Command::UserControl;};
@@ -1081,7 +1081,7 @@ which this $map belongs to ?
sub which_map_nl
{
my ($curproc, $map) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $found = '';
SEARCH_MAPS:
@@ -1209,7 +1209,7 @@ sub language_default
sub language_of_cgi_message
{
my ($curproc) = @_;
- my $config = $curproc->{ config };
+ my $config = $curproc->config();
my $charset = $config->{ cgi_charset };
return( $charset || $curproc->language_default() );