From 28ee19c32a1ecf8e22f30e8f9de860695f4fb30c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 29 Aug 2015 21:30:27 +0000 Subject: avoid length in boolean context Perl does not currently optimize for this. ref (from p5p): http://mid.gmane.org/D5C27970-9176-4C7A-8B99-7D78360E67A2@pobox.com --- lib/PublicInbox/Filter.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/Filter.pm') diff --git a/lib/PublicInbox/Filter.pm b/lib/PublicInbox/Filter.pm index 0b1ec911..c0985ddd 100644 --- a/lib/PublicInbox/Filter.pm +++ b/lib/PublicInbox/Filter.pm @@ -211,7 +211,7 @@ sub collapse { $mime->header_set('Content-Type', $part->content_type); $mime->body_set($part->body_raw); my $cte = $part->header('Content-Transfer-Encoding'); - if (defined($cte) && length($cte)) { + if (defined($cte) && $cte ne '') { $mime->header_set('Content-Transfer-Encoding', $cte); } mark_changed($mime); -- cgit v1.2.3-24-ge0c7