MIME::Parser::Results(3pm)

MIME::Parser::Results3pm

Results of the last entity parsed

Usage

Before reading further, you should see MIME::Parser to make sure that you understand where this module fits into the grand scheme of things. Go on, do it now. I'll wait.

Ready? Ok...

   ### Do parse, get results:
   my $entity = eval { $parser->parse(\*STDIN); };
   my $results  = $parser->results;
   ### Get all messages logged:
   @msgs = $results->msgs;
   ### Get messages of specific types (also tests if there were problems):
   $had_errors   = $results->errors;
   $had_warnings = $results->warnings;
   ### Get outermost header:
   $top_head  = $results->top_head;

Overview

Results from the last MIME::Parser parse.

Public interface

new

Constructor.

msgs

Instance method. Return all messages that we logged, in order. Every message is a string beginning with its type followed by ": "; the current types are "debug", "warning", and "error".

errors

Instance method. Return all error messages that we logged, in order. A convenience front-end onto msgs().

warnings

Instance method. Return all warning messages that we logged, in order. A convenience front-end onto msgs().

top_head

Instance method. Return the topmost header, if we were able to read it. This may be useful if the parse fails.

Releases

13 releases since Debian 3.0 (Woody); the text changed 11 times.

  1. 3.0
  2. 3.1
  3. 4.0
  4. 5.0
  5. 6.0
  6. 7
  7. 8
  8. 9
  9. 10–11
  10. 12
  11. 13
  12. Arch

Author

Eryq ([email protected]), ZeeGee Software Inc (http://www.zeegee.com).

All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

From perl-mime-tools 5.518-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.