summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfukachan <fukachan>2001-03-25 17:43:03 +0000
committerfukachan <fukachan>2001-03-25 17:43:03 +0000
commite9d844f09e6a4ca2294e30bb0bd6f7bb0ade542c (patch)
tree132d7a14a28e64de89754c772877501179c1b014
parentc42cd15d1dbae46fd1751dbce66fbdf88243e01b (diff)
downloadfml8-e9d844f09e6a4ca2294e30bb0bd6f7bb0ade542c.tar.gz
fml8-e9d844f09e6a4ca2294e30bb0bd6f7bb0ade542c.tar.bz2
fml8-e9d844f09e6a4ca2294e30bb0bd6f7bb0ade542c.zip
clean up comments and clean up codes a little
-rw-r--r--fml/lib/MailingList/Messages.pm19
1 files changed, 12 insertions, 7 deletions
diff --git a/fml/lib/MailingList/Messages.pm b/fml/lib/MailingList/Messages.pm
index e5fbf160..9b5ddde7 100644
--- a/fml/lib/MailingList/Messages.pm
+++ b/fml/lib/MailingList/Messages.pm
@@ -13,9 +13,6 @@ use strict;
use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
use Carp;
-require Exporter;
-@ISA = qw(Exporter);
-
# virtual content-type
my %content_type =
@@ -729,7 +726,8 @@ return this message has empty content or not.
=cut
- my $total = 0;
+my $total = 0;
+
sub size
{
my ($self) = @_;
@@ -830,8 +828,11 @@ sub get_first_plaintext_message
{
my ($self, $args) = @_;
my $size = $args->{ 'size' } || 512;
+ my $mp ; # mp = message pointer
- my $mp;
+ # Let's go along the chain of message objects.
+ # This routine return the first reference to the message with the
+ # type = ' plain/text'
for ($mp = $self;
defined $mp->{ content } || defined $mp->{ 'next' };
$mp = $mp->{ 'next' }) {
@@ -852,6 +853,8 @@ sub AUTOLOAD
my $function = $AUTOLOAD;
$function =~ s/.*:://;
+ return if $function =~ /DESTROY/;
+
if ($function =~ /^get_(\w+)_reference$/) {
return $self->{ $1 };
}
@@ -860,6 +863,7 @@ sub AUTOLOAD
}
}
+
=head2 C<get_xxx_reference()>
get the reference to xxx, which is a key of the message.
@@ -873,14 +877,15 @@ internal use. set CODE REFERENCE to the log function
=cut
+# set log function pointer (CODE REFERNCE)
sub set_log_function
{
my ($self, $fp) = @_;
- $self->{ _log_function } = $fp; # log function pointer
+ $self->{ _log_function } = $fp;
}
-# XXX debug, remove here in the future
+# XXX debug, remove this in the future
sub get_content_type_list
{
my ($msg) = @_;