about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-01-18 23:50:57 +0000
committerEric Wong <e@80x24.org>2017-01-18 23:56:00 +0000
commitb6f6d1e1408ebf9ad71b9c912a82e3f92ed5d52c (patch)
treead379ed361c21876a86af1ca2a13d5f0ad26f3a0 /lib
parent1975aeaebbbdd628849964de42e183d04240c4e0 (diff)
downloadpublic-inbox-b6f6d1e1408ebf9ad71b9c912a82e3f92ed5d52c.tar.gz
We must call Email::Simple methods directly in our monkey patch
for Email::MIME to call the intended method.  Using SUPER in our
subclass would instead hit a different, unintended method in
Email::MIME.

Reported-by: Junio C Hamano <gitster@pobox.com>
	<xmqq4m0wb43w.fsf@gitster.mtv.corp.google.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/MIME.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/MIME.pm b/lib/PublicInbox/MIME.pm
index 792fffd6..54925a85 100644
--- a/lib/PublicInbox/MIME.pm
+++ b/lib/PublicInbox/MIME.pm
@@ -37,7 +37,7 @@ sub parts_multipart {
   return $self->parts_single_part
     unless $boundary and $self->body_raw =~ /^--\Q$boundary\E\s*$/sm;
 
-  $self->{body_raw} = $self->SUPER::body;
+  $self->{body_raw} = Email::Simple::body($self);
 
   # rfc1521 7.2.1
   my ($body, $epilogue) = split /^--\Q$boundary\E--\s*$/sm, $self->body_raw, 2;
@@ -45,13 +45,13 @@ sub parts_multipart {
   # Split on boundaries, but keep blank lines after them intact
   my @bits = split /^--\Q$boundary\E\s*?(?=$self->{mycrlf})/m, ($body || '');
 
-  $self->SUPER::body_set(undef);
+  Email::Simple::body_set($self, undef);
 
   # If there are no headers in the potential MIME part, it's just part of the
   # body.  This is a horrible hack, although it's debatable whether it was
   # better or worse when it was $self->{body} = shift @bits ... -- rjbs,
   # 2006-11-27
-  $self->SUPER::body_set(shift @bits) if ($bits[0] || '') !~ /.*:.*/;
+  Email::Simple::body_set($self, shift @bits) if ($bits[0] || '') !~ /.*:.*/;
 
   my $bits = @bits;