summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-04-15 13:30:49 +0000
committerfukachan <fukachan>2001-04-15 13:30:49 +0000
commitb26dae529da59a492b04477f0a958265ff4a51b9 (patch)
tree1b21bb27c17fb9e9932681ab6d31a264553838d2 /fml/lib
parent762613c889b0d92d033a542f19de573daa4c994d (diff)
downloadfml8-b26dae529da59a492b04477f0a958265ff4a51b9.tar.gz
fml8-b26dae529da59a492b04477f0a958265ff4a51b9.tar.bz2
fml8-b26dae529da59a492b04477f0a958265ff4a51b9.zip
implemente gen_id() to generate a new message-id
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Header/MessageID.pm31
1 files changed, 25 insertions, 6 deletions
diff --git a/fml/lib/FML/Header/MessageID.pm b/fml/lib/FML/Header/MessageID.pm
index 9e0bcb99..ba183936 100644
--- a/fml/lib/FML/Header/MessageID.pm
+++ b/fml/lib/FML/Header/MessageID.pm
@@ -4,12 +4,12 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: __template.pm,v 1.5 2001/04/03 09:45:39 fukachan Exp $
+# $FML: MessageID.pm,v 1.1 2001/04/15 05:01:58 fukachan Exp $
#
package FML::Header::MessageID;
use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
+use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD $Counter);
use Carp;
=head1 NAME
@@ -46,10 +46,6 @@ FML::Header::MessageID - manupulate message-id
usual constructor.
-=head2 C<open_cache($args)>
-
-open cache and return C<File::CacheDir> object.
-
=cut
@@ -66,6 +62,12 @@ sub new
}
+=head2 C<open_cache($args)>
+
+open cache and return C<File::CacheDir> object.
+
+=cut
+
sub open_cache
{
my ($self, $args) = @_;
@@ -121,6 +123,23 @@ sub set
}
+=head2 C<gen_id($curproc, $args)>
+
+return a new message-id.
+
+=cut
+
+
+sub gen_id
+{
+ my ($self, $curproc, $args) = @_;
+ my $config = $curproc->{ config };
+
+ $Counter++;
+ time.".$$.$Counter\@" . $config->{ address_for_post };
+}
+
+
=head1 AUTHOR
Ken'ichi Fukamachi