summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Header
diff options
context:
space:
mode:
authorfukachan <fukachan>2006-04-17 23:58:58 +0000
committerfukachan <fukachan>2006-04-17 23:58:58 +0000
commit14ccee59482536f47c8cd766a780180916f1f651 (patch)
tree8a44375295f20a4b142b6db00c2c56a82381dce4 /fml/lib/FML/Header
parent5dc8c8634fd66e8d217b7859ce61661222c54dd7 (diff)
downloadfml8-14ccee59482536f47c8cd766a780180916f1f651.tar.gz
fml8-14ccee59482536f47c8cd766a780180916f1f651.tar.bz2
fml8-14ccee59482536f47c8cd766a780180916f1f651.zip
$Counter -> $global_counter, easily identified as a global variable.
base address is ( $article_post_address || $maintainer ). fix style.
Diffstat (limited to 'fml/lib/FML/Header')
-rw-r--r--fml/lib/FML/Header/MessageID.pm15
1 files changed, 7 insertions, 8 deletions
diff --git a/fml/lib/FML/Header/MessageID.pm b/fml/lib/FML/Header/MessageID.pm
index 588455d8..4c92b9b8 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: MessageID.pm,v 1.23 2004/07/23 12:43:55 fukachan Exp $
+# $FML: MessageID.pm,v 1.24 2005/05/26 10:20:05 fukachan Exp $
#
package FML::Header::MessageID;
use strict;
-use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD $Counter);
+use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD $global_counter);
use Carp;
=head1 NAME
@@ -169,13 +169,12 @@ generate and return a new message-id.
sub gen_id
{
my ($self, $config) = @_;
- my $addr = $config->{ article_post_address };
+ my $post_addr = $config->{ article_post_address };
+ my $maintainer = $config->{ maintainer };
+ my $addr = $post_addr || $maintainer;
- # XXX-TODO: if $config->{ article_post_address } undefined ?
- $Counter++;
-
- # "<".time.".$$.$Counter." . $config->{ article_post_address } . ">";
- return sprintf("<%d.%d.%s.%s>", time, $$, $Counter, $addr);
+ $global_counter++;
+ return sprintf("<%d.%d.%s.%s>", time, $$, $global_counter, $addr);
}