Subject: | Error in debug_structure: uninitialized variable reference |
Line 397 (within the debug_structure function) throws and uninitialized
variable error under some conditions. Here is a patch that fixes the error:
$ diff -u /usr/lib/perl5/site_perl/5.8.8/Email/MIME.pm{.orig,}
--- /usr/lib/perl5/site_perl/5.8.8/Email/MIME.pm.orig 2012-07-22
18:11:27.000000000 -0500
+++ /usr/lib/perl5/site_perl/5.8.8/Email/MIME.pm 2013-01-03
11:32:48.000000000 -0600
@@ -394,7 +394,7 @@
my ($self, $level) = @_;
$level ||= 0;
my $rv = " " x (5 * $level);
- $rv .= "+ " . $self->content_type . "\n";
+ $rv .= "+ " . ($self->content_type ? $self->content_type : "") . "\n";
my @parts = $self->parts;
if (@parts > 1) { $rv .= $_->debug_structure($level + 1) for @parts; }
return $rv;