=encoding utf8

=head1 NAME

Mail::Box::Parser::C - Parsing folders for MailBox with C routines

=head1 INHERITANCE

 Mail::Box::Parser::C
   is a Mail::Box::Parser
   is a Mail::Reporter

 Mail::Box::Parser::C
   is a DynaLoader

=head1 SYNOPSIS

=head1 DESCRIPTION

The L<Mail::Box::Parser|Mail::Box::Parser>::C implements parsing of messages in ANSI C,
using Perl's XS extension facility.

This is an optional module for MailBox, and will (once installed)
automatically be used by MailBox to parse e-mail message content when
the message is supplied as file-handle.  In all other cases,
MailBox will use L<Mail::Box::Parser::Perl>.

B<Be aware:>
This module versions 4.0 and up is not fully compatible with older releases:
mainly the exception handling has changed.  When you need to upgrade, please
read F<https://github.com/markov2/perl5-Mail-Box/wiki/>
B<Version 3 is still maintained> and may see new releases as well.

Extends L<"DESCRIPTION" in Mail::Box::Parser|Mail::Box::Parser/"DESCRIPTION">.

=head1 METHODS

Extends L<"METHODS" in Mail::Box::Parser|Mail::Box::Parser/"METHODS">.

=head2 Constructors

Extends L<"Constructors" in Mail::Box::Parser|Mail::Box::Parser/"Constructors">.

=over 4

=item $class-E<gt>B<new>(%options)

Inherited, see L<Mail::Box::Parser/"METHODS">

=back

=head2 Attributes

Extends L<"Attributes" in Mail::Box::Parser|Mail::Box::Parser/"Attributes">.

=over 4

=item $obj-E<gt>B<boxnr>()

The number internally used by the C implementation to administer a
single mail folder access.

=item $any-E<gt>B<defaultParserType>( [$class] )

Inherited, see L<Mail::Box::Parser/"Attributes">

=item $obj-E<gt>B<fixHeaderErrors>( [BOOLEAN] )

Inherited, see L<Mail::Box::Parser/"Attributes">

=item $obj-E<gt>B<trusted>()

Inherited, see L<Mail::Box::Parser/"Attributes">

=back

=head2 Parsing

Extends L<"Parsing" in Mail::Box::Parser|Mail::Box::Parser/"Parsing">.

=over 4

=item $obj-E<gt>B<bodyAsFile>( $fh [$chars, [$lines]] )

Inherited, see L<Mail::Box::Parser/"Parsing">

=item $obj-E<gt>B<bodyAsList>( [$chars, [$lines]] )

Inherited, see L<Mail::Box::Parser/"Parsing">

=item $obj-E<gt>B<bodyAsString>( [$chars, [$lines]] )

Inherited, see L<Mail::Box::Parser/"Parsing">

=item $obj-E<gt>B<bodyDelayed>( [$chars, [$lines]] )

Inherited, see L<Mail::Box::Parser/"Parsing">

=item $obj-E<gt>B<lineSeparator>()

Inherited, see L<Mail::Box::Parser/"Parsing">

=item $obj-E<gt>B<readHeader>()

Inherited, see L<Mail::Box::Parser/"Parsing">

=item $obj-E<gt>B<stop>()

Inherited, see L<Mail::Box::Parser/"Parsing">

=back

=head2 Error handling

Extends L<"Error handling" in Mail::Box::Parser|Mail::Box::Parser/"Error handling">.

=over 4

=item $obj-E<gt>B<AUTOLOAD>()

Inherited, see L<Mail::Reporter/"Error handling">

=item $obj-E<gt>B<notImplemented>()

Inherited, see L<Mail::Reporter/"Error handling">

=back

=head2 Cleanup

Extends L<"Cleanup" in Mail::Box::Parser|Mail::Box::Parser/"Cleanup">.

=over 4

=item $obj-E<gt>B<DESTROY>()

Inherited, see L<Mail::Reporter/"Cleanup">

=back

=head1 DIAGNOSTICS

=over 4

=item Error: class $package does not implement method $method.

Fatal error: the specific C<$package> (or one of its superclasses) does not
implement this method where it should. This message means that some other
related classes do implement this method however the class at hand does
not.  Probably you should investigate this and probably inform the author
of the package.
Cast by C<notImplemented()>

=item Error: parser $type does not extend $pkg.

Cast by C<defaultParserType()>

=item Warning: unexpected end of header in $source: $line

While parsing a message from the specified source (usually a file name),
the parser found a syntax error.  According to the MIME specification in the
RFCs, each header line must either contain a colon, or start with a blank
to indicate a folded field.  Apparently, this header contains a line which
starts on the first position, but not with a field name.

By default, parsing of the header will be stopped.  If there are more header
lines after the erroneous line, they will be added to the body of the message.
In case of L<new(fix_header_errors)|Mail::Box::Parser/"METHODS"> set, the parsing of the header will be continued.
The erroneous line will be added to the preceding field.
Cast by C<readHeader()>

=back

=head1 SEE ALSO

This module is part of Mail-Box-Parser-C version 4.00,
built on December 11, 2025. Website: F<http://perl.overmeer.net/CPAN/>

=head1 LICENSE

For contributors see file ChangeLog.

This software is copyright (c) 2002-2025 by Mark Overmeer.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

