File: README

package info (click to toggle)
libfile-type-perl 0.22-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 464 kB
  • sloc: perl: 1,729; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 573 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.