MIME-Type-FileName reviews

RSS | Module Info | Add a review of MIME-Type-FileName

MIME-Type-FileName (1.0)

The module is very simple and minimal. It consists of a small initialisation routine which maps file endings to mime types, a routine called "guess" which guesses the mime type, and extension to file name data.

A bug in the initialisation routine means it overwrites its own values, so .jpeg turns into image/pjpeg. I reported it here:

rt.cpan.org/Ticket/Display.html?id=12...

The list of mime types contains some wrong ones like "application/x-javascript" which should be "application/javascript". The IANI list is online and available in text form for anyone to copy here:

www.iana.org/assignments/media-types/...

I'm not sure why the author created this module. MIME::Types was already mature when this module was first released in 2012. In my test, MIME::Types gets 13/16 file names to mime types correct, but MIME::Type::FileName gets only 8/16 right.

MIME::Type::FileName is simple and self-contained, but not very accurate.

For a comparison with similar modules, see

www.lemoda.net/perl/find-type-of-file/