
MIME types and perl data...
I have some code which creates message object, these are passed to
arbitrary 'messageHander' object ( I have a message handler object that
can be inherited by objects interested in messages, override
messageHander::recieveMessage and your good). I want to 'type' the
content of these message and I'm wondering if anyone has suggestions as
to a good, general purpose way to do this.
My first inkling is to use MIME types. Also, I would love to be able to
easily forward perl native references ( arrays, hashed, regexes & etc)
with good type codes. So: has anyone got a list of 'official' or
preferred MIME types for the various perl internal data types?
For e.g..:
application/x-perl-scalar-ref
application/x-perl-array-ref
application/x-perl-hash-ref
application/x-perl-object-ref <- since the object knows what it
is, this should be enough.
etc...
PS, you can find a list of current (RFC1521) media types here:
ftp://ftp.isi.edu/in-notes/iana/assignments/media-types/media-types
Thanks for any thoughts and please CC me in your response.
#alfo
--
perl code is the beat poetry of the information age