OVERLOADED

overload: ""
See "" in Mail::Message::Field.
overload: +0
See +0 in Mail::Message::Field.
overload: <=>
See <=> in Mail::Message::Field.
overload: bool
See bool in Mail::Message::Field.
overload: cmp
See cmp in Mail::Message::Field.
overload: stringification
See stringification in Mail::Message::Field::Full.

METHODS

See METHODS in Mail::Reporter

Constructors

$obj->clone
See clone in Mail::Message::Field.
$class->from( FIELD, OPTIONS )
See from in Mail::Message::Field::Full.
$class->new( DATA )

When the DATA is specified as single line, the content part is considered to be correcly (character) encoded and escaped. Typically, it is a line as read from file. The folding of the line is kept as is.

In case more than one argument is provided, the second is considered the BODY. Attributes and other special things are not defined for unstructured fields, and therefore not valid options. The BODY can be a single string, a single OBJECT, or an array of OBJECTS. The objects are stringified (into a comma separated list). Each BODY element is interpreted with the specified encoding.

When the BODY is empty, the construction of the object fails: undef is returned.

Option Defined in Default

charset

Mail::Message::Field::Full

undef

encoding

Mail::Message::Field::Full

'q'

force

Mail::Message::Field::Full

false

language

Mail::Message::Field::Full

undef

log

Mail::Reporter

'WARNINGS'

trace

Mail::Reporter

'WARNINGS'

charset => STRING
encoding => 'q'|'Q'|'b'|'B'
force => BOOLEAN
language => STRING
log => LEVEL
trace => LEVEL
» Example:
 my $s = Mail::Message::Field::Unstructured->new('Comment', 'Hi!');

 # Use autodetect
 my $s = Mail::Message::Field::Full->new('Comment', 'Hi!');
 my $s = Mail::Message::Field::Full->new('Comment: Hi!');

The field

$obj->isStructured
$class->isStructured
See isStructured in Mail::Message::Field.
$obj->length
See length in Mail::Message::Field.
$obj->nrLines
See nrLines in Mail::Message::Field.
$obj->print( [FILEHANDLE] )
See print in Mail::Message::Field.
$obj->size
See size in Mail::Message::Field.
$obj->string( [WRAP] )
See string in Mail::Message::Field.
$obj->toDisclose
See toDisclose in Mail::Message::Field.

Access to the name

$obj->Name
See Name in Mail::Message::Field.
$obj->name
See name in Mail::Message::Field.
$obj->wellformedName( [STRING] )
See wellformedName in Mail::Message::Field.

Access to the body

$obj->body
See body in Mail::Message::Field.
$obj->decodedBody( OPTIONS )
See decodedBody in Mail::Message::Field::Full.
$obj->folded
See folded in Mail::Message::Field.
$obj->foldedBody( [BODY] )
See foldedBody in Mail::Message::Field.
$obj->stripCFWS( [STRING] )
$class->stripCFWS( [STRING] )
See stripCFWS in Mail::Message::Field.
$obj->unfoldedBody( [BODY, [WRAP]] )
See unfoldedBody in Mail::Message::Field.

Access to the content

$obj->addresses
See addresses in Mail::Message::Field.
$obj->attribute( NAME [, VALUE] )
See attribute in Mail::Message::Field.
$obj->attributes
See attributes in Mail::Message::Field.
$obj->beautify
See beautify in Mail::Message::Field::Full.
$obj->comment( [STRING] )
See comment in Mail::Message::Field.
$obj->createComment( STRING, OPTIONS )
$class->createComment( STRING, OPTIONS )
See createComment in Mail::Message::Field::Full.
$obj->createPhrase( STRING, OPTIONS )
$class->createPhrase( STRING, OPTIONS )
See createPhrase in Mail::Message::Field::Full.
$obj->study
See study in Mail::Message::Field.
$obj->toDate( [TIME] )
$class->toDate( [TIME] )
See toDate in Mail::Message::Field.
$obj->toInt
See toInt in Mail::Message::Field.

Other methods

$obj->dateToTimestamp( STRING )
$class->dateToTimestamp( STRING )
See dateToTimestamp in Mail::Message::Field.

Internals

$obj->consume( LINE | (NAME,BODY|OBJECTS) )
See consume in Mail::Message::Field.
$obj->decode( STRING, OPTIONS )
$class->decode( STRING, OPTIONS )
See decode in Mail::Message::Field::Full.
$obj->defaultWrapLength( [LENGTH] )
See defaultWrapLength in Mail::Message::Field.
$obj->encode( STRING, OPTIONS )
See encode in Mail::Message::Field::Full.
$obj->fold( NAME, BODY, [MAXCHARS] )
$class->fold( NAME, BODY, [MAXCHARS] )
See fold in Mail::Message::Field.
$obj->setWrapLength( [LENGTH] )
See setWrapLength in Mail::Message::Field.
$obj->stringifyData( STRING|ARRAY|OBJECTS )
See stringifyData in Mail::Message::Field.
$obj->unfold( STRING )
See unfold in Mail::Message::Field.

Parsing

$obj->consumeComment( STRING )
$class->consumeComment( STRING )
See consumeComment in Mail::Message::Field::Full.
$obj->consumeDotAtom( STRING )
See consumeDotAtom in Mail::Message::Field::Full.
$obj->consumePhrase( STRING )
$class->consumePhrase( STRING )
See consumePhrase in Mail::Message::Field::Full.
$obj->parse( STRING )
See parse in Mail::Message::Field::Full.
$obj->produceBody
See produceBody in Mail::Message::Field::Full.

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.