Last time I checked, still can't parse system magic database, e.g. /usr/share/file/magic (bug first filed in RT 4 years ago).
The currently recommended module in this area seems to be File::LibMagic. Other alternatives include File::MMagic (slow and buggy, no longer maintained), Media::Type::Simple (only maps MIME type from/to file extension).
2 out of 2 found this review helpful. Was this review helpful to you? Yes No