MIME types and perl data... 
Author Message
 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



Thu, 25 Jan 2001 03:00:00 GMT  
 MIME types and perl data...
Perhaps (and this is only an *opinion*) you might have a look at
how the Penguin module ships things 'round the 'net. You might
get a reasonable clue from it's workings.

Quote:

> 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

--

-----------------------------------------------------------------------

PCSE Webmaster           |           PROFS:  DPARROTT
Ford Motor Company       |             VAX:  EEE1::PARROTT

-----------------------------------------------------------------------
Voice: 313-322-4933  Fax: 313-248-1234  Pager: 313-201-9978



Fri, 26 Jan 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Anybody against using Data::Type while Data::Types already exists on CPAN

2. recuper le Mime type d'un fichier - Content-type of file

3. using mime types in perl cgi ??

4. MIME types

5. CGI.pm File upload mime type

6. How to set Mime-type with Net::SMTP

7. Mail::Audit to filter based on MIME type?

8. How to get only Content-Type: text/plain part from MIME mail

9. MIME Type hash

10. Specifying MIME type

11. problems with IIS & mime types

12. streaming media/mime type

 

 
Powered by phpBB® Forum Software