Subject: | keys really should be "type" and "subtype", not "discrete" and "composite" |
I don't suppose anyone would want to add an option (or an alternative
function or something) that would return a structure with the hash keys
named properly, e.g.,
$data = {
type => "text",
subtype => "plain",
attributes => {
charset => "us-ascii",
format => "flowed"
}
};
FYI, in RFC 2045 (section 5, roughly the 8th paragraph down) "discrete"
and "composite" actually refer to the distinction between types that are
opaque to MIME like "text" vs. types that have substructure that MIME
cares about, like "multipart".
I'll grant there is a bit of potential for confusion because they use
the slash (/) to indicate disjunction in the syntax rules, so that while
there is indeed a rule
type := discrete-type / composite-type
but that's a choice, not a literal slash, which would be indicated by
double quotes ("/"), as in the rule a few lines further up:
content := "Content-Type" ":" type "/" subtype
I'll also grant that it's easy enough to work around, but,
well,
buh...