user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 1/5] view: Email::Address cache purge is optional
@ 2014-08-28  2:47  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2014-08-28  2:47 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

We will reuse the html_footer function in a nested index.
---
 lib/PublicInbox/View.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 8bc28cd..ab607a0 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -30,7 +30,7 @@ sub msg_html {
 	headers_to_html_header($mime, $full_pfx) .
 		multipart_text_as_html($mime, $full_pfx) .
 		'</pre><hr />' . PRE_WRAP .
-		html_footer($mime) . $footer .
+		html_footer($mime, 1) . $footer .
 		'</pre></body></html>';
 }
 
@@ -204,7 +204,7 @@ sub headers_to_html_header {
 }
 
 sub html_footer {
-	my ($mime) = @_;
+	my ($mime, $purge) = @_;
 	my %cc; # everyone else
 	my $to; # this is the From address
 
@@ -219,7 +219,7 @@ sub html_footer {
 			$to ||= $dst;
 		}
 	}
-	Email::Address->purge_cache;
+	Email::Address->purge_cache if $purge;
 
 	my $subj = $mime->header('Subject') || '';
 	$subj = "Re: $subj" unless $subj =~ /\bRe:/;
-- 
EW


^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-08-28  2:47  7% [PATCH 1/5] view: Email::Address cache purge is optional Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).