How about MIME::Detect which could implement
a generic API or a driver (like DBI) that can interface to various backends like
the ones you already listed?
MIME::Detect::SharedMimeInfoXML could then be one of many backends.
my $mime_detector = MIME::Detect->new( driver => 'auto' );
could auto-select an available backend.
my $mime_detector = MIME::Detect->new( driver => 'SharedMimeInfoXML' );
would ask for a specific driver explicitly.
More work needs to be done for the API to cover most of the existing functionality, though.
However, work already done by others can be preserved and made available in a generic way.
Leaving the FILE:: namespace aside would also allow to broaden the
application of MIME-detection to streams (i.e. using IO::Handle), strings, etc.