Re: parsing a mbox file in PERL



[quoting fixed. please don't top-post]

Quoth Madhusudhanan Chandrasekaran <mc79@xxxxxxxxxxxxxxx>:
On Wed, 28 Nov 2007, Jim Gibson wrote:
In article <Pine.SOL.4.56.0711281938240.20060@xxxxxxxxxxxxxxxxxxxxxx>,
Madhusudhanan Chandrasekaran <mc79@xxxxxxxxxxxxxxx> wrote:

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.

Lines 511-515 of Mail::MboxParser.pm are as follows:

<snip>

... and it looks like the code is not checking if the "require
MIME::Parser" worked :^(

Make sure MIME::Parser is installed properly. Try putting

warn("No MIME::Parser $@") if $@;

This isn't in general a very safe construction. There are too many ways
(destructors, signal handlers, etc.) in which $@ can get messed up.
Better is to make sure the eval returns true, and test for that:

eval {
require MIME::Parser;
1; # 5.8.0 has a bug where require in eval can return false
} or warn "No MIME::Parser: $@";

Of course, if something untoward happens the error message will be
wrong, but that's better than failing to catch the error at all.

after the eval.

Thanks for the response. It's like pandoras box,
more emerge. I get the following message that
Mail::Header is missing. But I cannot install
it for some weird reason -- The exact error I get
is as:

/bin/tar: MailTools-2.01: time stamp 2007-11-28 04:48:57 is
253591.077197246 s in the future

Your computer's clock is wrong. make depends on having the clock at
least approximately right, so you will need to fix this.

<snip>
==> Your Makefile has been rebuilt. <==
==> Please rerun the /usr/bin/make command. <==
false

MakeMaker is asking you to re-run make: if you do, it's possible it will
work correctly this time. It's probably better to fix your clock,
though.

Ben

.



Relevant Pages

  • Re: CD/DVD wont write CDs
    ... > I found all the articles from Microsoft on how to fix this problem and none of them worked. ... They tried to install my original CDRW drive, which also won't write CDs anymore. ... They also tried all the fixes on Microsoft's website. ... It does not change the issue or give me the Recording tab bacl. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Trying to understand what WU does...
    ... does it install and do I not have any bad symptoms ... - if I choose to download fixes manually does it matter where I ... original fix definitions) can I delete ... How do I prevent a restore ...
    (microsoft.public.windowsupdate)
  • Re: Explorer restarts desperate for a solution
    ... >diagnose an ongoing issue isn't beneficial. ... >the "Don't Give Up, I'll fix this SOB". ... I'd first do a Repair install of XP. ... with a repeatable bug who actually wanted to help me find and fix it. ...
    (microsoft.public.windowsxp.general)
  • Re: Lost welcome screen XP
    ... I finally did get it to install last night. ... I edited the registry, changing the ... loaded SP3, hoping it would fix the problem. ...
    (microsoft.public.windowsxp.basics)
  • Re: Mal...where?
    ... The Real Truth http://pcbutts1-therealtruth.blogspot.com/ ... They do NOT have the expertise or knowledge to fix your issue. ... that a Repair Install will NOT fix this! ... Number of infections? ...
    (microsoft.public.windowsxp.general)