Re: Suppressing warnings.
Mark Overmeer <[email protected]>
| Newsgroups | gmane.comp.lang.perl.modules.mail-box |
|---|---|
| Organization | MARKOV Solutions |
| Message-ID | <[email protected]> |
* Scott Lillibridge ([email protected]) [040311 23:51]: > I get a lot of WARNINGS about different messages with the same id. I would > like to suppress this, and only get ERROR messages. There is a difference between the 'trace' and 'log' option. The 'log' indicates which errors are stored inside the module, where the 'trace' controls the immediate print-out. > --snip-- > my $folder = Mail::Box::Mbox->new( log => 'ERROR', > > #for( my $i=$count-1; $i >=0; $i-- ) { > for( my $i = 0; $i < $count; $i++ ) { > my $msg = $folder->message($i); > if ( ( $current_time - $msg->timestamp ) > $age_seconds ) { > $folder->message($i)->delete; > } > } foreach my $msg ($folder->messages) { $msg->delete if $current_time - $msg->timestamp > $age_seconds; } -- MarkOv ------------------------------------------------------------------------ drs Mark A.C.J. Overmeer MARKOV Solutions [email protected] [email protected] http://Mark.Overmeer.net http://solutions.overmeer.net