summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-12-18 12:28:49 +0000
committerfukachan <fukachan>2005-12-18 12:28:49 +0000
commitd6e180ee0bb54b92c24d9e9e01ee73596a69c477 (patch)
tree7ab32927be8e3cb18e7e76570f728088ead3dc06 /fml
parent348fad65d28d8a5e84fdf7f5add1e51e5c46004e (diff)
downloadfml8-d6e180ee0bb54b92c24d9e9e01ee73596a69c477.tar.gz
fml8-d6e180ee0bb54b92c24d9e9e01ee73596a69c477.tar.bz2
fml8-d6e180ee0bb54b92c24d9e9e01ee73596a69c477.zip
o fix comments.
o if (defined ) { .. open .. }
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Moderate.pm62
1 files changed, 34 insertions, 28 deletions
diff --git a/fml/lib/FML/Moderate.pm b/fml/lib/FML/Moderate.pm
index 8aa0fc5f..a851660c 100644
--- a/fml/lib/FML/Moderate.pm
+++ b/fml/lib/FML/Moderate.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$
+# $FML: Moderate.pm,v 1.1 2005/12/18 12:21:15 fukachan Exp $
#
package FML::Moderate;
@@ -149,11 +149,13 @@ sub _queue_init
=head2 distribute_article($mid)
+distribute article.
+
=cut
# Descriptions: distribute article.
-# Arguments: OBJ($self) STR($mid)
+# Arguments: OBJ($self) STR($qid)
# Side Effects: do another process.
# Return Value: none
sub distribute_article
@@ -167,33 +169,37 @@ sub distribute_article
my $ml_domain = $config->{ ml_domain };
my $queue = $self->_queue_init($qid);
-
- eval q{
- close(STDIN);
- unless ($queue->open($q_class, { in_channel => *STDIN{IO} })) {
- my $qid = $queue->id();
- $curproc->logerror("cannot open qid=$qid");
- }
-
- $curproc->log("emulate $myname for $ml_name\@$ml_domain ML");
-
- my $hints = {
- config_overload => {
- 'article_post_restrictions' => 'permit_anyone',
- 'use_incoming_mail_header_loop_check' => 'no',
- },
+ if (defined $queue) {
+ eval q{
+ close(STDIN);
+ unless ($queue->open($q_class, { in_channel => *STDIN{IO} })) {
+ my $qid = $queue->id();
+ $curproc->logerror("cannot open qid=$qid");
+ }
+
+ $curproc->log("emulate $myname for $ml_name\@$ml_domain ML");
+
+ my $hints = {
+ config_overload => {
+ 'article_post_restrictions' => 'permit_anyone',
+ 'use_incoming_mail_header_loop_check' => 'no',
+ },
+ };
+
+ use FML::Process::Switch;
+ &FML::Process::Switch::NewProcess($curproc,
+ $myname,
+ $ml_name,
+ $ml_domain,
+ $hints);
+ $curproc->log("emulation done");
};
-
- use FML::Process::Switch;
- &FML::Process::Switch::NewProcess($curproc,
- $myname,
- $ml_name,
- $ml_domain,
- $hints);
- $curproc->log("emulation done");
- };
- if ($@) {
- $curproc->logerror($@);
+ if ($@) {
+ $curproc->logerror($@);
+ }
+ }
+ else {
+ $curproc->logerror("moderate: queue undefined.");
}
}