The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

MIME::Expander::Guess::MMagic - An implementation for guessing mime type

SYNOPSIS

use MIME::Expander;
use IO::All;

my $filename = $ARGV[0];
my $contents < io $filename;

my $me = MIME::Expander->new({
                guess_type => ['MMagic','FileName'],
                });

my $type = $me->guess_type_by_contents(
            \$contents, {filename => $filename});

DESCRIPTION

Guess the mime type from contents using File::MMagic.

SEE ALSO

MIME::Expander::Guess

File::MMagic