diff options
| author | fukachan <fukachan> | 2002-11-26 14:13:00 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2002-11-26 14:13:00 +0000 |
| commit | 5a4d0eedf73e9a044b90f4aa500d8bd3bc1405ae (patch) | |
| tree | 4bbaefa7fccc8fa8ed95259bbe1ba067cf6ad179 /fml/lib | |
| parent | a6586a3bbd83b36eef182b5f9b87c85b63f05e97 (diff) | |
| download | fml8-5a4d0eedf73e9a044b90f4aa500d8bd3bc1405ae.tar.gz fml8-5a4d0eedf73e9a044b90f4aa500d8bd3bc1405ae.tar.bz2 fml8-5a4d0eedf73e9a044b90f4aa500d8bd3bc1405ae.zip | |
make jcode of summary file "jis-jp".
implement append($id).
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/FML/Article/Summary.pm | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/fml/lib/FML/Article/Summary.pm b/fml/lib/FML/Article/Summary.pm index 1d98dc15..152a67a5 100644 --- a/fml/lib/FML/Article/Summary.pm +++ b/fml/lib/FML/Article/Summary.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: Summary.pm,v 1.2 2002/11/26 09:44:37 fukachan Exp $ +# $FML: Summary.pm,v 1.3 2002/11/26 10:30:07 fukachan Exp $ # package FML::Article::Summary; @@ -100,6 +100,10 @@ sub _prepare_info $subject =~ s/\s*\n/ /g; $subject =~ s/\s+/ /g; + use Mail::Message::Encode; + my $enc = new Mail::Message::Encode; + $subject = $enc->convert($subject, "jis-jp"); + my $info = { id => $id, address => $address, @@ -168,6 +172,27 @@ sub _fml4_compatible_style_one_line_summary =cut +# Descriptions: append summary information for article $id. +# Arguments: OBJ($self) NUM($id) +# Side Effects: update summary +# Return Value: none +sub append +{ + my ($self, $id) = @_; + my $curproc = $self->{ _curproc }; + my $config = $curproc->config(); + my $file = $config->{ 'summary_file' }; + + use FileHandle; + my $wh = new FileHandle ">> $file"; + if (defined $wh) { + $wh->autoflush(1); + $self->print($wh, $id); + $wh->close(); + } +} + + # Descriptions: re-genearete summary from $min to $max. # Arguments: OBJ($self) NUM(min) NUM($max) # Side Effects: re-create $summary file. |
