1ExtUtils::Manifest(3pm)Perl Programmers Reference GuideExtUtils::Manifest(3pm)
2
3
4

NAME

6       ExtUtils::Manifest - utilities to write and check a MANIFEST file
7

SYNOPSIS

9           use ExtUtils::Manifest qw(...funcs to import...);
10
11           mkmanifest();
12
13           my @missing_files    = manicheck;
14           my @skipped          = skipcheck;
15           my @extra_files      = filecheck;
16           my($missing, $extra) = fullcheck;
17
18           my $found    = manifind();
19
20           my $manifest = maniread();
21
22           manicopy($read,$target);
23
24           maniadd({$file => $comment, ...});
25

DESCRIPTION

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

DIAGNOSTICS

208       All diagnostic output is sent to "STDERR".
209
210       "Not in MANIFEST:" file
211           is reported if a file is found which is not in "MANIFEST".
212
213       "Skipping" file
214           is reported if a file is skipped due to an entry in
215           "MANIFEST.SKIP".
216
217       "No such file:" file
218           is reported if a file mentioned in a "MANIFEST" file does not
219           exist.
220
221       "MANIFEST:" $!
222           is reported if "MANIFEST" could not be opened.
223
224       "Added to MANIFEST:" file
225           is reported by mkmanifest() if $Verbose is set and a file is added
226           to MANIFEST. $Verbose is set to 1 by default.
227

ENVIRONMENT

229       PERL_MM_MANIFEST_DEBUG
230           Turns on debugging
231

SEE ALSO

233       ExtUtils::MakeMaker which has handy targets for most of the
234       functionality.
235

AUTHOR

237       Andreas Koenig "andreas.koenig@anima.de"
238
239       Maintained by Michael G Schwern "schwern@pobox.com" within the
240       ExtUtils-MakeMaker package and, as a separate CPAN package, by Randy
241       Kobes "r.kobes@uwinnipeg.ca".
242
243
244
245perl v5.12.4                      2011-06-20           ExtUtils::Manifest(3pm)
Impressum