From 9990e892608d33c2d404b81118bd3090c0eaecee Mon Sep 17 00:00:00 2001 From: fukachan Date: Sat, 15 Apr 2006 06:33:00 +0000 Subject: nuke ambiguous method and variable name. num_paragraph() -> paragraph_total() (XXX see "Code Complete"). each variable holding this return value is fixed to $total. --- fml/lib/Mail/Message/ToHTML.pm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'fml/lib/Mail/Message/ToHTML.pm') 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 = "Mail::Message::ToHTML"; -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; } } -- cgit v1.2.1