View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
WATANABE Hiroaki > MIME-Expander > MIME::Expander::Guess

Download:
MIME-Expander-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

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

syntax highlighting: