Ramprasad wrote:
Hello all,
I was running a small test script with MIME::Fast and it simply segfaults. Can anyone tell me why
########################## BEGIN SCRIPT #######################
#!/usr/bin/perl
use MIME::Fast;
my $str = new MIME::Fast::Stream(\*DATA);

use strict; use warnings;

You do not check the return value of MIME::Fast::Stream are you sure you have in $str what you think you have? I am assuming you do have the gmime C libraries installed and available?

http://danconia.org

my $msg = MIME::Fast::Parser::construct_message($str,1);
print "MESSAGE GOT  " . $msg->get_subject() . "\n\n";

__DATA__
 From [EMAIL PROTECTED] Fri Jun  6 19:38:06 2003
Received: from uucp1.netcore.co.in (localhost.localdomain [127.0.0.1])
    by thickserver.emergic.com (8.11.6/8.11.6) with ESMTP id h56E86O06669
    for <mimef>; Fri, 6 Jun 2003 19:38:06 +0530
Date: Fri, 6 Jun 2003 19:38:06 +0530
Message-Id: <[EMAIL PROTECTED]>
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Content-Type: text/plain
Subject: Test Mail

This is a Test Mail
Please Ignore

Regards
Netcore Solutions

########################## END SCRIPT ##################

And this is the error I get

Usage: MIME::Fast::Parser::construct_message(svmixed) at /tmp/fastmime.pl line 4.
Segmentation fault




When I try to use \*STDIN instead of \*DATA I dont get segfault but still I am not able to execute MIME::Fast::Parser::construct_message

I get
Usage: MIME::Fast::Parser::construct_message(svmixed) at
/tmp/fastmime.pl line 4.


I am using linux ( redhat 7.2 ) and perl 5.8.0 with threads and libgmime-2.0

Thanks
Ram




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to