summaryrefslogtreecommitdiff
path: root/fml/lib/Mail/Message/ToHTML.pm
diff options
context:
space:
mode:
authorfukachan <fukachan>2006-04-15 06:33:00 +0000
committerfukachan <fukachan>2006-04-15 06:33:00 +0000
commit9990e892608d33c2d404b81118bd3090c0eaecee (patch)
treed461bfe39017c6c4f85c1d4f16aa9aa49ac9a24c /fml/lib/Mail/Message/ToHTML.pm
parentca7f349cd51a9bd4a23512a553b2dbaaa34fbd71 (diff)
downloadfml8-9990e892608d33c2d404b81118bd3090c0eaecee.tar.gz
fml8-9990e892608d33c2d404b81118bd3090c0eaecee.tar.bz2
fml8-9990e892608d33c2d404b81118bd3090c0eaecee.zip
nuke ambiguous method and variable name.
num_paragraph() -> paragraph_total() (XXX see "Code Complete"). each variable holding this return value is fixed to $total.
Diffstat (limited to 'fml/lib/Mail/Message/ToHTML.pm')
-rw-r--r--fml/lib/Mail/Message/ToHTML.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/fml/lib/Mail/Message/ToHTML.pm b/fml/lib/Mail/Message/ToHTML.pm
index d30aa471..271be43c 100644
--- a/fml/lib/Mail/Message/ToHTML.pm
+++ b/fml/lib/Mail/Message/ToHTML.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: ToHTML.pm,v 1.80 2006/03/29 10:49:54 tmu Exp $
+# $FML: ToHTML.pm,v 1.81 2006/04/01 02:17:05 fukachan Exp $
#
package Mail::Message::ToHTML;
@@ -17,7 +17,7 @@ my $debug = 0;
my $URL =
"<A HREF=\"http://www.fml.org/software/\">Mail::Message::ToHTML</A>";
-my $version = q$FML: ToHTML.pm,v 1.80 2006/03/29 10:49:54 tmu Exp $;
+my $version = q$FML: ToHTML.pm,v 1.81 2006/04/01 02:17:05 fukachan Exp $;
my $versionid = 0;
if ($version =~ /,v\s+([\d\.]+)\s+/) {
$versionid = "$1";
@@ -815,16 +815,15 @@ return $str;
sub _text_plain_part_safe_print
{
my ($self, $wh, $m) = @_;
- my $i = 0;
- my $n = $m->num_paragraph();
+ my $total = $m->paragraph_total();
# print each paragraph.
- for ($i = 1; $i <= $n ; $i++) {
+ for (my $i = 1; $i <= $total ; $i++) {
my $buf = $m->nth_paragraph($i);
# try to hide domain since the last paragraph must be signature.
if ($self->{ _use_address_mask } eq 'yes') {
- if ($i == $n) {
+ if ($i == $total) {
$buf =~ s/(\w+\@[\w\.]+)/$self->_address_to_gecos($1)/ge;
}
}