Re: Method fileLocation() redux.
Mark Overmeer <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* Roderick A. Anderson ([email protected]) [040402 20:14]: > I am suddenly getting error messages like this: > > Method fileLocation() is not defined for a Mail::Message::Part. > Mail::Reporter::AUTOLOAD('Mail::Message::Pa...') called at > /usr/lib/perl5/site_perl/5.8.0/Mail/Message/Construct.pm line 61 > > This is a script that pulls the From, Subject, date, and size information > from a mbox format spam folder. (I used to be on this list but then > didn't have problems for so long I got off ... I'm back :-) > > This is Mail-Box version 2.050. Maybe you can show us a piece of the code. fileLocation() is only defined on headers and bodies, but it gets called on a part (which contains a head and a body) I may have found a buglet on this one, in Mail/Message/Body/Multipart.pm: $self->{MMBM_epilogue} = $epilogue if defined $epilogue; my $end = defined $epilogue ? ($epilogue->fileLocation)[1] : @parts ? ($parts[-1]->body->fileLocation)[1] ^^^^^^ required : defined $preamble ? ($preamble->fileLocation)[1] : $begin; Nearly all multipart message have some kind of epilogue, but maybe some erroneous multiparts (for instance viruses) do not end cleanly. Any chance that this helps? -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net