Mailing List Archive

svn commit: rev 6714 - incubator/spamassassin/trunk/lib/Mail/SpamAssassin
Author: felicity
Date: Tue Feb 17 19:47:44 2004
New Revision: 6714

Modified:
incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
incubator/spamassassin/trunk/lib/Mail/SpamAssassin/MsgContainer.pm
Log:
MsgContainer::is_root() is a misnomer in a way, it checks whether or not the tree node is a leaf. 'root' sounds like the top of the tree, where it actually means a root of the tree or any subtree there-under. I just renamed it is_leaf to make it more correct.

Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm (original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/EvalTests.pm Tue Feb 17 19:47:44 2004
@@ -2511,8 +2511,9 @@

$self->_check_mime_header($ctype, $cte, $cd, $charset, $name);

- # If we're in the root node of the MIME tree, let's skip the rest of the tests ...
- if ( $p->is_root() ) {
+ # If we're not in a leaf node in the tree, there will be no raw
+ # section, so skip it.
+ if ( ! $p->is_leaf() ) {
next;
}


Modified: incubator/spamassassin/trunk/lib/Mail/SpamAssassin/MsgContainer.pm
==============================================================================
--- incubator/spamassassin/trunk/lib/Mail/SpamAssassin/MsgContainer.pm (original)
+++ incubator/spamassassin/trunk/lib/Mail/SpamAssassin/MsgContainer.pm Tue Feb 17 19:47:44 2004
@@ -181,12 +181,12 @@
push @{ $self->{'body_parts'} }, $part;
}

-=item is_root()
+=item is_leaf()

=cut

-sub is_root {
- return ! exists $_[0]->{'raw'};
+sub is_leaf {
+ return exists $_[0]->{'raw'};
}

=item raw()