On Wed, May 30, 2001 at 05:21:22PM +0200, Issac Goldstand wrote:
> Does anyone know if there is a perl module that implements the features of Apache's 
>mod_mime_magic module?  (e.g., you give it a file handle, or data and it tries to 
>autodetect the correct mime-type)

Here's a module (File::Type) that I've been meaning to clean up for CPAN
for a while.  It's in alpha, but it works for me so far.

http://slaysys.com/src/Type.pm

The "magic" it refers to must be a Perl data structure, not a "real"
magic file, though I'd really like to get to parsing real magic files.

If you want to use it, let me know and I'll CPAN it sooner.  It will
need some MIME types added or a parser for a "real" MIME types file.

- Barrie

Reply via email to