Mail::Box error? Processing multipart message read from mbox
Tim Bruijnzeels <[email protected]> Fri, 20 Jan 2006 19:59:28 +0100
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I keep running into the following error when processing a multipart message:
Can't call method "parser" on an undefined value at
/usr/lib/perl5/site_perl/5.8.5/Mail/Box/File/Message.pm line 93.
I am trying, well succeeding til I hit that error, to read an mbox. The
relevant code in my script:
if ($message->isMultipart) {
debug("message is multipart, getting them..");
my Mail::Message::Part $part;
my $i = 1;
foreach $part ($message->body->parts) {
debug("processing part $i");
$body .= parse_message($part, $config_hash_ref);
$i++;
}
}
I have found some conflicting info about the actual splitting
procedure.. specifically whether I should use: $message->body->parts, or
$message->parts or $message->parts() is not entirely clear to me. But
the error is the same in all cases.
In any case what's more confusing to me is that as far as I can tell my
code is not causing this error (though I won't say it couldn't be). The
$message object is defined, it tells me it's multipart, but as soon as I
try to split it, it barfs. The undefined value seems to be in
Mail/Box/File/Message somewhere, or somewhere else in Mail::Box.. but my
knowledge about its internals is very, very limited. Any ideas about
what's causing this?
MailBox 2.063, installed through CPAN today. On a RedHat Enterprise
Linux 4 system.
Regards,
Tim Bruijnzeels