Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 3f2303c20cbab256a4b8e9d5114f9a13 > files > 6

perl-File-Type-0.220.0-3.mga4.noarch.rpm

NAME

File::Type - determine file type using magic

INSTALLING

Install using the standard Module::Build method:

perl Build.PL

./Build
./Build test

sudo ./Build install

A Makefile.PL is also included if you do not have Module::Build:

perl Makefile.PL

make
make test

sudo make install

USAGE

my $ft = File::Type->new();

# read in data from file to $data, then
my $type_from_data = $ft->checktype_data($data);

# alternatively, check file from disk
my $type_from_file = $ft->checktype_filename($file);

For further information, perldoc File::Type after installation.