1ExtUtils::Manifest(3) User Contributed Perl DocumentationExtUtils::Manifest(3)
2
3
4
6 ExtUtils::Manifest - utilities to write and check a MANIFEST file
7
9 version 1.70
10
12 use ExtUtils::Manifest qw(...funcs to import...);
13
14 mkmanifest();
15
16 my @missing_files = manicheck;
17 my @skipped = skipcheck;
18 my @extra_files = filecheck;
19 my($missing, $extra) = fullcheck;
20
21 my $found = manifind();
22
23 my $manifest = maniread();
24
25 manicopy($read,$target);
26
27 maniadd({$file => $comment, ...});
28
30 Functions
31 ExtUtils::Manifest exports no functions by default. The following are
32 exported on request
33
34 mkmanifest
35 mkmanifest();
36
37 Writes all files in and below the current directory to your
38 MANIFEST. It works similar to the result of the Unix command
39
40 find . > MANIFEST
41
42 All files that match any regular expression in a file MANIFEST.SKIP
43 (if it exists) are ignored.
44
45 Any existing MANIFEST file will be saved as MANIFEST.bak.
46
47 manifind
48 my $found = manifind();
49
50 returns a hash reference. The keys of the hash are the files found
51 below the current directory.
52
53 manicheck
54 my @missing_files = manicheck();
55
56 checks if all the files within a "MANIFEST" in the current
57 directory really do exist. If "MANIFEST" and the tree below the
58 current directory are in sync it silently returns an empty list.
59 Otherwise it returns a list of files which are listed in the
60 "MANIFEST" but missing from the directory, and by default also
61 outputs these names to STDERR.
62
63 filecheck
64 my @extra_files = filecheck();
65
66 finds files below the current directory that are not mentioned in
67 the "MANIFEST" file. An optional file "MANIFEST.SKIP" will be
68 consulted. Any file matching a regular expression in such a file
69 will not be reported as missing in the "MANIFEST" file. The list of
70 any extraneous files found is returned, and by default also
71 reported to STDERR.
72
73 fullcheck
74 my($missing, $extra) = fullcheck();
75
76 does both a manicheck() and a filecheck(), returning then as two
77 array refs.
78
79 skipcheck
80 my @skipped = skipcheck();
81
82 lists all the files that are skipped due to your "MANIFEST.SKIP"
83 file.
84
85 maniread
86 my $manifest = maniread();
87 my $manifest = maniread($manifest_file);
88
89 reads a named "MANIFEST" file (defaults to "MANIFEST" in the
90 current directory) and returns a HASH reference with files being
91 the keys and comments being the values of the HASH. Blank lines
92 and lines which start with "#" in the "MANIFEST" file are
93 discarded.
94
95 maniskip
96 my $skipchk = maniskip();
97 my $skipchk = maniskip($manifest_skip_file);
98
99 if ($skipchk->($file)) { .. }
100
101 reads a named "MANIFEST.SKIP" file (defaults to "MANIFEST.SKIP" in
102 the current directory) and returns a CODE reference that tests
103 whether a given filename should be skipped.
104
105 manicopy
106 manicopy(\%src, $dest_dir);
107 manicopy(\%src, $dest_dir, $how);
108
109 Copies the files that are the keys in %src to the $dest_dir. %src
110 is typically returned by the maniread() function.
111
112 manicopy( maniread(), $dest_dir );
113
114 This function is useful for producing a directory tree identical to
115 the intended distribution tree.
116
117 $how can be used to specify a different methods of "copying".
118 Valid values are "cp", which actually copies the files, "ln" which
119 creates hard links, and "best" which mostly links the files but
120 copies any symbolic link to make a tree without any symbolic link.
121 "cp" is the default.
122
123 maniadd
124 maniadd({ $file => $comment, ...});
125
126 Adds an entry to an existing MANIFEST unless its already there.
127
128 $file will be normalized (ie. Unixified). UNIMPLEMENTED
129
130 MANIFEST
131 A list of files in the distribution, one file per line. The MANIFEST
132 always uses Unix filepath conventions even if you're not on Unix. This
133 means foo/bar style not foo\bar.
134
135 Anything between white space and an end of line within a "MANIFEST"
136 file is considered to be a comment. Any line beginning with # is also
137 a comment. Beginning with ExtUtils::Manifest 1.52, a filename may
138 contain whitespace characters if it is enclosed in single quotes;
139 single quotes or backslashes in that filename must be backslash-
140 escaped.
141
142 # this a comment
143 some/file
144 some/other/file comment about some/file
145 'some/third file' comment
146
147 MANIFEST.SKIP
148 The file MANIFEST.SKIP may contain regular expressions of files that
149 should be ignored by mkmanifest() and filecheck(). The regular
150 expressions should appear one on each line. Blank lines and lines which
151 start with "#" are skipped. Use "\#" if you need a regular expression
152 to start with a "#".
153
154 For example:
155
156 # Version control files and dirs.
157 \bRCS\b
158 \bCVS\b
159 ,v$
160 \B\.svn\b
161
162 # Makemaker generated files and dirs.
163 ^MANIFEST\.
164 ^Makefile$
165 ^blib/
166 ^MakeMaker-\d
167
168 # Temp, old and emacs backup files.
169 ~$
170 \.old$
171 ^#.*#$
172 ^\.#
173
174 If no MANIFEST.SKIP file is found, a default set of skips will be used,
175 similar to the example above. If you want nothing skipped, simply make
176 an empty MANIFEST.SKIP file.
177
178 In one's own MANIFEST.SKIP file, certain directives can be used to
179 include the contents of other MANIFEST.SKIP files. At present two such
180 directives are recognized.
181
182 #!include_default
183 This inserts the contents of the default MANIFEST.SKIP file
184
185 #!include /Path/to/another/manifest.skip
186 This inserts the contents of the specified external file
187
188 The included contents will be inserted into the MANIFEST.SKIP file in
189 between #!start included /path/to/manifest.skip and #!end included
190 /path/to/manifest.skip markers. The original MANIFEST.SKIP is saved as
191 MANIFEST.SKIP.bak.
192
193 EXPORT_OK
194 &mkmanifest, &manicheck, &filecheck, &fullcheck, &maniread, and
195 &manicopy are exportable.
196
197 GLOBAL VARIABLES
198 $ExtUtils::Manifest::MANIFEST defaults to "MANIFEST". Changing it
199 results in both a different "MANIFEST" and a different "MANIFEST.SKIP"
200 file. This is useful if you want to maintain different distributions
201 for different audiences (say a user version and a developer version
202 including RCS).
203
204 $ExtUtils::Manifest::Quiet defaults to 0. If set to a true value, all
205 functions act silently.
206
207 $ExtUtils::Manifest::Debug defaults to 0. If set to a true value, or
208 if PERL_MM_MANIFEST_DEBUG is true, debugging output will be produced.
209
211 All diagnostic output is sent to "STDERR".
212
213 "Not in MANIFEST:" file
214 is reported if a file is found which is not in "MANIFEST".
215
216 "Skipping" file
217 is reported if a file is skipped due to an entry in
218 "MANIFEST.SKIP".
219
220 "No such file:" file
221 is reported if a file mentioned in a "MANIFEST" file does not
222 exist.
223
224 "MANIFEST:" $!
225 is reported if "MANIFEST" could not be opened.
226
227 "Added to MANIFEST:" file
228 is reported by mkmanifest() if $Verbose is set and a file is added
229 to MANIFEST. $Verbose is set to 1 by default.
230
232 PERL_MM_MANIFEST_DEBUG
233 Turns on debugging
234
236 ExtUtils::MakeMaker which has handy targets for most of the
237 functionality.
238
240 Andreas Koenig "andreas.koenig@anima.de"
241
242 Currently maintained by the Perl Toolchain Gang.
243
245 This software is copyright (c) 1996- by Andreas Koenig.
246
247 This is free software; you can redistribute it and/or modify it under
248 the same terms as the Perl 5 programming language system itself.
249
250
251
252perl v5.26.3 2014-12-31 ExtUtils::Manifest(3)