summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-03-30 13:48:25 +0000
committerfukachan <fukachan>2002-03-30 13:48:25 +0000
commiteed4d6079b291be8b66e2e4d2dd1bed1cdd6e8e1 (patch)
treed8314ae7b40d97d8ff76e08047caeee204cdd559 /fml/lib/FML/Process
parenta6f4e86f12bdc4714d4f7be6adbce43a1590189e (diff)
downloadfml8-eed4d6079b291be8b66e2e4d2dd1bed1cdd6e8e1.tar.gz
fml8-eed4d6079b291be8b66e2e4d2dd1bed1cdd6e8e1.tar.bz2
fml8-eed4d6079b291be8b66e2e4d2dd1bed1cdd6e8e1.zip
FML::Article::filepath() determines the article file path.
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Distribute.pm22
1 files changed, 10 insertions, 12 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 26968599..c8f6f30b 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.64 2002/02/17 03:07:55 fukachan Exp $
+# $FML: Distribute.pm,v 1.65 2002/02/17 13:46:29 fukachan Exp $
#
package FML::Process::Distribute;
@@ -223,18 +223,17 @@ sub _distribute
my ($curproc, $args) = @_;
my $config = $curproc->{ config };
- # XXX $ah is "article handler" object.
- # XXX $ah != $curproc->{ article } (which is just a key)
- # XXX $curproc->{ article } is prepared as a side effect.
- my $ah = $curproc->_prepare_article($args);
+ # 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);
# get sequence number
- my $id = $ah->increment_id;
+ my $id = $article->increment_id;
# XXX debug, remove here in the future
{
my $ha_msg = $curproc->{ article }->{ body }->data_type_list;
- for (@$ha_msg) { Log($_);}
+ for (@$ha_msg) { Log("debug: $_");}
}
# thread system checks the message before header rewritings.
@@ -245,7 +244,7 @@ sub _distribute
$curproc->_header_rewrite({ id => $id });
# spool in the article before delivery
- $ah->spool_in($id);
+ $article->spool_in($id);
# delivery starts !
$curproc->_deliver_article($args);
@@ -261,7 +260,7 @@ sub _distribute
# Arguments: OBJ($curproc) HASH_REF($args)
# Side Effects: none
# Return Value: OBJ(FML::Article)
-sub _prepare_article
+sub _build_article_object
{
my ($curproc, $args) = @_;
@@ -428,10 +427,9 @@ sub htmlify
my $ml_name = $config->{ ml_name };
my $spool_dir = $config->{ spool_dir };
my $html_dir = $config->{ html_archive_dir };
+ my $article = $curproc->_build_article_object($args);
my $article_id = $pcb->get('article', 'id');
-
- use File::Spec;
- my $article_file = File::Spec->catfile($spool_dir, $article_id);
+ my $article_file = $article->filepath($article_id);
eval q{
use Mail::HTML::Lite;