METHODS

See METHODS in Mail::Reporter

Constructors

$class->new( OPTIONS )
Option Defined in Default

file

Mail::Box::Parser

undef

filename

Mail::Box::Parser

<required>

fix_header_errors

<false>

log

Mail::Reporter

'WARNINGS'

mode

Mail::Box::Parser

'r'

trace

Mail::Reporter

'WARNINGS'

trusted

<false>

file => FILE-HANDLE
filename => FILENAME
fix_header_errors => BOOLEAN
When header errors are detected, the parsing of the header will be stopped. Other header lines will become part of the body of the message. Set this flag to have the erroneous line added to the previous header line.
log => LEVEL
mode => OPENMODE
trace => LEVEL
trusted => BOOLEAN
Is the input from the file to be trusted, or does it require extra tests. Related to Mail::Box::new(trusted).

The parser

$obj->fileChanged
See fileChanged in Mail::Box::Parser.
$obj->filename
See filename in Mail::Box::Parser.
$obj->fixHeaderErrors( [BOOLEAN] )

If set to true, parsing of a header will not stop on an error, but attempt to add the erroneous this line to previous field. Without BOOLEAN, the current setting is returned.

» Example:
 $folder->parser->fixHeaderErrors(1);
 my $folder = $mgr->open('folder', fix_header_errors => 1);
$obj->restart
See restart in Mail::Box::Parser.
$obj->start( OPTIONS )
See start in Mail::Box::Parser.
$obj->stop
See stop in Mail::Box::Parser.

Parsing

$obj->bodyAsFile( FILEHANDLE [,CHARS [,LINES]] )
See bodyAsFile in Mail::Box::Parser.
$obj->bodyAsList( [,CHARS [,LINES]] )
See bodyAsList in Mail::Box::Parser.
$obj->bodyAsString( [,CHARS [,LINES]] )
See bodyAsString in Mail::Box::Parser.
$obj->bodyDelayed( [,CHARS [,LINES]] )
See bodyDelayed in Mail::Box::Parser.
$obj->filePosition( [POSITION] )
See filePosition in Mail::Box::Parser.
$obj->lineSeparator
See lineSeparator in Mail::Box::Parser.
$obj->popSeparator
See popSeparator in Mail::Box::Parser.
$obj->pushSeparator( STRING|REGEXP )
See pushSeparator in Mail::Box::Parser.
$obj->readHeader
» 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 new(fix_headers) set, the parsing of the header will be continued. The erroneous line will be added to the preceding field.

$obj->readSeparator( OPTIONS )
See readSeparator in Mail::Box::Parser.

Internals

$obj->closeFile
See closeFile in Mail::Box::Parser.
$obj->defaultParserType( [CLASS] )
$class->defaultParserType( [CLASS] )
See defaultParserType in Mail::Box::Parser.
$obj->openFile( ARGS )
See openFile in Mail::Box::Parser.
$obj->takeFileInfo
See takeFileInfo in Mail::Box::Parser.

Error handling

$obj->AUTOLOAD
See AUTOLOAD in Mail::Reporter.
$obj->addReport( OBJECT )
See addReport in Mail::Reporter.
$obj->defaultTrace( [LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK] )
$class->defaultTrace( [LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK] )
See defaultTrace in Mail::Reporter.
$obj->errors
See errors in Mail::Reporter.
$obj->log( [LEVEL [,STRINGS]] )
$class->log( [LEVEL [,STRINGS]] )
See log in Mail::Reporter.
$obj->logPriority( LEVEL )
$class->logPriority( LEVEL )
See logPriority in Mail::Reporter.
$obj->logSettings
See logSettings in Mail::Reporter.
$obj->notImplemented
See notImplemented in Mail::Reporter.
$obj->report( [LEVEL] )
See report in Mail::Reporter.
$obj->reportAll( [LEVEL] )
See reportAll in Mail::Reporter.
$obj->trace( [LEVEL] )
See trace in Mail::Reporter.
$obj->warnings
See warnings in Mail::Reporter.

Cleanup

$obj->DESTROY
See DESTROY in Mail::Reporter.
$obj->inGlobalDestruction
See inGlobalDestruction in Mail::Reporter.