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.

METHODS

See METHODS in Mail::Reporter

Constructors

$obj->clone
See clone in Mail::Message::Field.
$class->new( $data )

If you stick to this flexible class of header fields, you have a bit more facilities than with Mail::Message::Field::Fast. Amongst it, you can specify options with the creation. Possible arguments:

  • new LINE

    ass a LINE as it could be found in a file: a (possibly folded) line which is terminated by a new-line.

  • new NAME, (BODY|OBJECTS), [ATTRIBUTES], OPTIONS

    A set of values which shape the line.

To be able to distinguish the different parameters, you will have to specify the OPTIONS as ARRAY of option pairs, or HASH of options. The ATTRIBUTES are a flat list of key-value pairs. The body is specified as one BODY string, one OBJECT, or a reference to an array of OBJECTS. See Mail::Message::Field:

Option Defined in Default

attributes

[]

comment

undef

log

Mail::Reporter

'WARNINGS'

trace

Mail::Reporter

'WARNINGS'

attributes => ATTRS
Reference to array with list of key-value pairs representing attributes, or reference to a hash containing these pairs. This is an alternative notation for specifying ATTRIBUTES directly as method arguments.
comment => STRING
A pre-formatted list of attributes.
log => LEVEL
trace => LEVEL

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( [$fh] )
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->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->comment( [STRING] )
See comment in Mail::Message::Field.
$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->defaultWrapLength( [$length] )
See defaultWrapLength in Mail::Message::Field.
$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.

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.