File-MMagic reviews

cpanratings
 

RSS | Module Info | Add a review of File-MMagic

File-MMagic (1.27) **

Works for basic usage, but has quite a few problems. Plus it is not very performant. Doesn't seem to be maintained anymore.

The currently recommended module in this area seems to be File::LibMagic. Other alternatives include File::Type (gives less useful results), File::MMagic::XS (also not actively maintained? long standing bugs like failure to parse system magic file still persists), Media::Type::Simple (only maps MIME type from/to file extension).

Steven Haryanto - 2011-06-15T02:52:19 (permalink)

1 out of 1 found this review helpful. Was this review helpful to you?  Yes No

File-MMagic (1.27) *

This library has a great concept, but has suffered massive bit rot since it was last maintained in 2006.

Here are my main problems with the library:

1. There is no support for multi-file magic (my system has moved to a directory-based magic file system).

2. No support for newer file(1) magic syntax: cannot detect image/png using system magic from file(1) version 5.04.

2a. Not very code-hardy: code is broken by newer/unrecognized magic file syntax.

3. There are four undocumented subs which show up in the documentation, but tell nothing of their use.

4. No support for character set detection.

5. No support for long file type descriptions ("PNG image data, xxx x yyy, ...").

All in all, I would not recommend using this module until it is maintained; File::LibMagic seems like it will give you better results.

Dan Church - 2010-03-29T13:01:13 (permalink)

3 out of 3 found this review helpful. Was this review helpful to you?  Yes No

File-MMagic (1.27) ***

This is a handy module for determining the the file type of a file by examining its contents. However, it some serious bugs (currently 19 are open), and hasn't been updated in two years. I personally ran into problems with bad results under mod_perl.

I would strongly suggest looking for alternatives before using this module. If you just need to check common web image formats, File::Type::WebImages is a simple module for that purpose. It was written precisely because File::MMagic had problems in mod_perl.

Mark Stosberg - 2008-06-21T20:30:12 (permalink)

6 out of 6 found this review helpful. Was this review helpful to you?  Yes No