WATANABE Hiroaki

NAME

MIME::Expander::Guess - An interface of classes determine 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