|
Consider this snippet, taken pretty directly from the pod examples:
my $mail = Email::MIME->new( $message );
my $stripper = Email::MIME::Attachment::Stripper->new($mail);
my Email::MIME $txt = $stripper->message;
my @attachments = $stripper->attachments;
Problem is it creates this noise:
Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/Email/MIME
.pm line 90, <GEN0> line 26454.
... for every message.
no warnings 'uninitialized'; didn't help
So, I made this change to head off the errors:
sub header {
my $header = shift->SUPER::header(@_) || ''; # this is my change
if ($header !~ /=\?/) { return $header } # this is line 90
if (eval { require Encode }) {
Encode::decode("MIME-Header", $header);
} else {
require MIME::Words;
MIME::Words::decode_mimewords($header);
}
}
Any thoughts?
|