[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-mailbox
Subject:    Re: AUTOLOAD error when accessing part
From:       "Mike Cudmore" <Mike.Cudmore () dft ! gsi ! gov ! uk>
Date:       2003-03-14 15:28:26
[Download RAW message or body]

many thanks,

I can confirm this worked over my test data.

Many thanks for this fast fix and the help on the other points I raised
yesterday.


Regards
Mike Cudmore
GSI & Intranet Connectivity Team

>>> Mark Overmeer <Mark@Overmeer.net> 03/14/03 01:35pm >>>
* Mike Cudmore (Mike.Cudmore@dft.gsi.gov.uk) [030313 17:05]:
> the following error occurs around due to the 
> 	foreach $part ($msg->body->parts) 

> errors are
> # ./decode4.pl /var/spool/mail/root
> message 1
> Method parts() is not defined for a Mail::Reporter.
>         Mail::Reporter::AUTOLOAD('Mail::Reporter') called at
> /usr/local/lib/perl5/site_perl/5.8.0/Mail/Message/Body.pm line 284
>         Mail::Message::Body::AUTOLOAD('Mail::Message::Bo...') called
at
> (eval
> 22) line 29

This was caused by a little confusing about what multi-parts are...
$msg->head->isMultipart returned true for multipart/* and
message/rfc822
types.... which is not correct.

Mail::Message::Head:

 sub isMultipart()
 {   my $type = shift->get('Content-Type');
   - $type && $type->body =~ m[^(multipart/|message/rfc822)]i;
   + $type && $type->body =~ m[^multipart/]i;
 }
-- 
               MarkOv       %-]

------------------------------------------------------------------------
drs Mark A.C.J. Overmeer                                MARKOV
Solutions
       Mark@Overmeer.net                         
solutions@overmeer.net 
http://Mark.Overmeer.net                  
http://solutions.overmeer.net 

PLEASE NOTE: THE ABOVE MESSAGE WAS RECEIVED FROM THE INTERNET.

On entering the GSI, this email was scanned for viruses by the
Government Secure Intranet (GSI) virus scanning service supplied
exclusively by Cable & Wireless in partnership with MessageLabs.

GSI users see http://www.gsi.gov.uk/main/new2002notices.htm for further
details. In case of problems, please call your organisational IT
helpdesk.


*********************************************************************
This E-mail and any files transmitted with it are private and
intended solely for the use of the individual or entity to whom
they are addressed.  If you are not the intended recipient,
the E-mail and any files have been transmitted to you in error
and any copying, distribution or other use of the information
contained in them is strictly prohibited.

Nothing in this E-mail message amounts to a contractual
or other legal commitment on the part of the Government
unless confirmed by a communication signed on behalf of
the Secretary of State.

The Department's computer systems may be monitored 
and communications carried on them recorded, to secure 
the effective operation of the system and for other lawful
purposes.
*********************************************************************


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic