logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

MIME::Parser::Results - results of the last entity parsed

Author

Eryq (eryq@zeegee.com), 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. perl v5.38.2 2024-04-27 MIME::Parser::Results(3pm)

Description

Results from the last MIME::Parser parse.

Name

MIME::Parser::Results - results of the last entity parsed

Public Interface

new Constructor. msgs Instancemethod. 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 Instancemethod. Return all error messages that we logged, in order. A convenience front-end onto msgs(). warnings Instancemethod. Return all warning messages that we logged, in order. A convenience front-end onto msgs(). top_head Instancemethod. Return the topmost header, if we were able to read it. This may be useful if the parse fails.

See Also

MIME::Tools, MIME::Parser

Synopsis

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;

See Also