[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: dropping messages?
On October 3, 2002 at 00:34, Chad Kouse wrote:
> > use IO::String;
> > require 'mhamain.pl';
> > mhonarc::initialize();
> >
> > my $html_msg = IO::String->new;
> > my @mha_args = ('-quiet',
> > '-single',
> > '-rcfile', '/etc/mimefilters',
> > '-stdout', $html_msg,
> > '/tmp/mk_tmp001.msg');
> >
> > if (mhonarc::process_input(@mha_args)) {
> > die qq/ERROR: mhonarc returned non-zero status: $mhonarc::CODE\n/;
> > }
> >
> > print ${$html_msg->string_ref};
>
> did you mean to say if (!mhonarc::process_input(@mha_args)) ?
Yes, I mistakenly left out the !.
> I did it the way you mentioned (throwing in the ! mentioned just above)
> and I am having a hard time. the rest of my script basically treats
> $htmlmsg as a regular string, and now I'm getting all blanks inserted
> into the databse (I'm shooting blanks :) ) I even tried making a new
> variable and derefrencing it like:
> $htmlNewMsg = ${$html_msg->string_ref};
>
> but still to no avail. Any ideas?
The above code will work since I have a similiar test script I wrote
to verify that IO::String can be used in this manner.
Are you running your script with -w option? My example above
declares $html_msg (note I used an underscore in the name) with my(),
hence it will be lexically scoped to whatever block contains the
above code.
Try doing some debugging. Isolate the call to mhonarc in a well-defined
subroutine so you can test it separately and verify that you are
getting HTML data back.
--ewh
---------------------------------------------------------------------
To sign-off this list, send email to majordomo@mhonarc.org with the
message text UNSUBSCRIBE MHONARC-USERS
[Index of Archives]
[Bugtraq]
[Yosemite News]
[Mhonarc Home]