GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MAIL::BOX::PARSER::PERL (3)

.ds Aq ’

NAME

Mail::Box::Parser::Perl - reading messages from file using Perl

CONTENTS

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 Mail::Box::Parser::C, but will also work on platforms where no C compiler is available.

See documentation in the base class.

METHODS

See documentation in the base class.

    Constructors

See documentation in the base class.
Mail::Box::Parser::Perl-><B>newB>(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

See documentation in the base class.
$obj-><B>fileChangedB>() See The parser in Mail::Box::Parser
$obj-><B>filenameB>() See The parser in Mail::Box::Parser
$obj-><B>fixHeaderErrorsB>([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-><B>restartB>() See The parser in Mail::Box::Parser
$obj-><B>startB>(OPTIONS) See The parser in Mail::Box::Parser
$obj-><B>stopB>() See The parser in Mail::Box::Parser

    Parsing

See documentation in the base class.
$obj-><B>bodyAsFileB>(FILEHANDLE [,CHARS [,LINES]]) See Parsing in Mail::Box::Parser
$obj-><B>bodyAsListB>([,CHARS [,LINES]]) See Parsing in Mail::Box::Parser
$obj-><B>bodyAsStringB>([,CHARS [,LINES]]) See Parsing in Mail::Box::Parser
$obj-><B>bodyDelayedB>([,CHARS [,LINES]]) See Parsing in Mail::Box::Parser
$obj-><B>filePositionB>([POSITION]) See Parsing in Mail::Box::Parser
$obj-><B>lineSeparatorB>() See Parsing in Mail::Box::Parser
$obj-><B>popSeparatorB>() See Parsing in Mail::Box::Parser
$obj-><B>pushSeparatorB>(STRING|REGEXP) See Parsing in Mail::Box::Parser
$obj-><B>readHeaderB>()
$obj-><B>readSeparatorB>(OPTIONS) See Parsing in Mail::Box::Parser

    Internals

See documentation in the base class.
$obj-><B>closeFileB>() See Internals in Mail::Box::Parser
$obj-><B>defaultParserTypeB>([CLASS])
Mail::Box::Parser::Perl-><B>defaultParserTypeB>([CLASS]) See Internals in Mail::Box::Parser
$obj-><B>openFileB>(ARGS) See Internals in Mail::Box::Parser
$obj-><B>takeFileInfoB>() See Internals in Mail::Box::Parser

    Error handling

See documentation in the base class.
$obj-><B>AUTOLOADB>() See Error handling in Mail::Reporter
$obj-><B>addReportB>(OBJECT) See Error handling in Mail::Reporter
$obj-><B>defaultTraceB>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK])
Mail::Box::Parser::Perl-><B>defaultTraceB>([LEVEL]|[LOGLEVEL, TRACELEVEL]|[LEVEL, CALLBACK]) See Error handling in Mail::Reporter
$obj-><B>errorsB>() See Error handling in Mail::Reporter
$obj-><B>logB>([LEVEL [,STRINGS]])
Mail::Box::Parser::Perl-><B>logB>([LEVEL [,STRINGS]]) See Error handling in Mail::Reporter
$obj-><B>logPriorityB>(LEVEL)
Mail::Box::Parser::Perl-><B>logPriorityB>(LEVEL) See Error handling in Mail::Reporter
$obj-><B>logSettingsB>() See Error handling in Mail::Reporter
$obj-><B>notImplementedB>() See Error handling in Mail::Reporter
$obj-><B>reportB>([LEVEL]) See Error handling in Mail::Reporter
$obj-><B>reportAllB>([LEVEL]) See Error handling in Mail::Reporter
$obj-><B>traceB>([LEVEL]) See Error handling in Mail::Reporter
$obj-><B>warningsB>() See Error handling in Mail::Reporter

    Cleanup

See documentation in the base class.
$obj-><B>DESTROYB>() See Cleanup in Mail::Reporter

DIAGNOSTICS

Warning: File $filename changed during access. When a message parser starts working, it takes size and modification time of the file at hand. If the folder is written, it checks wether there were changes in the file made by external programs.

Calling Mail::Box::update() on a folder before it being closed will read these new messages. But the real source of this problem is locking: some external program (for instance the mail transfer agent, like sendmail) uses a different locking mechanism as you do and therefore violates your rights.

Error: Package $package does not implement $method. Fatal error: the specific 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.
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.

SEE ALSO

This module is part of Mail-Box distribution version 2.109, built on August 19, 2013. Website: http://perl.overmeer.net/mailbox/

LICENSE

Copyrights 2001-2013 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MAIL::BOX::PARSER::PERL (3) 2013-08-19

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.