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 - An interface of class which determine a mime type.

SYNOPSIS

package MyGuessRoutine;
use base 'MIME::Expander::Guess';

sub type {
    my $class = shift;
    my $ref_contents = shift;
    my $info = shift || { filename => 'name.suffix' };

    # ...

    return lc('type/sub-type');
}

DESCRIPTION

It have only class method 'type' which guess type from contents.

You have to implement a class method 'type', determine and return the mime type as lower case string.

If it could not determine, return the undef.

SEE ALSO

MIME::Expander::Guess::FileName

MIME::Expander::Guess::MMagic