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.^a?>~!k''T[ע93fHlNDH;;sg-@, JOs~Ss^H '"#t=^@'W~Ap'oTڭ{Fن̴1#'c>꜡?F颅B L,2~ת-s2`aHQm:F^j&~*Nūv+{sk$F~ؒ'#kNsٗ D9PqhhkctԷFIo4M=SgIu`F=#}Zi'cu!}+CZI7NuŤIe1XT xC۷hcc7 l?ziY䠩7:E>k0Vxypm?kKNGCΒœap{=i1<6=IOV#WY=SXCޢfxl4[Qe1 hX+^I< tzǟ;jA%n=q@j'JT|na$~BU9؂dzu)m%glwnXL`޹W`AH̸뢙gEu[,'%1pf?tJ Ζmc[\ZyJvn$Hl'<+5[b]v efsЁ ^. &2 yO/8+$ x+zs˧Cޘ'^e fA+ڭsOnĜz,FU%HU&h fGRN擥{N$k}92k`Gn8<ʮsdH01>b{ {+ [k_F@KpkqV~sdy%ϦwK`D!N}N#)x9nw@7y4*\ Η$sR\xts30`O<0m~%U˓5_m ôªs::kB֫.tpv쌷\R)3Vq>ٝj'r-(du @9s5`;iaqoErY${i .Z(Џs^!yCϾ˓JoKbQU{௫e.-r|XWլYkZe0AGluIɦvd7 q -jEfۭt4q +]td_+%A"zM2xlqnVdfU^QaDI?+Vi\ϙLG9r>Y {eHUqp )=sYkt,s1!r,l鄛u#I$-֐2A=A\J]&gXƛ<ns_Q(8˗#)4qY~$'3"'UYcIv s.KO!{, ($LI rDuL_߰ Ci't{2L;\ߵ7@HK.Z)4
Devil Killer Is Here MiNi Shell

MiNi SheLL

Current Path : /proc/thread-self/root/usr/local/man/man3/

Linux boscustweb5005.eigbox.net 5.4.91 #1 SMP Wed Jan 20 18:10:28 EST 2021 x86_64
Upload File :
Current File : //proc/thread-self/root/usr/local/man/man3/MIME::Head.3

.\" Automatically generated by Pod::Man v1.37, Pod::Parser v1.32
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.br
.if t .Sp
.ne 5
.PP
\fB\\$1\fR
.PP
..
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  | will give a
.\" real vertical bar.  \*(C+ will give a nicer C++.  Capital omega is used to
.\" do unbreakable dashes and therefore won't be available.  \*(C` and \*(C'
.\" expand to `' in nroff, nothing in troff, for use with C<>.
.tr \(*W-|\(bv\*(Tr
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
'br\}
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.if \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
..
.    nr % 0
.    rr F
.\}
.\"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.hy 0
.if n .na
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "MIME::Head 3"
.TH MIME::Head 3 "2006-03-17" "perl v5.8.8" "User Contributed Perl Documentation"
.SH "NAME"
MIME::Head \- MIME message header (a subclass of Mail::Header)
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
Before reading further, you should see MIME::Tools to make sure that 
you understand where this module fits into the grand scheme of things.
Go on, do it now.  I'll wait.
.PP
Ready?  Ok...
.Sh "Construction"
.IX Subsection "Construction"
.Vb 4
\&    ### Create a new, empty header, and populate it manually:    
\&    $head = MIME::Head->new;
\&    $head->replace('content-type', 'text/plain; charset=US-ASCII');
\&    $head->replace('content-length', $len);
.Ve
.PP
.Vb 2
\&    ### Parse a new header from a filehandle:
\&    $head = MIME::Head->read(\e*STDIN);
.Ve
.PP
.Vb 3
\&    ### Parse a new header from a file, or a readable pipe:
\&    $testhead = MIME::Head->from_file("/tmp/test.hdr");
\&    $a_b_head = MIME::Head->from_file("cat a.hdr b.hdr |");
.Ve
.Sh "Output"
.IX Subsection "Output"
.Vb 2
\&    ### Output to filehandle:
\&    $head->print(\e*STDOUT);
.Ve
.PP
.Vb 3
\&    ### Output as string:
\&    print STDOUT $head->as_string;
\&    print STDOUT $head->stringify;
.Ve
.Sh "Getting field contents"
.IX Subsection "Getting field contents"
.Vb 2
\&    ### Is this a reply?
\&    $is_reply = 1 if ($head->get('Subject') =~ /^Re: /);
.Ve
.PP
.Vb 3
\&    ### Get receipt information:
\&    print "Last received from: ", $head->get('Received', 0), "\en";
\&    @all_received = $head->get('Received');
.Ve
.PP
.Vb 2
\&    ### Print the subject, or the empty string if none:
\&    print "Subject: ", $head->get('Subject',0), "\en";
.Ve
.PP
.Vb 2
\&    ### Too many hops?  Count 'em and see!
\&    if ($head->count('Received') > 5) { ...
.Ve
.PP
.Vb 2
\&    ### Test whether a given field exists
\&    warn "missing subject!" if (! $head->count('subject'));
.Ve
.Sh "Setting field contents"
.IX Subsection "Setting field contents"
.Vb 2
\&    ### Declare this to be an HTML header:
\&    $head->replace('Content-type', 'text/html');
.Ve
.Sh "Manipulating field contents"
.IX Subsection "Manipulating field contents"
.Vb 2
\&    ### Get rid of internal newlines in fields:
\&    $head->unfold;
.Ve
.PP
.Vb 2
\&    ### Decode any Q- or B-encoded-text in fields (DEPRECATED):
\&    $head->decode;
.Ve
.Sh "Getting high-level \s-1MIME\s0 information"
.IX Subsection "Getting high-level MIME information"
.Vb 4
\&    ### Get/set a given MIME attribute:
\&    unless ($charset = $head->mime_attr('content-type.charset')) {
\&        $head->mime_attr("content-type.charset" => "US-ASCII");
\&    }
.Ve
.PP
.Vb 2
\&    ### The content type (e.g., "text/html"):
\&    $mime_type     = $head->mime_type;
.Ve
.PP
.Vb 2
\&    ### The content transfer encoding (e.g., "quoted-printable"):
\&    $mime_encoding = $head->mime_encoding;
.Ve
.PP
.Vb 2
\&    ### The recommended name when extracted:
\&    $file_name     = $head->recommended_filename;
.Ve
.PP
.Vb 2
\&    ### The boundary text, for multipart messages:
\&    $boundary      = $head->multipart_boundary;
.Ve
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
A class for parsing in and manipulating \s-1RFC\-822\s0 message headers, with some 
methods geared towards standard (and not so standard) \s-1MIME\s0 fields as 
specified in \s-1RFC\-1521\s0, \fIMultipurpose Internet Mail Extensions\fR.
.SH "PUBLIC INTERFACE"
.IX Header "PUBLIC INTERFACE"
.Sh "Creation, input, and output"
.IX Subsection "Creation, input, and output"
.IP "new [\s-1ARG\s0],[\s-1OPTIONS\s0]" 4
.IX Item "new [ARG],[OPTIONS]"
\&\fIClass method, inherited.\fR
Creates a new header object.  Arguments are the same as those in the 
superclass.  
.IP "from_file \s-1EXPR\s0,OPTIONS" 4
.IX Item "from_file EXPR,OPTIONS"
\&\fIClass or instance method\fR.
For convenience, you can use this to parse a header object in from \s-1EXPR\s0, 
which may actually be any expression that can be sent to \fIopen()\fR so as to 
return a readable filehandle.  The \*(L"file\*(R" will be opened, read, and then 
closed:
.Sp
.Vb 2
\&    ### Create a new header by parsing in a file:
\&    my $head = MIME::Head->from_file("/tmp/test.hdr");
.Ve
.Sp
Since this method can function as either a class constructor \fIor\fR 
an instance initializer, the above is exactly equivalent to:
.Sp
.Vb 2
\&    ### Create a new header by parsing in a file:
\&    my $head = MIME::Head->new->from_file("/tmp/test.hdr");
.Ve
.Sp
On success, the object will be returned; on failure, the undefined value.
.Sp
The \s-1OPTIONS\s0 are the same as in \fInew()\fR, and are passed into \fInew()\fR
if this is invoked as a class method.
.Sp
\&\fBNote:\fR This is really just a convenience front-end onto \f(CW\*(C`read()\*(C'\fR,
provided mostly for backwards-compatibility with MIME-parser 1.0.
.IP "read \s-1FILEHANDLE\s0" 4
.IX Item "read FILEHANDLE"
\&\fIInstance (or class) method.\fR 
This initiallizes a header object by reading it in from a \s-1FILEHANDLE\s0,
until the terminating blank line is encountered.  
A syntax error or end-of-stream will also halt processing.
.Sp
Supply this routine with a reference to a filehandle glob; e.g., \f(CW\*(C`\e*STDIN\*(C'\fR:
.Sp
.Vb 2
\&    ### Create a new header by parsing in STDIN:
\&    $head->read(\e*STDIN);
.Ve
.Sp
On success, the self object will be returned; on failure, a false value.
.Sp
\&\fBNote:\fR in the \s-1MIME\s0 world, it is perfectly legal for a header to be
empty, consisting of nothing but the terminating blank line.  Thus,
we can't just use the formula that \*(L"no tags equals error\*(R".
.Sp
\&\fBWarning:\fR as of the time of this writing, Mail::Header::read did not flag
either syntax errors or unexpected end-of-file conditions (an \s-1EOF\s0
before the terminating blank line).  MIME::ParserBase takes this
into account.
.Sh "Getting/setting fields"
.IX Subsection "Getting/setting fields"
The following are methods related to retrieving and modifying the header 
fields.  Some are inherited from Mail::Header, but I've kept the
documentation around for convenience.
.IP "add \s-1TAG\s0,TEXT,[\s-1INDEX\s0]" 4
.IX Item "add TAG,TEXT,[INDEX]"
\&\fIInstance method, inherited.\fR
Add a new occurence of the field named \s-1TAG\s0, given by \s-1TEXT:\s0
.Sp
.Vb 3
\&    ### Add the trace information:    
\&    $head->add('Received', 
\&               'from eryq.pr.mcs.net by gonzo.net with smtp');
.Ve
.Sp
Normally, the new occurence will be \fIappended\fR to the existing 
occurences.  However, if the optional \s-1INDEX\s0 argument is 0, then the 
new occurence will be \fIprepended\fR.  If you want to be \fIexplicit\fR 
about appending, specify an \s-1INDEX\s0 of \-1.
.Sp
\&\fBWarning\fR: this method always adds new occurences; it doesn't overwrite
any existing occurences... so if you just want to \fIchange\fR the value
of a field (creating it if necessary), then you probably \fBdon't\fR want to use 
this method: consider using \f(CW\*(C`replace()\*(C'\fR instead.
.IP "count \s-1TAG\s0" 4
.IX Item "count TAG"
\&\fIInstance method, inherited.\fR
Returns the number of occurences of a field; in a boolean context, this
tells you whether a given field exists:
.Sp
.Vb 2
\&    ### Was a "Subject:" field given?
\&    $subject_was_given = $head->count('subject');
.Ve
.Sp
The \s-1TAG\s0 is treated in a case-insensitive manner.
This method returns some false value if the field doesn't exist,
and some true value if it does.
.IP "decode [\s-1FORCE\s0]" 4
.IX Item "decode [FORCE]"
\&\fIInstance method, \s-1DEPRECATED\s0.\fR
Go through all the header fields, looking for RFC\-1522\-style \*(L"Q\*(R"
(quoted\-printable, sort of) or \*(L"B\*(R" (base64) encoding, and decode them
in\-place.  Fellow Americans, you probably don't know what the hell I'm
talking about.  Europeans, Russians, et al, you probably do.  \f(CW\*(C`:\-)\*(C'\fR. 
.Sp
\&\fBThis method has been deprecated.\fR
See \*(L"decode_headers\*(R" in MIME::Parser for the full reasons.
If you absolutely must use it and don't like the warning, then
provide a \s-1FORCE:\s0
.Sp
.Vb 3
\&   "I_NEED_TO_FIX_THIS"
\&          Just shut up and do it.  Not recommended.
\&          Provided only for those who need to keep old scripts functioning.
.Ve
.Sp
.Vb 3
\&   "I_KNOW_WHAT_I_AM_DOING"
\&          Just shut up and do it.  Not recommended.
\&          Provided for those who REALLY know what they are doing.
.Ve
.Sp
\&\fBWhat this method does.\fR
For an example, let's consider a valid email header you might get:
.Sp
.Vb 6
\&    From: =?US-ASCII?Q?Keith_Moore?= <moore@cs.utk.edu>
\&    To: =?ISO-8859-1?Q?Keld_J=F8rn_Simonsen?= <keld@dkuug.dk>
\&    CC: =?ISO-8859-1?Q?Andr=E9_?= Pirard <PIRARD@vm1.ulg.ac.be>
\&    Subject: =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?=
\&     =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=
\&     =?US-ASCII?Q?.._cool!?=
.Ve
.Sp
That basically decodes to (sorry, I can only approximate the
Latin characters with 7 bit sequences /o and 'e):
.Sp
.Vb 4
\&    From: Keith Moore <moore@cs.utk.edu>
\&    To: Keld J/orn Simonsen <keld@dkuug.dk>
\&    CC: Andr'e  Pirard <PIRARD@vm1.ulg.ac.be>
\&    Subject: If you can read this you understand the example... cool!
.Ve
.Sp
\&\fBNote:\fR currently, the decodings are done without regard to the
character set: thus, the Q\-encoding \f(CW\*(C`=F8\*(C'\fR is simply translated to the
octet (hexadecimal \f(CW\*(C`F8\*(C'\fR), period.  For piece-by-piece decoding
of a given field, you want the array context of 
\&\f(CW\*(C`MIME::Word::decode_mimewords()\*(C'\fR.
.Sp
\&\fBWarning:\fR the \s-1CRLF+SPACE\s0 separator that splits up long encoded words 
into shorter sequences (see the Subject: example above) gets lost
when the field is unfolded, and so decoding after unfolding causes
a spurious space to be left in the field.  
\&\fI\s-1THEREFORE:\s0 if you're going to decode, do so \s-1BEFORE\s0 unfolding!\fR
.Sp
This method returns the self object.
.Sp
\&\fIThanks to Kent Boortz for providing the idea, and the baseline 
RFC\-1522\-decoding code.\fR
.IP "delete \s-1TAG\s0,[\s-1INDEX\s0]" 4
.IX Item "delete TAG,[INDEX]"
\&\fIInstance method, inherited.\fR
Delete all occurences of the field named \s-1TAG\s0.
.Sp
.Vb 3
\&    ### Remove some MIME information:
\&    $head->delete('MIME-Version');
\&    $head->delete('Content-type');
.Ve
.IP "get \s-1TAG\s0,[\s-1INDEX\s0]" 4
.IX Item "get TAG,[INDEX]"
\&\fIInstance method, inherited.\fR  
Get the contents of field \s-1TAG\s0.
.Sp
If a \fBnumeric \s-1INDEX\s0\fR is given, returns the occurence at that index, 
or undef if not present:
.Sp
.Vb 3
\&    ### Print the first and last 'Received:' entries (explicitly):
\&    print "First, or most recent: ", $head->get('received', 0), "\en";
\&    print "Last, or least recent: ", $head->get('received',-1), "\en";
.Ve
.Sp
If \fBno \s-1INDEX\s0\fR is given, but invoked in a \fBscalar\fR context, then
\&\s-1INDEX\s0 simply defaults to 0:
.Sp
.Vb 2
\&    ### Get the first 'Received:' entry (implicitly):
\&    my $most_recent = $head->get('received');
.Ve
.Sp
If \fBno \s-1INDEX\s0\fR is given, and invoked in an \fBarray\fR context, then
\&\fIall\fR occurences of the field are returned:
.Sp
.Vb 2
\&    ### Get all 'Received:' entries:
\&    my @all_received = $head->get('received');
.Ve
.IP "get_all \s-1FIELD\s0" 4
.IX Item "get_all FIELD"
\&\fIInstance method.\fR
Returns the list of \fIall\fR occurences of the field, or the 
empty list if the field is not present:
.Sp
.Vb 2
\&    ### How did it get here?
\&    @history = $head->get_all('Received');
.Ve
.Sp
\&\fBNote:\fR I had originally experimented with having \f(CW\*(C`get()\*(C'\fR return all 
occurences when invoked in an array context... but that causes a lot of 
accidents when you get careless and do stuff like this:
.Sp
.Vb 1
\&    print "\eu$field: ", $head->get($field), "\en";
.Ve
.Sp
It also made the intuitive behaviour unclear if the \s-1INDEX\s0 argument 
was given in an array context.  So I opted for an explicit approach
to asking for all occurences.
.IP "print [\s-1OUTSTREAM\s0]" 4
.IX Item "print [OUTSTREAM]"
\&\fIInstance method, override.\fR
Print the header out to the given \s-1OUTSTREAM\s0, or the currently-selected
filehandle if none.  The \s-1OUTSTREAM\s0 may be a filehandle, or any object
that responds to a \fIprint()\fR message.
.Sp
The override actually lets you print to any object that responds to
a \fIprint()\fR method.  This is vital for outputting \s-1MIME\s0 entities to scalars.
.Sp
Also, it defaults to the \fIcurrently-selected\fR filehandle if none is given
(not \s-1STDOUT\s0!), so \fIplease\fR supply a filehandle to prevent confusion.
.IP "stringify" 4
.IX Item "stringify"
\&\fIInstance method.\fR
Return the header as a string.  You can also invoke it as \f(CW\*(C`as_string\*(C'\fR.
.IP "unfold [\s-1FIELD\s0]" 4
.IX Item "unfold [FIELD]"
\&\fIInstance method, inherited.\fR
Unfold (remove newlines in) the text of all occurences of the given \s-1FIELD\s0.  
If the \s-1FIELD\s0 is omitted, \fIall\fR fields are unfolded.
Returns the \*(L"self\*(R" object.
.Sh "MIME-specific methods"
.IX Subsection "MIME-specific methods"
All of the following methods extract information from the following fields:
.PP
.Vb 3
\&    Content-type
\&    Content-transfer-encoding
\&    Content-disposition
.Ve
.PP
Be aware that they do not just return the raw contents of those fields,
and in some cases they will fill in sensible (I hope) default values.
Use \f(CW\*(C`get()\*(C'\fR or \f(CW\*(C`mime_attr()\*(C'\fR if you need to grab and process the 
raw field text.
.PP
\&\fBNote:\fR some of these methods are provided both as a convenience and
for backwards-compatibility only, while others (like
\&\fIrecommended_filename()\fR) \fIreally do have to be in MIME::Head to work
properly,\fR since they look for their value in more than one field.
However, if you know that a value is restricted to a single
field, you should really use the Mail::Field interface to get it.
.IP "mime_attr \s-1ATTR\s0,[\s-1VALUE\s0]" 4
.IX Item "mime_attr ATTR,[VALUE]"
A quick-and-easy interface to set/get the attributes in structured 
\&\s-1MIME\s0 fields:
.Sp
.Vb 3
\&    $head->mime_attr("content-type"         => "text/html");
\&    $head->mime_attr("content-type.charset" => "US-ASCII");
\&    $head->mime_attr("content-type.name"    => "homepage.html");
.Ve
.Sp
This would cause the final output to look something like this:
.Sp
.Vb 1
\&    Content-type: text/html; charset=US-ASCII; name="homepage.html"
.Ve
.Sp
Note that the special empty sub-field tag indicates the anonymous 
first sub\-field.
.Sp
\&\fBGiving \s-1VALUE\s0 as undefined\fR will cause the contents of the named subfield 
to be deleted:
.Sp
.Vb 1
\&    $head->mime_attr("content-type.charset" => undef);
.Ve
.Sp
\&\fBSupplying no \s-1VALUE\s0 argument\fR just returns the attribute's value,
or undefined if it isn't there:
.Sp
.Vb 2
\&    $type = $head->mime_attr("content-type");      ### text/html
\&    $name = $head->mime_attr("content-type.name"); ### homepage.html
.Ve
.Sp
In all cases, the new/current value is returned.
.IP "mime_encoding" 4
.IX Item "mime_encoding"
\&\fIInstance method.\fR
Try \fIreal hard\fR to determine the content transfer encoding
(e.g., \f(CW"base64"\fR, \f(CW"binary"\fR), which is returned in all\-lowercase.
.Sp
If no encoding could be found, the default of \f(CW"7bit"\fR is returned.  
I quote from \s-1RFC\-1521\s0 section 5:
.Sp
.Vb 2
\&    This is the default value -- that is, "Content-Transfer-Encoding: 7BIT" 
\&    is assumed if the Content-Transfer-Encoding header field is not present.
.Ve
.Sp
I do one other form of fixup: \*(L"7_bit\*(R", \*(L"7\-bit\*(R", and \*(L"7 bit\*(R" are
corrected to \*(L"7bit\*(R"; likewise for \*(L"8bit\*(R".
.IP "mime_type [\s-1DEFAULT\s0]" 4
.IX Item "mime_type [DEFAULT]"
\&\fIInstance method.\fR
Try \f(CW\*(C`real hard\*(C'\fR to determine the content type (e.g., \f(CW"text/plain"\fR,
\&\f(CW"image/gif"\fR, \f(CW"x\-weird\-type"\fR, which is returned in all\-lowercase.  
\&\*(L"Real hard\*(R" means that if no content type could be found, the default 
(usually \f(CW"text/plain"\fR) is returned.  From \s-1RFC\-1521\s0 section 7.1:
.Sp
.Vb 2
\&    The default Content-Type for Internet mail is 
\&    "text/plain; charset=us-ascii".
.Ve
.Sp
Unless this is a part of a \*(L"multipart/digest\*(R", in which case 
\&\*(L"message/rfc822\*(R" is the default.  Note that you can also \fIset\fR the 
default, but you shouldn't: normally only the \s-1MIME\s0 parser uses this 
feature.
.IP "multipart_boundary" 4
.IX Item "multipart_boundary"
\&\fIInstance method.\fR
If this is a header for a multipart message, return the 
\&\*(L"encapsulation boundary\*(R" used to separate the parts.  The boundary
is returned exactly as given in the \f(CW\*(C`Content\-type:\*(C'\fR field; that
is, the leading double-hyphen (\f(CW\*(C`\-\-\*(C'\fR) is \fInot\fR prepended.
.Sp
Well, \fIalmost\fR exactly... this passage from \s-1RFC\-1521\s0 dictates
that we remove any trailing spaces:
.Sp
.Vb 2
\&   If a boundary appears to end with white space, the white space 
\&   must be presumed to have been added by a gateway, and must be deleted.
.Ve
.Sp
Returns undef (\fBnot\fR the empty string) if either the message is not
multipart or if there is no specified boundary.
.IP "recommended_filename" 4
.IX Item "recommended_filename"
\&\fIInstance method.\fR
Return the recommended external filename.  This is used when
extracting the data from the \s-1MIME\s0 stream.
.Sp
Returns undef if no filename could be suggested.
.SH "NOTES"
.IX Header "NOTES"
.IP "Why have separate objects for the entity, head, and body?" 4
.IX Item "Why have separate objects for the entity, head, and body?"
See the documentation for the MIME-tools distribution
for the rationale behind this decision.
.IP "Why assume that \s-1MIME\s0 headers are email headers?" 4
.IX Item "Why assume that MIME headers are email headers?"
I quote from Achim Bohnet, who gave feedback on v.1.9 (I think
he's using the word \*(L"header\*(R" where I would use \*(L"field\*(R"; e.g.,
to refer to \*(L"Subject:\*(R", \*(L"Content\-type:\*(R", etc.):
.Sp
.Vb 3
\&    There is also IMHO no requirement [for] MIME::Heads to look 
\&    like [email] headers; so to speak, the MIME::Head [simply stores] 
\&    the attributes of a complex object, e.g.:
.Ve
.Sp
.Vb 3
\&        new MIME::Head type => "text/plain",
\&                       charset => ...,
\&                       disposition => ..., ... ;
.Ve
.Sp
I agree in principle, but (alas and dammit) \s-1RFC\-1521\s0 says otherwise.
\&\s-1RFC\-1521\s0 [\s-1MIME\s0] headers are a syntactic subset of \s-1RFC\-822\s0 [email] headers.
Perhaps a better name for these modules would be \s-1RFC1521::\s0 instead of
\&\s-1MIME::\s0, but we're a little beyond that stage now.
.Sp
In my mind's eye, I see an abstract class, call it MIME::Attrs, which does
what Achim suggests... so you could say:
.Sp
.Vb 3
\&     my $attrs = new MIME::Attrs type => "text/plain",
\&                                 charset => ...,
\&                                 disposition => ..., ... ;
.Ve
.Sp
We could even make it a superclass of MIME::Head: that way, MIME::Head
would have to implement its interface, \fIand\fR allow itself to be
initiallized from a MIME::Attrs object.
.Sp
However, when you read \s-1RFC\-1521\s0, you begin to see how much \s-1MIME\s0 information
is organized by its presence in particular fields.  I imagine that we'd
begin to mirror the structure of \s-1RFC\-1521\s0 fields and subfields to such 
a degree that this might not give us a tremendous gain over just
having MIME::Head.
.ie n .IP "Why all this ""occurence"" and ""index"" jazz?  Isn't every field unique?" 4
.el .IP "Why all this ``occurence'' and ``index'' jazz?  Isn't every field unique?" 4
.IX Item "Why all this occurence and index jazz?  Isn't every field unique?"
Aaaaaaaaaahh....no.
.Sp
Looking at a typical mail message header, it is sooooooo tempting to just
store the fields as a hash of strings, one string per hash entry.  
Unfortunately, there's the little matter of the \f(CW\*(C`Received:\*(C'\fR field, 
which (unlike \f(CW\*(C`From:\*(C'\fR, \f(CW\*(C`To:\*(C'\fR, etc.) will often have multiple 
occurences; e.g.:
.Sp
.Vb 14
\&    Received: from gsfc.nasa.gov by eryq.pr.mcs.net  with smtp
\&        (Linux Smail3.1.28.1 #5) id m0tStZ7-0007X4C; 
\&         Thu, 21 Dec 95 16:34 CST
\&    Received: from rhine.gsfc.nasa.gov by gsfc.nasa.gov 
\&         (5.65/Ultrix3.0-C) id AA13596; 
\&         Thu, 21 Dec 95 17:20:38 -0500
\&    Received: (from eryq@localhost) by rhine.gsfc.nasa.gov 
\&         (8.6.12/8.6.12) id RAA28069; 
\&         Thu, 21 Dec 1995 17:27:54 -0500
\&    Date: Thu, 21 Dec 1995 17:27:54 -0500
\&    From: Eryq <eryq@rhine.gsfc.nasa.gov>
\&    Message-Id: <199512212227.RAA28069@rhine.gsfc.nasa.gov>
\&    To: eryq@eryq.pr.mcs.net
\&    Subject: Stuff and things
.Ve
.Sp
The \f(CW\*(C`Received:\*(C'\fR field is used for tracing message routes, and although
it's not generally used for anything other than human debugging, I
didn't want to inconvenience anyone who actually wanted to get at that
information.  
.Sp
I also didn't want to make this a special case; after all, who
knows what other fields could have multiple occurences in the
future?  So, clearly, multiple entries had to somehow be stored
multiple times... and the different occurences had to be retrievable.
.SH "AUTHOR"
.IX Header "AUTHOR"
Eryq (\fIeryq@zeegee.com\fR), ZeeGee Software Inc (\fIhttp://www.zeegee.com\fR).
David F. Skoll (dfs@roaringpenguin.com) http://www.roaringpenguin.com
.PP
All rights reserved.  This program is free software; you can redistribute 
it and/or modify it under the same terms as Perl itself.
.PP
The more-comprehensive filename extraction is courtesy of 
Lee E. Brotzman, Advanced Data Solutions.
.SH "VERSION"
.IX Header "VERSION"
$Revision: 1.14 $ \f(CW$Date:\fR 2006/03/17 21:03:23 $

Creat By MiNi SheLL
Email: devilkiller@gmail.com