Re: parsing a mbox file in PERL




Quoth Madhusudhanan Chandrasekaran <mc79@xxxxxxxxxxxxxxx>:

I am trying to parse a mbox file and extract the message's
body. I am using Mail::MboxParser for this purpose. In my
source code, I have

my $mb = Mail::MboxParser->new('some_mailbox',
decode => 'ALL',
parseropts => $parseropts);

with the $parseropts initialized. However, it gives me the
following error message:

Can't locate object method "new" via package "MIME::Parser" at
/usr/local/share/perl/5.8.8/Mail/MboxParser/Mail.pm line 513.

I've MIME::Parser installed and it does seem to have a new method.

Either you haven't, or perl's failing to find it. M::MbP::Mail requires
MIME::Parser in an eval block, so you won't get an error if it can't be
found: not the most helpful thing to do. Try adding a

use MIME::Parser;

line before your

use Mail::MboxParser;

line to get the error message earlier. Then work out why perl can't find
MIME::Parser :).

Ben

.



Relevant Pages

  • parsing a mbox file in PERL
    ... I am trying to parse a mbox file and extract the message's ... I am using Mail::MboxParser for this purpose. ... source code, I have ... decode => 'ALL', ...
    (comp.lang.perl.misc)
  • Re: I dotn understand this error
    ... i llok at line 43 but cant un derstand what the problem. ... It means the offending line isn't in the source code. ... nothing more can be concluded from the error message. ...
    (comp.lang.perl.misc)
  • Re: Changing default print setting in PowerPoint
    ... I'm getting the same error message. ... help if He'd care to share source code. ... >> Set the security to low, reinstalled it, still doesn't work. ...
    (microsoft.public.powerpoint)
  • Re: tar: Error exit delayed from previous errors
    ... now I feel like a moron. ... to extract a tarball without ruining my shopping cart installation a ... the above commandline actually tells tar to create an archive ... Bsdtar gives only the initial error message, ...
    (comp.unix.bsd.freebsd.misc)
  • Re: The format of error messages.
    ... Error Strings have at least two purpose, one is for users, and the ... And the other is for developers. ... What do you think about this error message? ...
    (comp.software.testing)