use Mail::Field; my $field = Mail::Field->new('Subject', 'some subject text'); my $field = Mail::Field->new(Subject => 'some subject text'); print $field->tag,": ",$field->stringify,"\n"; my $field = Mail::Field->subject('some subject text');
Mail::Field
creates and manipulates fields in MIME headers, collected
within a Mail::Header object. Different field types have their
own sub-class (extension), defining additional useful accessors to the
field content.
People are invited to merge their implementation to special fields into MailTools, to maintain a consistent set of packages and documentation.
All sub-classes should be called Mail::Field::name where name is derived from the tag using these rules.
int((7 + #elements) / #elements)
For an example of this take a look at the definition of the
_header_pkg_name()
subroutine in Mail::Field