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::MMagic

Download:
MIME-Expander-0.02.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.02   Source  

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

syntax highlighting: