Skip Menu |

This queue is for tickets about the Mail-Box CPAN distribution.

Report information
The Basics
Id: 38929
Status: resolved
Priority: 0/
Queue: Mail-Box

People
Owner: Nobody in particular
Requestors: STEVEHA [...] cpan.org
Cc: shardisty [...] realestate.com.au
AdminCc:

Bug Information
Severity: Critical
Broken in: 2.082
Fixed in: (no value)



CC: shardisty [...] realestate.com.au
Subject: "date()" in newer versions of Mail::Box::Mbox::Message
In versions 2.082 & 2.083 of Mail::Box::Mbox::Message, I get the following error that I do not get with identical code in version 2.042: Method date() is not defined for a Mail::Box::Mbox::Message. at blah/Mail-Box-2.083/blib/lib//Mail/Reporter.pm line 230 Mail::Reporter::AUTOLOAD('Mail::Box::Mbox::...') called at blah/Mail-Box-2.083/blib/lib//Mail/Message/Construct.pm line 66 Mail::Message::AUTOLOAD('Mail::Box::Mbox::...') called at ./mbox.pl line 16 Here's the code: my $mbox = Mail::Box::Mbox->new( 'folder' => $someMbox, ); foreach my $message ($mbox->messages('ALL')) { print $message->date() . "\n"; } Cheers :)
Subject: Re: [rt.cpan.org #38929] "date()" in newer versions of Mail::Box::Mbox::Message
Date: Wed, 3 Sep 2008 09:28:38 +0200
To: STEVEHA via RT <bug-Mail-Box [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* STEVEHA via RT (bug-Mail-Box@rt.cpan.org) [080903 00:55]: Show quoted text
> Tue Sep 02 20:55:33 2008: Request 38929 was acted upon. > Transaction: Ticket created by STEVEHA > Queue: Mail-Box > Subject: "date()" in newer versions of Mail::Box::Mbox::Message > > > In versions 2.082 & 2.083 of Mail::Box::Mbox::Message, I get the > following error that I do not get with identical code in version 2.042:
The manual-page says: $obj->date Method has been removed for reasons of consistency. Use timestamp() or $msg->head->get('Date'). Commands like $msg->subject and $msg->from, etc are all smart: they interpret the field content. Their $head->subject and $head->from companions are dumb, returning the pure field content. The $msg->date you used was dumb, so not following the concept. The change was released in version 2.055: Sun May 16 15:41:59 CEST 2004 and suggested by David Golden. -- Regards, MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
No additional remarks received, so probably ignored by the requestor.