Subject: | Mail::Message::Head::Complete::guessTimestamp complains for mails with no 'date' or 'received' headers |
I got this report against Mail::Box in Debian - The submitter didn't include the version information. This bug is quite dated, though, but you can look at the original bug report at:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=257162
------------------
sub guessTimestamp()
{ my $self = shift;
return $self->{MMH_timestamp} if exists $self->{MMH_timestamp};
my $stamp;
if(my $date = $self->get('date'))
{ $stamp = Mail::Message::Field->dateToTimestamp($date);
}
unless($stamp)
{ foreach (reverse $self->get('received'))
{ $stamp = Mail::Message::Field->dateToTimestamp($_->comment);
last if $stamp;
}
}
$self->{MMH_timestamp} = $stamp > 0 ? $stamp : undef;
}
If neither header is present, $stamp is undef, so you get a warning on
'$stamp > 0'.