![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Content-Type: Message/Partial; number=2; total=3; id="oc=jpbe0M2Yt4s@thumper.bellcore.com"
Comments are supported between items, like this:
Content-Type: Message/Partial; (a comment) number=2 (another comment) ; (yet another comment) total=3; id="oc=jpbe0M2Yt4s@thumper.bellcore.com"
"_"
parameter name signifying the ``default'' (unnamed) parameter for the
field:
# Set up to be... # # Content-type: Message/Partial; number=2; total=3; id="ocj=pbe0M2" # $conttype->set('_' => 'Message/Partial', 'number' => 2, 'total' => 3, 'id' => "ocj=pbe0M2");
Note that a single argument is taken to be a reference to a paramhash, while multiple args are taken to be the elements of the paramhash themselves.
Supplying undef for a hashref, or an empty set of values, effectively clears the object.
The self object is returned.
Content-Type: Message/Partial; number=2; total=3; id="oc=jpbe0M2Yt4s@thumper.bellcore.com"
Here is how you'd extract them:
$params = $class->parse_params('content-type'); if ($$params{'_'} eq 'message/partial') { $number = $$params{'number'}; $total = $$params{'total'}; $id = $$params{'id'}; }
Like field names, parameter names are coerced to lowercase. The special '_' parameter means the default parameter for the field.
NOTE: This has been provided as a public method to support backwards compatibility, but you probably shouldn't use it.
The self object is returned.