in reply to Problems displaying a single message with Mail::Box

Don't ask me why, but the Mail::Box documentation appears to be wrong somehow, or perl's behaviour has changed while the documentation hasn't.
$message is a Mail::Box::Mbox::Message object, which can't be printed directly.

Use $message->print(), or $message->head() and $message->body() if you need a scalar.

I think some older perl parsed print $folder->message(0) as $folder->message(0)->print, but it does CORE::print($folder->message(0)).

2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$

Replies are listed 'Best First'.
Re: Re: Problems displaying a single message with Mail::Box
by BazB (Priest) on Dec 20, 2001 at 02:41 UTC

    Juerd - Thanks - this does work, but I'm a bit puzzled - where is this documented?

    $folder->message($msg_num)->print;
    Prints the message out just fine.
    Is this something that I should consider emailling the author/maintainer about?

    Cheers.

    Baz.

      The available methods are documented in Mail::Box::Mbox::Message's documentation.

      You could mail the maintainer about print $folder->message($num) not working.

      2;0 juerd@ouranos:~$ perl -e'undef christmas' Segmentation fault 2;139 juerd@ouranos:~$