Anyone have any ideas on how to get this working?
As I said in the CB, I've worked around CGI's lightweight, crippled, overloaded file handle by making it inherit from the necessary classes. Assuming the classes are already loaded:
push @Fh::ISA, 'IO::Seekable' unless Fh->isa('IO::Seekable');
push @Fh::ISA, 'IO::Handle' unless Fh->isa('IO::Handle');
my $mimetype = File::MMagic->new->checktype_filehandle($filehandle);
As long as the $filehandle provided by CGI is a globref, blessed to the Fh class, and sysopened on the tempfile (as it is today), this works. Plenty hacky, but it works, at least for File::MMagic.
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!