NAME
Mail::Box::Parser::Perl - reading messages from file using Perl
CLASS INHERITANCE
Mail::Box::Parser::Perl
is a Mail::Box::Parser
is a Mail::Reporter
SYNOPSIS
DESCRIPTION
The Mail::Box::Parser::Perl implements parsing of messages in Perl. This may be a little slower than the C
based parser, but will also work on platforms where no C compiler is available.
METHODS
Initiation
- new OPTIONS
-
(Class method)
OPTION DEFAULT file undef filename <required> fix_header_errors <false> log 'WARNINGS' mode 'r' trace 'WARNINGS' trusted <false>
- file => FILE-HANDLE
-
See Mail::Box::Parser::new(file)
- filename => FILENAME
-
See Mail::Box::Parser::new(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
-
See Mail::Reporter::new(log)
- mode => OPENMODE
-
See Mail::Box::Parser::new(mode)
- trace => LEVEL
-
See Mail::Reporter::new(trace)
- 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
- defaultParserType [CLASS]
-
See Mail::Box::Parser::defaultParserType()
- fileChanged
-
See Mail::Box::Parser::fileChanged()
- filename
-
See Mail::Box::Parser::filename()
- restart
-
See Mail::Box::Parser::restart()
- start OPTIONS
-
See Mail::Box::Parser::start()
- stop
-
See Mail::Box::Parser::stop()
- takeFileInfo
-
See Mail::Box::Parser::takeFileInfo()
Parsing
- bodyAsFile FILEHANDLE [,CHARS [,LINES]]
-
See Mail::Box::Parser::bodyAsFile()
- bodyAsList [,CHARS [,LINES]]
-
See Mail::Box::Parser::bodyAsList()
- bodyAsString [,CHARS [,LINES]]
-
See Mail::Box::Parser::bodyAsString()
- bodyDelayed [,CHARS [,LINES]]
-
See Mail::Box::Parser::bodyDelayed()
- filePosition [POSITION]
-
See Mail::Box::Parser::filePosition()
- 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.Examples:
$folder->parser->fixHeaderErrors(1); my $folder = $mgr->open('folder', fix_header_errors => 1);
- lineSeparator
-
See Mail::Box::Parser::lineSeparator()
- popSeparator
-
See Mail::Box::Parser::popSeparator()
- pushSeparator STRING|REGEXP
-
See Mail::Box::Parser::pushSeparator()
- readHeader
- readSeparator OPTIONS
-
See Mail::Box::Parser::readSeparator()
Reading and Writing [internals]
Logging and Tracing
- defaultTrace [LEVEL, [LEVEL]
-
See Mail::Reporter::defaultTrace()
- errors
-
See Mail::Reporter::errors()
- log [LEVEL [,STRINGS]]
-
See Mail::Reporter::log()
- report [LEVEL]
-
See Mail::Reporter::report()
- reportAll [LEVEL]
-
See Mail::Reporter::reportAll()
- trace [LEVEL]
-
See Mail::Reporter::trace()
- warnings
-
See Mail::Reporter::warnings()
Other Methods
- AUTOLOAD
-
See Mail::Reporter::AUTOLOAD()
- DESTROY
-
See Mail::Reporter::DESTROY()
- inGlobalDestruction
-
See Mail::Reporter::inGlobalDestruction()
- logPriority LEVEL
-
See Mail::Reporter::logPriority()
- logSettings
-
See Mail::Reporter::logSettings()
- notImplemented
-
See Mail::Reporter::notImplemented()
SEE ALSO
A good start to read is Mail::Box-Overview. More documentation and a mailinglist are available from the project's website at http://perl.overmeer.net/mailbox/.
AUTHOR
Written by Mark Overmeer (mark@overmeer.net) with the help of many. See the ChangeLog for details.
VERSION
This code is beta, version 2.040.
Copyright (c) 2001-2003 by the authors. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.