1ExtUtils::Installed(3pm)Perl Programmers Reference GuideExtUtils::Installed(3pm)
2
3
4
6 ExtUtils::Installed - Inventory management of installed modules
7
9 use ExtUtils::Installed;
10 my ($inst) = ExtUtils::Installed->new();
11 my (@modules) = $inst->modules();
12 my (@missing) = $inst->validate("DBI");
13 my $all_files = $inst->files("DBI");
14 my $files_below_usr_local = $inst->files("DBI", "all", "/usr/local");
15 my $all_dirs = $inst->directories("DBI");
16 my $dirs_below_usr_local = $inst->directory_tree("DBI", "prog");
17 my $packlist = $inst->packlist("DBI");
18
20 ExtUtils::Installed provides a standard way to find out what core and
21 module files have been installed. It uses the information stored in
22 .packlist files created during installation to provide this informa‐
23 tion. In addition it provides facilities to classify the installed
24 files and to extract directory information from the .packlist files.
25
27 The new() function searches for all the installed .packlists on the
28 system, and stores their contents. The .packlists can be queried with
29 the functions described below.
30
32 new()
33 This takes no parameters, and searches for all the installed .pack‐
34 lists on the system. The packlists are read using the ExtU‐
35 tils::packlist module.
36
37 modules()
38 This returns a list of the names of all the installed modules. The
39 perl 'core' is given the special name 'Perl'.
40
41 files()
42 This takes one mandatory parameter, the name of a module. It
43 returns a list of all the filenames from the package. To obtain a
44 list of core perl files, use the module name 'Perl'. Additional
45 parameters are allowed. The first is one of the strings "prog",
46 "doc" or "all", to select either just program files, just manual
47 files or all files. The remaining parameters are a list of direc‐
48 tories. The filenames returned will be restricted to those under
49 the specified directories.
50
51 directories()
52 This takes one mandatory parameter, the name of a module. It
53 returns a list of all the directories from the package. Additional
54 parameters are allowed. The first is one of the strings "prog",
55 "doc" or "all", to select either just program directories, just
56 manual directories or all directories. The remaining parameters
57 are a list of directories. The directories returned will be
58 restricted to those under the specified directories. This method
59 returns only the leaf directories that contain files from the spec‐
60 ified module.
61
62 directory_tree()
63 This is identical in operation to directories(), except that it
64 includes all the intermediate directories back up to the specified
65 directories.
66
67 validate()
68 This takes one mandatory parameter, the name of a module. It
69 checks that all the files listed in the modules .packlist actually
70 exist, and returns a list of any missing files. If an optional
71 second argument which evaluates to true is given any missing files
72 will be removed from the .packlist
73
74 packlist()
75 This returns the ExtUtils::Packlist object for the specified mod‐
76 ule.
77
78 version()
79 This returns the version number for the specified module.
80
82 See the example in ExtUtils::Packlist.
83
85 Alan Burlison <Alan.Burlison@uk.sun.com>
86
87
88
89perl v5.8.8 2001-09-21 ExtUtils::Installed(3pm)